修改设计师和设计组接口

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

@@ -171,4 +171,8 @@ public interface DecorationService {
* @return
*/
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("storeName", shopInfo.getShopName());
commonService.sendQWMessage(Collections.singletonList(request.getDesignUserId()),
MessageEnum.MESSAGE_58,
MessageEnum.MESSAGE_62,
map
);
}

View File

@@ -614,7 +614,7 @@ public class DecorationServiceImpl implements DecorationService {
//查询测量阶段的设计组长
DecorationMeasureDO measureDO = decorationMeasureDAO.getByShopId(shopId);
DecorationDesignVO decorationDesignVO = new DecorationDesignVO();
if (measureDO!=null){
if (measureDO != null) {
decorationDesignVO.setDesignLeaderId(measureDO.getDesignUserId());
String userName = enterpriseUserDAO.getUserName(measureDO.getDesignUserId());
decorationDesignVO.setDesignLeaderName(userName);
@@ -828,6 +828,57 @@ public class DecorationServiceImpl implements DecorationService {
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) {
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
if (Objects.isNull(shopInfo)) {