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