开业筹备阶段3.5
This commit is contained in:
@@ -1,39 +0,0 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.ShopAuditInfoDO;
|
||||
import com.cool.store.mapper.OpeningOperationPlanMapper;
|
||||
import com.cool.store.mapper.ShopAuditInfoMapper;
|
||||
import com.cool.store.vo.OpeningOperationPlanVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/22/下午2:47
|
||||
* @Version 1.0
|
||||
* @注释:开业运营方案审核
|
||||
*/
|
||||
@Slf4j
|
||||
@Repository
|
||||
public class OpeningOperationPlanAuditDAO {
|
||||
|
||||
@Resource
|
||||
private ShopAuditInfoMapper shopAuditInfoMapper;
|
||||
@Resource
|
||||
private OpeningOperationPlanMapper openingOperationPlanMapper;
|
||||
|
||||
public Long insertSelective(ShopAuditInfoDO shopAuditInfoDO) {
|
||||
shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
|
||||
return shopAuditInfoDO.getId();
|
||||
}
|
||||
public Integer updateSelective(ShopAuditInfoDO shopAuditInfoDO) {
|
||||
return shopAuditInfoMapper.updateByPrimaryKeySelective(shopAuditInfoDO);
|
||||
}
|
||||
|
||||
public Long selectIdByShopId(Long shopId) {
|
||||
return shopAuditInfoMapper.selectAuditIdByShopId(shopId);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -52,4 +52,13 @@ public class ShopAuditInfoDAO {
|
||||
return shopAuditInfoMapper.getAuditInfoList(auditIds);
|
||||
}
|
||||
|
||||
public Integer updateSelective(ShopAuditInfoDO shopAuditInfoDO) {
|
||||
return shopAuditInfoMapper.updateByPrimaryKeySelective(shopAuditInfoDO);
|
||||
}
|
||||
|
||||
public Long selectIdByShopId(Long shopId) {
|
||||
return shopAuditInfoMapper.selectAuditIdByShopId(shopId);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.entity.ShopAuditInfoDO;
|
||||
import com.cool.store.request.OpeningOperationPlanAuditRequest;
|
||||
|
||||
/**
|
||||
@@ -9,7 +8,7 @@ import com.cool.store.request.OpeningOperationPlanAuditRequest;
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public interface OpeningOperationPlanAuditService {
|
||||
public interface AuditOpeningOperationPlanService {
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
@@ -13,14 +13,12 @@ import com.cool.store.enums.OpeningOperationPlanResultTypeEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.OpeningOperationPlanAuditRequest;
|
||||
import com.cool.store.service.OpeningOperationPlanAuditService;
|
||||
import com.cool.store.service.AuditOpeningOperationPlanService;
|
||||
import com.cool.store.service.PreparationService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
@@ -31,10 +29,9 @@ import java.util.Objects;
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class OpeningOperationPlanAuditImpl implements OpeningOperationPlanAuditService {
|
||||
public class AuditOpeningOperationPlanImpl implements AuditOpeningOperationPlanService {
|
||||
|
||||
|
||||
@Resource
|
||||
private OpeningOperationPlanAuditDAO openingOperationPlanAuditDAO;
|
||||
@Resource
|
||||
private OpeningOperationPlanDAO openingOperationPlanDAO;
|
||||
@Resource
|
||||
@@ -43,6 +40,8 @@ public class OpeningOperationPlanAuditImpl implements OpeningOperationPlanAuditS
|
||||
private PreparationService preparationService;
|
||||
@Resource
|
||||
private EnterpriseUserDAO enterpriseUserDAO;
|
||||
@Resource
|
||||
private ShopAuditInfoDAO shopAuditInfoDAO;
|
||||
@Override
|
||||
public Long addNewPlanAudit(OpeningOperationPlanAuditRequest request) {
|
||||
log.info("addNewPlanAudit request:{}", JSONObject.toJSONString(request));
|
||||
@@ -52,7 +51,7 @@ public class OpeningOperationPlanAuditImpl implements OpeningOperationPlanAuditS
|
||||
shopAuditInfoDO.setSubmittedUserId(userId);
|
||||
shopAuditInfoDO.setSubmittedUserName(userInfoById.getName());
|
||||
shopAuditInfoDO.setAuditType(AuditTypeEnum.OPENING_OPERATION_PLAN.getCode());
|
||||
return openingOperationPlanAuditDAO.insertSelective(shopAuditInfoDO);
|
||||
return shopAuditInfoDAO.addAuditInfo(shopAuditInfoDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -65,7 +64,7 @@ public class OpeningOperationPlanAuditImpl implements OpeningOperationPlanAuditS
|
||||
}
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
try {
|
||||
Long auditId = openingOperationPlanAuditDAO.insertSelective(request.toShopAuditInfoDO());
|
||||
Long auditId = shopAuditInfoDAO.addAuditInfo(request.toShopAuditInfoDO());
|
||||
if (Objects.isNull(auditId)) {
|
||||
log.error("auditPlan audit is null");
|
||||
throw new ServiceException(ErrorCodeEnum.INSERT_OPENING_OPERATION_PLAN_AUDIT_FALSE);
|
||||
@@ -1,23 +1,16 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.dao.FirstOrderDAO;
|
||||
import com.cool.store.dao.OpeningOperationPlanAuditDAO;
|
||||
import com.cool.store.dao.ShopStageInfoDAO;
|
||||
import com.cool.store.dto.openPreparation.FirstOrderDTO;
|
||||
import com.cool.store.entity.FirstOrderDO;
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
import com.cool.store.enums.AuditResultTypeEnum;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mq.util.HttpRestTemplateService;
|
||||
import com.cool.store.request.FirstOrderRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.CoolStoreStartFlowService;
|
||||
import com.cool.store.service.FirstOrderService;
|
||||
import com.cool.store.service.PreparationService;
|
||||
@@ -47,14 +40,9 @@ public class FirstOrderServiceImp implements FirstOrderService {
|
||||
private String xfsgUrl;
|
||||
@Resource
|
||||
private PreparationService preparationService;
|
||||
;
|
||||
@Resource
|
||||
private HttpRestTemplateService httpRestTemplateService;
|
||||
@Resource
|
||||
private ShopService shopService;
|
||||
@Resource
|
||||
private OpeningOperationPlanAuditDAO openingOperationPlanAuditDAO;
|
||||
@Resource
|
||||
private ShopStageInfoDAO shopStageInfoDAO;
|
||||
@Resource
|
||||
private CoolStoreStartFlowService coolStoreStartFlowService;
|
||||
|
||||
@@ -10,14 +10,13 @@ import com.cool.store.dto.openPreparation.PlanLineDTO;
|
||||
import com.cool.store.dto.openPreparation.UserNameDTO;
|
||||
import com.cool.store.entity.OpeningOperationPlanDO;
|
||||
import com.cool.store.enums.AuditStatusEnum;
|
||||
import com.cool.store.enums.AuditTypeEnum;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.OpeningOperationPlanAuditRequest;
|
||||
import com.cool.store.request.OpeningOperationPlanRequest;
|
||||
import com.cool.store.request.PlanListRequest;
|
||||
import com.cool.store.service.OpeningOperationPlanAuditService;
|
||||
import com.cool.store.service.AuditOpeningOperationPlanService;
|
||||
import com.cool.store.service.OpeningOperationPlanService;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
import com.cool.store.vo.OpeningOperationPlanListVO;
|
||||
@@ -46,12 +45,10 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
@Resource
|
||||
private OpeningOperationPlanDAO openingOperationPlanDAO;
|
||||
@Resource
|
||||
private OpeningOperationPlanAuditService openingOperationPlanAuditService;
|
||||
private AuditOpeningOperationPlanService auditOpeningOperationPlanService;
|
||||
@Resource
|
||||
private EnterpriseUserDAO enterpriseUserDAO;
|
||||
@Resource
|
||||
private OpeningOperationPlanAuditDAO openingOperationPlanAuditDAO;
|
||||
@Resource
|
||||
private ShopInfoDAO shopInfoDAO;
|
||||
@Resource
|
||||
private LineInfoDAO lineInfoDAO;
|
||||
@@ -79,7 +76,7 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
}
|
||||
OpeningOperationPlanAuditRequest openingOperationPlanAuditRequest = new OpeningOperationPlanAuditRequest();
|
||||
openingOperationPlanAuditRequest.setShopId(request.getShopId());
|
||||
Long AuditId = openingOperationPlanAuditService.addNewPlanAudit(openingOperationPlanAuditRequest);
|
||||
Long AuditId = auditOpeningOperationPlanService.addNewPlanAudit(openingOperationPlanAuditRequest);
|
||||
if (Objects.isNull(AuditId) ){
|
||||
log.error("addNewPlan AuditId is null");
|
||||
throw new ServiceException(ErrorCodeEnum.INSERT_OPENING_OPERATION_PLAN_AUDIT_FALSE);
|
||||
|
||||
@@ -6,18 +6,14 @@ import com.cool.store.dto.openPreparation.FirstOrderDTO;
|
||||
import com.cool.store.entity.FirstOrderDO;
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
import com.cool.store.enums.AuditStatusEnum;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.FirstOrderRequest;
|
||||
import com.cool.store.request.OpeningOperationPlanAuditRequest;
|
||||
import com.cool.store.request.OpeningOperationPlanRequest;
|
||||
import com.cool.store.request.PlanListRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.vo.OpenPreparationFlushVO;
|
||||
import com.cool.store.vo.OpeningOperationPlanListVO;
|
||||
import com.cool.store.vo.OpeningOperationPlanVO;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -55,7 +51,7 @@ public class OpenPreparationController {
|
||||
@Resource
|
||||
private OpeningOperationPlanService openingOperationPlanService;
|
||||
@Resource
|
||||
private OpeningOperationPlanAuditService openingOperationPlanAuditService;
|
||||
private AuditOpeningOperationPlanService auditOpeningOperationPlanService;
|
||||
|
||||
@GetMapping("/flush")
|
||||
public ResponseResult<Boolean> flush(@RequestParam("shopId") Long shopId) {
|
||||
@@ -99,7 +95,7 @@ public class OpenPreparationController {
|
||||
@PostMapping("/openingOperationPlan/audit")
|
||||
@ApiOperation("审核运营方案")
|
||||
public ResponseResult auditPlan(@RequestBody OpeningOperationPlanAuditRequest request) {
|
||||
openingOperationPlanAuditService.auditPlan(request);
|
||||
auditOpeningOperationPlanService.auditPlan(request);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.vo.OpenPreparationFlushVO;
|
||||
import com.cool.store.vo.OpeningOperationPlanVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -23,7 +22,6 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
@@ -39,7 +37,7 @@ public class MiniOpenPreparationController {
|
||||
@Resource
|
||||
private OpeningOperationPlanService openingOperationPlanService;
|
||||
@Resource
|
||||
private OpeningOperationPlanAuditService openingOperationPlanAuditService;
|
||||
private AuditOpeningOperationPlanService auditOpeningOperationPlanService;
|
||||
@Resource
|
||||
private CoolStoreStartFlowService coolStoreStartFlowService;
|
||||
@Resource
|
||||
|
||||
@@ -51,8 +51,6 @@ public class XxlJobHandler {
|
||||
private ShopInfoDAO shopInfoDAO;
|
||||
@Resource
|
||||
private ShopStageInfoDAO shopStageInfoDAO;
|
||||
@Resource
|
||||
private OpeningOperationPlanAuditDAO openingOperationPlanAuditDAO;
|
||||
/**
|
||||
* 每天都将待体验门店信息变更到体验中
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user