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:
@@ -92,6 +92,13 @@ public interface ShopService {
|
||||
*/
|
||||
Integer updateShopInvestment(Long shopId,String updateUserId,String userId);
|
||||
|
||||
/**
|
||||
* 转让运营顾问
|
||||
* @param shopId
|
||||
* @param operationsConsultant
|
||||
* @return
|
||||
*/
|
||||
Boolean updateOperationsConsultant(Long shopId,String operationsConsultant);
|
||||
|
||||
/**
|
||||
* 门店结束跟进
|
||||
|
||||
@@ -48,6 +48,7 @@ import java.util.stream.Stream;
|
||||
import static com.cool.store.enums.ErrorCodeEnum.*;
|
||||
import static com.cool.store.enums.UserRoleEnum.*;
|
||||
import static com.cool.store.enums.WorkflowSubStageStatusEnum.*;
|
||||
import static com.cool.store.enums.point.ShopSubStageEnum.SHOP_STAGE_8;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
@@ -187,7 +188,7 @@ public class ShopServiceImpl implements ShopService {
|
||||
Map<Long, String> wantRegionMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaIds);
|
||||
List<ScheduleDTO> scheduleList = shopStageInfoDAO.getScheduleList(shopIds);
|
||||
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()));
|
||||
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()));
|
||||
@@ -491,6 +492,23 @@ public class ShopServiceImpl implements ShopService {
|
||||
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
|
||||
PointService pointService;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user