修改运营方案

This commit is contained in:
shuo.wang
2024-05-20 18:10:00 +08:00
parent 9be6d0747e
commit c277bbb6cb
3 changed files with 30 additions and 43 deletions

View File

@@ -77,31 +77,27 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
throw new ServiceException(ErrorCodeEnum.SURVEYRESULT_LENGTH_FALSE);
}
String userId = userInfo.getUserId();
try {
OpeningOperationPlanDO selectByShopId = openingOperationPlanDAO.selectByShopId(request.getShopId());
Long planId;
OpeningOperationPlanDO openingOperationPlanDO = request.toOpeningOperationPlanDO();
openingOperationPlanDO.setResultType(AuditStatusEnum.TODO.getCode());
if (!Objects.isNull(selectByShopId)) {
//提交修改
openingOperationPlanDO.setId(selectByShopId.getId());
openingOperationPlanDO.setUpdateTime(new Date());
openingOperationPlanDO.setUpdateUserId(userId);
planId = openingOperationPlanDAO.updateSelective(openingOperationPlanDO);
} else {
//新增
openingOperationPlanDO.setSubmissionTime(new Date());
openingOperationPlanDO.setSubmittedUserId(userId);
openingOperationPlanDO.setCreateTime(new Date());
openingOperationPlanDO.setCreateUserId(userId);
planId = openingOperationPlanDAO.insertSelective(openingOperationPlanDO);
}
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_141);
return planId;
} catch (Exception e) {
log.error("addNewPlan Exception:{}", e);
return null;
OpeningOperationPlanDO selectByShopId = openingOperationPlanDAO.selectByShopId(request.getShopId());
Long planId;
OpeningOperationPlanDO openingOperationPlanDO = request.toOpeningOperationPlanDO();
openingOperationPlanDO.setResultType(AuditStatusEnum.TODO.getCode());
if (!Objects.isNull(selectByShopId)) {
//提交修改
openingOperationPlanDO.setId(selectByShopId.getId());
openingOperationPlanDO.setUpdateTime(new Date());
openingOperationPlanDO.setUpdateUserId(userId);
planId = openingOperationPlanDAO.updateSelective(openingOperationPlanDO);
} else {
//新增
openingOperationPlanDO.setSubmissionTime(new Date());
openingOperationPlanDO.setSubmittedUserId(userId);
openingOperationPlanDO.setCreateTime(new Date());
openingOperationPlanDO.setCreateUserId(userId);
planId = openingOperationPlanDAO.insertSelective(openingOperationPlanDO);
}
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_141);
return planId;
}
@Override
@@ -124,7 +120,6 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
openingOperationPlanVO.setShopName(shopInfo.getShopName());
return openingOperationPlanVO;
}
return null;
}
@@ -219,12 +214,12 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
@Override
public Boolean getStatus(Long shopId) {
try{
try {
ShopInfoDO shopInfo = shopService.getShopInfo(shopId);
String shopNum = shopInfo.getStoreNum();
Boolean firstOrder = coolStoreStartFlowService.getFirstOrder(shopNum);
return firstOrder;
}catch (Exception e){
} catch (Exception e) {
log.error("获取鲜丰订货金异常或更新状态失败");
throw new ServiceException(ErrorCodeEnum.YLF_ERROR);
}