diff --git a/coolstore-partner-common/src/main/java/com/cool/store/enums/ShopAuditInfoTypeEnum.java b/coolstore-partner-common/src/main/java/com/cool/store/enums/ShopAuditInfoTypeEnum.java deleted file mode 100644 index f45aad368..000000000 --- a/coolstore-partner-common/src/main/java/com/cool/store/enums/ShopAuditInfoTypeEnum.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.cool.store.enums; - -/** - * @Auther: WangShuo - * @Date: 2024/04/22/下午4:42 - * @Version 1.0 - * @注释: - */ -public enum ShopAuditInfoTypeEnum { - - VISUAL_ACCEPTANCE(0,"视觉审批"), - TRAINING_REGISTRATION_APPROVAL(1,"培训登记审批 "), - OPENING_OPERATION_PLAN(2,"开业运营方案"), - LICENSE_APPROVAL(3,"证照审批"); - - private Integer code; - private String msg; - - ShopAuditInfoTypeEnum(int code, String msg) { - this.code = code; - this.msg = msg; - } - - public Integer getCode() { - return code; - } - - public String getMsg() { - return msg; - } - -} diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/FirstOrderServiceImp.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/FirstOrderServiceImp.java index 268e22cb8..bfed20e23 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/FirstOrderServiceImp.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/FirstOrderServiceImp.java @@ -36,7 +36,7 @@ public class FirstOrderServiceImp implements FirstOrderService { @Override public Integer saveOrder(FirstOrderDO order) { String userId = CurrentUserHolder.getUserId(); - log.info("save order:{}",order); + log.info("save order:{}",JSONObject.toJSONString(order)); if (order == null ) { throw new ServiceException(ErrorCodeEnum.FIRST_ORDER_PARAM_NULL); } diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/OpeningOperationPlanImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/OpeningOperationPlanImpl.java index 47e9632ea..7f260c02e 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/OpeningOperationPlanImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/OpeningOperationPlanImpl.java @@ -1,5 +1,6 @@ package com.cool.store.service.impl; +import com.alibaba.fastjson.JSONObject; import com.cool.store.constants.CommonConstants; import com.cool.store.context.CurrentUserHolder; import com.cool.store.dao.*; @@ -8,8 +9,8 @@ import com.cool.store.dto.openPreparation.OpeningOperationPlanDTO; import com.cool.store.dto.openPreparation.PlanLineDTO; import com.cool.store.dto.openPreparation.UserInfoDTO; import com.cool.store.entity.OpeningOperationPlanDO; +import com.cool.store.enums.AuditTypeEnum; import com.cool.store.enums.ErrorCodeEnum; -import com.cool.store.enums.ShopAuditInfoTypeEnum; import com.cool.store.enums.point.ShopSubStageStatusEnum; import com.cool.store.exception.ServiceException; import com.cool.store.request.OpeningOperationPlanAuditRequest; @@ -59,7 +60,7 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService { @Override @Transactional(rollbackFor = Exception.class) public Long savePlan(OpeningOperationPlanRequest request) { - log.info("addNewPlan request:{}", request); + log.info("addNewPlan request:{}", JSONObject.toJSONString(request)); if (request.getActivityTheme().length() > CommonConstants.MAX_LENGTH_ONE_HUNDRED){ log.error("addNewPlan ActivityTheme length error"); throw new ServiceException(ErrorCodeEnum.ACTIVITY_THEME_LENGTH_FALSE); @@ -77,7 +78,7 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService { } OpeningOperationPlanAuditRequest openingOperationPlanAuditRequest = new OpeningOperationPlanAuditRequest(); openingOperationPlanAuditRequest.setShopId(request.getShopId()); - openingOperationPlanAuditRequest.setAuditType(ShopAuditInfoTypeEnum.OPENING_OPERATION_PLAN.getCode()); + openingOperationPlanAuditRequest.setAuditType(AuditTypeEnum.OPENING_OPERATION_PLAN.getCode()); openingOperationPlanAuditRequest.setSubmittedUserName(userName); openingOperationPlanAuditRequest.setSubmittedUserId(userId); Long AuditId = openingOperationPlanAuditService.addNewPlanAudit(openingOperationPlanAuditRequest); @@ -150,12 +151,12 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService { @Override public List getPlanListPage(PlanListRequest request) { - log.info("getPlanListPage request:{}", request); + log.info("getPlanListPage request:{}", JSONObject.toJSONString(request)); //根据ShopName等查询门店名字1,门店代码1,开店负责人1,督导id1 Page openPlanShopList = shopInfoDAO. getOpenPlanShopListByShopName(request.getShopName(), request.getBigName(), request.getFightName(), request.getPageNum(), request.getPageSize()); - log.info("getPlanListPage openPlanShopList:{}", openPlanShopList); + log.info("getPlanListPage openPlanShopList:{}",JSONObject.toJSONString(openPlanShopList) ); List openingOperationPlanListVOList= openPlanShopList.stream().map(dto -> { OpeningOperationPlanListVO vO = new OpeningOperationPlanListVO(); vO.setShopId(dto.getShopId()); @@ -168,7 +169,7 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService { vO.setFightName(dto.getFightName()); return vO; }).collect(Collectors.toList()); - log.info("getPlanListPage openingOperationPlanVOList:{}", openingOperationPlanListVOList); + log.info("getPlanListPage openingOperationPlanVOList:{}", JSONObject.toJSONString(openingOperationPlanListVOList) ); //提交时间,审核状态 List shopIdList = openPlanShopList.stream() .map(OpenPlanShopInfoDTO::getShopId) @@ -177,37 +178,37 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService { openingOperationPlanDTO.setPlanStartDate(request.getPlanStartDate()); openingOperationPlanDTO.setPlanEndDate(request.getPlanEndDate()); List openingOperationPlanDTOS = openingOperationPlanDAO.selectConditionPlanList(shopIdList, openingOperationPlanDTO); - log.info("getPlanListPage openingOperationPlanDTOS:{}", openingOperationPlanDTOS); + log.info("getPlanListPage openingOperationPlanDTOS:{}",JSONObject.toJSONString(openingOperationPlanDTOS) ); Map voPlanMap = openingOperationPlanDTOS.stream() .collect(Collectors.toMap(OpeningOperationPlanDTO::getShopId, vo -> vo)); - log.info("getPlanListPage voPlanMap:{}", voPlanMap); + log.info("getPlanListPage voPlanMap:{}",JSONObject.toJSONString(voPlanMap) ); //开店负责人name List shopManagerUserIdList = openPlanShopList.stream() .map(OpenPlanShopInfoDTO::getShopManagerUserId) .collect(Collectors.toList()); List shopManagerList = enterpriseUserDAO.getNameByUserId(shopManagerUserIdList); - log.info("getPlanListPage hopManagerList :{}", shopManagerList); + log.info("getPlanListPage hopManagerList :{}",JSONObject.toJSONString(shopManagerList) ); Map voManagerMap = shopManagerList.stream() .collect(Collectors.toMap(UserInfoDTO::getUserId, vo -> vo)); - log.info("getPlanListPage voManagerMap:{}", voManagerMap); + log.info("getPlanListPage voManagerMap:{}", JSONObject.toJSONString(voManagerMap) ); //督导name List supervisorUserIdList = openPlanShopList.stream() .map(OpenPlanShopInfoDTO::getSupervisorUserId) .collect(Collectors.toList()); List supervisorList = enterpriseUserDAO.getNameByUserId(supervisorUserIdList); - log.info("getPlanListPage supervisorList :{}", supervisorList); + log.info("getPlanListPage supervisorList :{}",JSONObject.toJSONString(supervisorList) ); Map voSupervisorList = supervisorList.stream() .collect(Collectors.toMap(UserInfoDTO::getUserId, vo -> vo)); - log.info("getPlanListPage openingOperationPlanVOList:{}", openingOperationPlanListVOList); + log.info("getPlanListPage openingOperationPlanVOList:{}", JSONObject.toJSONString(openingOperationPlanListVOList) ); //加盟商姓名,手机号,招商name List lines = openPlanShopList.stream() .map(OpenPlanShopInfoDTO::getLineId) .collect(Collectors.toList()); List getLines = lineInfoDAO.getLines(lines); - log.info("getPlanListPage getLines:{}", getLines); + log.info("getPlanListPage getLines:{}",JSONObject.toJSONString(getLines) ); Map linemap = getLines.stream() .collect(Collectors.toMap(PlanLineDTO::getLineId, vo -> vo)); - log.info("getPlanListPage linemap:{}", linemap); + log.info("getPlanListPage linemap:{}",JSONObject.toJSONString(linemap) ); for (OpeningOperationPlanListVO vo:openingOperationPlanListVOList){ vo.setSubmissionTime(voPlanMap.get(vo.getShopId()).getSubmissionTime()); vo.setResultType(voPlanMap.get(vo.getShopId()).getResultType()); diff --git a/coolstore-partner-web/src/main/java/com/cool/store/controller/webc/MiniOpeningOperationPlanController.java b/coolstore-partner-web/src/main/java/com/cool/store/controller/webc/MiniOpeningOperationPlanController.java index 541ec8788..9826b3422 100644 --- a/coolstore-partner-web/src/main/java/com/cool/store/controller/webc/MiniOpeningOperationPlanController.java +++ b/coolstore-partner-web/src/main/java/com/cool/store/controller/webc/MiniOpeningOperationPlanController.java @@ -1,10 +1,19 @@ package com.cool.store.controller.webc; +import com.cool.store.response.ResponseResult; +import com.cool.store.service.OpeningOperationPlanAuditService; +import com.cool.store.service.OpeningOperationPlanService; +import com.cool.store.vo.OpeningOperationPlanVO; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import javax.annotation.Resource; + /** * @Auther: WangShuo * @Date: 2024/04/24/下午7:32 @@ -16,5 +25,15 @@ import org.springframework.web.bind.annotation.RestController; @Api(tags = "开业运营方案操作") @Slf4j public class MiniOpeningOperationPlanController { + @Resource + private OpeningOperationPlanService openingOperationPlanService; + @Resource + private OpeningOperationPlanAuditService openingOperationPlanAuditService; + @GetMapping("/getPlan") + @ApiOperation("查询开业运营方案") + public ResponseResult getPlan(@RequestParam Long planId){ + OpeningOperationPlanVO plan = openingOperationPlanService.getPlanById(planId); + return ResponseResult.success(plan); + } }