修改设计师和设计组接口

This commit is contained in:
shuo.wang
2025-06-16 15:24:50 +08:00
parent 87ae0108fa
commit 529e41a0af
9 changed files with 116 additions and 14 deletions

View File

@@ -243,7 +243,8 @@ public enum ErrorCodeEnum {
QUOTATION_URL_REQUIRED(131010,"请等待报价单提交",null), QUOTATION_URL_REQUIRED(131010,"请等待报价单提交",null),
DESIGN_URL_REQUIRED(131011,"请等待设计图提交",null), DESIGN_URL_REQUIRED(131011,"请等待设计图提交",null),
LEGAL_PERSON_NAME_NOT_SAME(131012,"法人姓名与加盟商姓名不一致",null), LEGAL_PERSON_NAME_NOT_SAME(131012,"法人姓名与加盟商姓名不一致",null),
UPDATE_DESIGN_LEADER(131019,"设计阶段状态不支持修改设计组",null),
UPDATE_DESIGN_USER(131022,"设计阶段状态不支持修改设计师",null),
TALLY_BOOK_NOT_EXIST(180001, "记账本数据不存在", null), TALLY_BOOK_NOT_EXIST(180001, "记账本数据不存在", null),
THIRD_API_ERROR(151001,"第三方服务异常->{0}",null), THIRD_API_ERROR(151001,"第三方服务异常->{0}",null),

View File

@@ -88,6 +88,7 @@ public enum MessageEnum {
MESSAGE_59("您有一个门店设计阶段报价任务待领取,请查收","门店名称:${storeName}\n加盟商姓名${partnerUsername}\n加盟商手机号码${partnerMobile}\n"), MESSAGE_59("您有一个门店设计阶段报价任务待领取,请查收","门店名称:${storeName}\n加盟商姓名${partnerUsername}\n加盟商手机号码${partnerMobile}\n"),
MESSAGE_60("您有一个门店已提交京东建店资料,请查收","门店名称:${storeName}\n加盟商姓名${partnerUsername}\n加盟商手机号码${partnerMobile}\n"), MESSAGE_60("您有一个门店已提交京东建店资料,请查收","门店名称:${storeName}\n加盟商姓名${partnerUsername}\n加盟商手机号码${partnerMobile}\n"),
MESSAGE_61("您有一个门店京东外卖初审已通过,请查收","门店名称:${storeName}\n加盟商姓名${partnerUsername}\n加盟商手机号码${partnerMobile}\n"), MESSAGE_61("您有一个门店京东外卖初审已通过,请查收","门店名称:${storeName}\n加盟商姓名${partnerUsername}\n加盟商手机号码${partnerMobile}\n"),
MESSAGE_62("您有一个门店设计阶段设计图待提交,请查收","门店名称:${storeName}\n加盟商姓名${partnerUsername}\n加盟商手机号码${partnerMobile}\n"),
; ;

View File

@@ -30,6 +30,7 @@ public class DecorationDesignInfoDAO {
} }
return decorationDesignInfoMapper.selectByPrimaryKey(id); return decorationDesignInfoMapper.selectByPrimaryKey(id);
} }
public List<DecorationDesignInfoDO> getByIds(List<Long> shopIds) { public List<DecorationDesignInfoDO> getByIds(List<Long> shopIds) {
if (CollectionUtils.isEmpty(shopIds)) { if (CollectionUtils.isEmpty(shopIds)) {
return new ArrayList<>(); return new ArrayList<>();
@@ -62,6 +63,18 @@ public class DecorationDesignInfoDAO {
return decorationDesignInfoMapper.getByDesignUserIdAndShopStage(userId, keyword); return decorationDesignInfoMapper.getByDesignUserIdAndShopStage(userId, keyword);
} }
public Integer updateDesignLeaderIdAndDesignUserIdInteger(Long shopId, String designLeaderId) {
if (shopId == null|| StringUtil.isEmpty(designLeaderId)){
return 0;
}
return decorationDesignInfoMapper.updateDesignLeaderIdAndDesignUserIdInteger(shopId, designLeaderId);
}
public Integer updateDesignUserId(Long shopId, String designUserId) {
if (shopId == null|| StringUtil.isEmpty(designUserId)){
return 0;
}
return decorationDesignInfoMapper.updateDesignUserId(shopId, designUserId);
}
} }

View File

@@ -18,5 +18,12 @@ public interface DecorationDesignInfoMapper extends Mapper<DecorationDesignInfoD
DecorationDesignInfoDO selectByShopId(Long shopId); DecorationDesignInfoDO selectByShopId(Long shopId);
List<PreparationCommonPendingVO> getByDesignUserIdAndShopStage(@Param("userId") String userId,@Param("keyword") String keyword); List<PreparationCommonPendingVO> getByDesignUserIdAndShopStage(@Param("userId") String userId,@Param("keyword") String keyword);
/**
* @Auther: wangshuo
* @Date: 2025/6/16
* @description:DesignUserId置空
*/
Integer updateDesignLeaderIdAndDesignUserIdInteger(@Param("shopId") Long shopId,@Param("designLeaderId") String designLeaderId);
Integer updateDesignUserId(@Param("shopId") Long shopId,@Param("designUserId") String designUserId);
} }

