Merge #42 into master from cc_20260123_operations_consultant

feat:加盟合同阶段未完成 不支持调整运营顾问

* cc_20260123_operations_consultant: (3 commits squashed)

  - feat:门店转让运营顾问

  - Merge branch 'master' into cc_20260123_operations_consultant

  - feat:加盟合同阶段未完成 不支持调整运营顾问

Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>
Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>

CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/42
This commit is contained in:
正新
2026-02-06 07:45:10 +00:00
parent d9d7431b50
commit ef2e5ce17f
4 changed files with 33 additions and 1 deletions

View File

@@ -324,6 +324,7 @@ public enum ErrorCodeEnum {
JOIN_MODE_NOT_ALLOW_OPERATE(1610012,"加盟部人员只能新建加盟店或联营店,请确认!",null), JOIN_MODE_NOT_ALLOW_OPERATE(1610012,"加盟部人员只能新建加盟店或联营店,请确认!",null),
STORE_NOT_FIND(1610013,"门店不存在",null), STORE_NOT_FIND(1610013,"门店不存在",null),
SHOP_NAME_INVALID(1610014, "门店名称包含禁止关键词",null), SHOP_NAME_INVALID(1610014, "门店名称包含禁止关键词",null),
CONTRACT_STAGE_NO_COMPLETE(1610015, "合同签约阶段未完成,无法分配运营顾问!",null),
//装修 //装修
TEAM_USED(1612001,"该装修团队有门店使用,无法删除,请确认!",null), TEAM_USED(1612001,"该装修团队有门店使用,无法删除,请确认!",null),
CURRENT_BRAND_SORT_NUMBER_EXIST(16100007,"当前品牌已存在该排序数字!",null), CURRENT_BRAND_SORT_NUMBER_EXIST(16100007,"当前品牌已存在该排序数字!",null),

View File

@@ -92,6 +92,13 @@ public interface ShopService {
*/ */
Integer updateShopInvestment(Long shopId,String updateUserId,String userId); Integer updateShopInvestment(Long shopId,String updateUserId,String userId);
/**
* 转让运营顾问
* @param shopId
* @param operationsConsultant
* @return
*/
Boolean updateOperationsConsultant(Long shopId,String operationsConsultant);
/** /**
* 门店结束跟进 * 门店结束跟进

View File

@@ -48,6 +48,7 @@ import java.util.stream.Stream;
import static com.cool.store.enums.ErrorCodeEnum.*; import static com.cool.store.enums.ErrorCodeEnum.*;
import static com.cool.store.enums.UserRoleEnum.*; import static com.cool.store.enums.UserRoleEnum.*;
import static com.cool.store.enums.WorkflowSubStageStatusEnum.*; import static com.cool.store.enums.WorkflowSubStageStatusEnum.*;
import static com.cool.store.enums.point.ShopSubStageEnum.SHOP_STAGE_8;
/** /**
* @author zhangchenbiao * @author zhangchenbiao
@@ -187,7 +188,7 @@ public class ShopServiceImpl implements ShopService {
Map<Long, String> wantRegionMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaIds); Map<Long, String> wantRegionMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaIds);
List<ScheduleDTO> scheduleList = shopStageInfoDAO.getScheduleList(shopIds); List<ScheduleDTO> scheduleList = shopStageInfoDAO.getScheduleList(shopIds);
Map<Long, ScheduleDTO> scheduleMap = scheduleList.stream().collect(Collectors.toMap(ScheduleDTO::getShopId, x -> x)); Map<Long, ScheduleDTO> scheduleMap = scheduleList.stream().collect(Collectors.toMap(ScheduleDTO::getShopId, x -> x));
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStageList(shopIds, ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage()); List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStageList(shopIds, SHOP_STAGE_8.getShopSubStage());
Map<Long, ShopStageInfoDO> stageMap = subStageList.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, Function.identity())); Map<Long, ShopStageInfoDO> stageMap = subStageList.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, Function.identity()));
List<Long> regionIds = shopList.stream().flatMap(v -> Stream.of(v.getRegionId(), v.getInvestRegionId())).collect(Collectors.toList()); List<Long> regionIds = shopList.stream().flatMap(v -> Stream.of(v.getRegionId(), v.getInvestRegionId())).collect(Collectors.toList());
regionIds.addAll(Optional.of(shopList).orElse(Collections.emptyList()).stream().map(ShopInfoDO::getManagerRegionId).collect(Collectors.toList())); regionIds.addAll(Optional.of(shopList).orElse(Collections.emptyList()).stream().map(ShopInfoDO::getManagerRegionId).collect(Collectors.toList()));
@@ -491,6 +492,23 @@ public class ShopServiceImpl implements ShopService {
return shopInfoDAO.updateShopInfo(shopInfo); return shopInfoDAO.updateShopInfo(shopInfo);
} }
@Override
public Boolean updateOperationsConsultant(Long shopId, String operationsConsultant) {
if (StringUtils.isEmpty(operationsConsultant)||Objects.isNull(shopId)){
throw new ServiceException(PARAMS_VALIDATE_ERROR);
}
log.info("updateOperationsConsultant shopId:{},operationsConsultant:{}",shopId,operationsConsultant);
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, SHOP_STAGE_8);
//缴费阶段未完成 不能分配运营顾问
if (!ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_84.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())){
throw new ServiceException(CONTRACT_STAGE_NO_COMPLETE);
}
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
shopInfo.setOperationsConsultant(operationsConsultant);
shopInfoDAO.updateShopInfo(shopInfo);
return Boolean.TRUE;
}
@Resource @Resource
PointService pointService; PointService pointService;

View File

@@ -110,6 +110,12 @@ public class PCShopController {
return ResponseResult.success(shopService.updateShopInvestment(shopId, updateUserId, userId)); return ResponseResult.success(shopService.updateShopInvestment(shopId, updateUserId, userId));
} }
@ApiOperation("门店转让运营顾问")
@GetMapping("/updateOperationsConsultant")
public ResponseResult<Boolean> updateOperationsConsultant(@RequestParam("shopId") Long shopId, @RequestParam("updateUserId") String updateUserId) {
return ResponseResult.success(shopService.updateOperationsConsultant(shopId, updateUserId));
}
@ApiOperation("门店转让记录") @ApiOperation("门店转让记录")
@GetMapping("/getTransferLogPage") @GetMapping("/getTransferLogPage")
@ApiImplicitParams({ @ApiImplicitParams({