diff --git a/coolstore-partner-model/src/main/java/com/cool/store/request/OpeningOperationPlanRequest.java b/coolstore-partner-model/src/main/java/com/cool/store/request/OpeningOperationPlanRequest.java index 21421ec0a..97b2176a5 100644 --- a/coolstore-partner-model/src/main/java/com/cool/store/request/OpeningOperationPlanRequest.java +++ b/coolstore-partner-model/src/main/java/com/cool/store/request/OpeningOperationPlanRequest.java @@ -28,13 +28,13 @@ public class OpeningOperationPlanRequest { private String surveyResult; @ApiModelProperty("调研结果url") - private List surveyResultUrl; + private String surveyResultUrl; @ApiModelProperty("活动主题") private String activityTheme; @ApiModelProperty("活动主题url") - private List activityThemeUrl; + private String activityThemeUrl; @ApiModelProperty("筹备人员ids") private List preparationUserIds; @@ -49,12 +49,8 @@ public class OpeningOperationPlanRequest { openingOperationPlanDO.setShopId(this.shopId); openingOperationPlanDO.setPlanSource(this.planSource); openingOperationPlanDO.setSurveyResult(this.surveyResult); - if (CollectionUtils.isNotEmpty(this.surveyResultUrl)) { - openingOperationPlanDO.setSurveyResultUrl(String.join(",", this.surveyResultUrl)); - } - if (CollectionUtils.isNotEmpty(this.activityThemeUrl)) { - openingOperationPlanDO.setActivityThemeUrl(String.join(",", this.activityThemeUrl)); - } + openingOperationPlanDO.setSurveyResultUrl(this.surveyResultUrl); + openingOperationPlanDO.setActivityThemeUrl( this.activityThemeUrl); if (CollectionUtils.isNotEmpty(this.preparationUserIds)) { openingOperationPlanDO.setPreparationUserIds(String.join(",", this.preparationUserIds)); } diff --git a/coolstore-partner-model/src/main/java/com/cool/store/vo/OpeningOperationPlanVO.java b/coolstore-partner-model/src/main/java/com/cool/store/vo/OpeningOperationPlanVO.java index 66ef3e6fc..eafe1c564 100644 --- a/coolstore-partner-model/src/main/java/com/cool/store/vo/OpeningOperationPlanVO.java +++ b/coolstore-partner-model/src/main/java/com/cool/store/vo/OpeningOperationPlanVO.java @@ -26,13 +26,13 @@ public class OpeningOperationPlanVO { private String surveyResult; @ApiModelProperty("调研结果url") - private List surveyResultUrl; + private String surveyResultUrl; @ApiModelProperty("活动主题") private String activityTheme; @ApiModelProperty("活动主题url") - private List activityThemeUrl; + private String activityThemeUrl; @ApiModelProperty("筹备人员name") private List preparationUsers; @@ -61,12 +61,8 @@ public class OpeningOperationPlanVO { this.submittedUserId = openingOperationPlanDO.getSubmittedUserId(); this.submissionTime = openingOperationPlanDO.getSubmissionTime(); this.routeCompleted = openingOperationPlanDO.getRouteCompleted(); - if (StringUtils.isNotBlank(openingOperationPlanDO.getActivityThemeUrl())) { - this.activityThemeUrl = Arrays.asList(openingOperationPlanDO.getActivityThemeUrl().split(",")) ; - } - if (StringUtils.isNotBlank(openingOperationPlanDO.getSurveyResultUrl())) { - this.surveyResultUrl = Arrays.asList(openingOperationPlanDO.getSurveyResultUrl().split(",")) ; - } + this.activityThemeUrl = openingOperationPlanDO.getActivityThemeUrl(); + this.surveyResultUrl = openingOperationPlanDO.getSurveyResultUrl(); this.activityTheme = openingOperationPlanDO.getActivityTheme(); this.surveyResult = openingOperationPlanDO.getSurveyResult(); } 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 7223896b1..ee29b77ea 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 @@ -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); }