View File

@@ -27,6 +27,17 @@
<result column="design_submit_time" jdbcType="TIMESTAMP" property="designSubmitTime" /> <result column="design_submit_time" jdbcType="TIMESTAMP" property="designSubmitTime" />
<result column="quotation_submit_time" jdbcType="TIMESTAMP" property="quotationSubmitTime" /> <result column="quotation_submit_time" jdbcType="TIMESTAMP" property="quotationSubmitTime" />
</resultMap> </resultMap>
<update id="updateDesignLeaderIdAndDesignUserIdInteger">
update xfsg_decoration_design_info
set design_leader_id = #{designLeaderId},
design_user_id = null
where shop_id = #{shopId}
</update>
<update id="updateDesignUserId">
update xfsg_decoration_design_info
set design_user_id = #{designUserId}
where shop_id = #{shopId}
</update>
<select id="selectByShopId" resultMap="BaseResultMap"> <select id="selectByShopId" resultMap="BaseResultMap">
select select

View File

@@ -171,4 +171,8 @@ public interface DecorationService {
* @return * @return
*/ */
Boolean saveDecorationDesign(DecorationDesignRequest request, LoginUserInfo user); Boolean saveDecorationDesign(DecorationDesignRequest request, LoginUserInfo user);
Boolean updateDesignLeader(Long shopId, String userId);
Boolean updateDesignUser(Long shopId, String userId);
} }

View File

@@ -123,7 +123,7 @@ public class DecorationMeasureServiceImpl implements DecorationMeasureService {
map.put("partnerMobile", lineInfo.getMobile()); map.put("partnerMobile", lineInfo.getMobile());
map.put("storeName", shopInfo.getShopName()); map.put("storeName", shopInfo.getShopName());
commonService.sendQWMessage(Collections.singletonList(request.getDesignUserId()), commonService.sendQWMessage(Collections.singletonList(request.getDesignUserId()),
MessageEnum.MESSAGE_58, MessageEnum.MESSAGE_62,
map map
); );
} }

View File

@@ -828,6 +828,57 @@ public class DecorationServiceImpl implements DecorationService {
return Boolean.TRUE; return Boolean.TRUE;
} }
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean updateDesignLeader(Long shopId, String userId) {
if (Objects.isNull(shopId) || StringUtils.isEmpty(userId)) {
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
}
//设计阶段
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_9);
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90.getShopSubStageStatus())
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_901.getShopSubStageStatus())) {
throw new ServiceException(ErrorCodeEnum.UPDATE_DESIGN_LEADER);
}
decorationDesignInfoDAO.updateDesignLeaderIdAndDesignUserIdInteger(shopId, userId);
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90);
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId());
HashMap<String, String> map = new HashMap<>(4);
map.put("partnerUsername", lineInfo.getUsername());
map.put("partnerMobile", lineInfo.getMobile());
map.put("storeName", shopInfo.getShopName());
commonService.sendQWMessage(Collections.singletonList(userId),
MessageEnum.MESSAGE_58,
map
);
return true;
}
@Override
public Boolean updateDesignUser(Long shopId, String userId) {
if (Objects.isNull(shopId) || StringUtils.isEmpty(userId)) {
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
}
//设计阶段
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_9);
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_901.getShopSubStageStatus())) {
throw new ServiceException(ErrorCodeEnum.UPDATE_DESIGN_USER);
}
decorationDesignInfoDAO.updateDesignUserId(shopId, userId);
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId());
HashMap<String, String> map = new HashMap<>(4);
map.put("partnerUsername", lineInfo.getUsername());
map.put("partnerMobile", lineInfo.getMobile());
map.put("storeName", shopInfo.getShopName());
commonService.sendQWMessage(Collections.singletonList(userId),
MessageEnum.MESSAGE_62,
map
);
return true;
}
private DecorationDTO getDecorationDTO(Long shopId) { private DecorationDTO getDecorationDTO(Long shopId) {
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId); ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
if (Objects.isNull(shopInfo)) { if (Objects.isNull(shopInfo)) {

View File

@@ -193,4 +193,18 @@ public class PCDecorationController {
LoginUserInfo user = CurrentUserHolder.getUser(); LoginUserInfo user = CurrentUserHolder.getUser();
return ResponseResult.success(decorationService.saveDecorationDesign(request, user)); return ResponseResult.success(decorationService.saveDecorationDesign(request, user));
} }
@ApiOperation("修改设计组")
@GetMapping("/updateDesignLeader")
public ResponseResult<Boolean> updateDesignLeader(@RequestParam Long shopId, @RequestParam String leaderId) {
return ResponseResult.success(decorationService.updateDesignLeader(shopId, leaderId));
}
@ApiOperation("修改设计师")
@GetMapping("/updateDesignUser")
public ResponseResult<Boolean> updateDesignUser(@RequestParam Long shopId, @RequestParam String designerId) {
return ResponseResult.success(decorationService.updateDesignUser(shopId, designerId));
}
} }