招商阶段钉钉消息通知
This commit is contained in:
@@ -47,6 +47,16 @@ public enum MessageEnum {
|
||||
MESSAGE_26("您有一个门店需要上传开业运营方案,请查收","##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_27("您有一个门店需要上传首批订货清单,请查收","##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_28("您有一个门店需要进行视觉验收,请查收","##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||
|
||||
MESSAGE_29("您有一份加盟申请书,请查收","##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n##### 意向加盟区域:${regionName}\n"),
|
||||
MESSAGE_30("您收到一份加盟意向协议信息审核,请查收","##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n##### 信息提交时间:${submitTime}\n"),
|
||||
MESSAGE_31("您提交的一份加盟意向协议OA审核未通过,请查收","##### 加盟商姓名:${partnerUsername}\n##### 信息提交时间:${submitTime}\n"),
|
||||
MESSAGE_32("您有一位加盟商待安排体验门店及体验时间,请查收","##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_33("您有一位加盟商已放弃门店体验,请查收","##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||
|
||||
|
||||
|
||||
|
||||
;
|
||||
|
||||
private String title;
|
||||
@@ -94,6 +104,8 @@ public enum MessageEnum {
|
||||
case MESSAGE_7:
|
||||
case MESSAGE_8:
|
||||
case MESSAGE_9:
|
||||
case MESSAGE_29:
|
||||
case MESSAGE_30:
|
||||
return domainUrl + "/dd-noticemsg?appId=" + appId + "&corpId=" + corpId + "&appUrl=" +
|
||||
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=clue×tamp=" + System.currentTimeMillis() + "&lineId=" + paramMap.get("lineId"), StandardCharsets.UTF_8.name());
|
||||
case MESSAGE_3:
|
||||
@@ -117,6 +129,9 @@ public enum MessageEnum {
|
||||
case MESSAGE_20:
|
||||
case MESSAGE_23:
|
||||
case MESSAGE_10_1:
|
||||
case MESSAGE_31:
|
||||
case MESSAGE_32:
|
||||
case MESSAGE_33:
|
||||
//跳转我的加盟商的加盟商详情都可以使用这个
|
||||
return domainUrl + "/dd-noticemsg?appId=" + appId + "&corpId=" + corpId + "&appUrl=" +
|
||||
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=franchiseeDetails×tamp=" + System.currentTimeMillis() + "&lineId=" + paramMap.get("lineId"), StandardCharsets.UTF_8.name());
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.cool.store.service.IntentAgreementService;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.utils.SecureUtil;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import com.cool.store.utils.poi.DateUtils;
|
||||
import com.cool.store.utils.poi.constant.Constants;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -25,6 +26,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
@@ -73,12 +75,6 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(IntentAgreementSubmitRequest request) {
|
||||
SigningBaseInfoDO signingBaseInfoDO = request.toSigningBaseInfoDO();
|
||||
// if (Objects.nonNull(request.getIdCardNo()) || Objects.nonNull(request.getBusinessLicenseCode())) {
|
||||
// SigningBaseInfoDO isExist = intentAgreementMapper.judge(request);
|
||||
// if (Objects.nonNull(isExist)) {
|
||||
// throw new ServiceException(ErrorCodeEnum.BUSINESS_LICENSE_OR_ID_CARD_REPEAT);
|
||||
// }
|
||||
// }
|
||||
boolean submitStatus = intentAgreementMapper.insert(signingBaseInfoDO);
|
||||
if (submitStatus) {
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByPartnerId(request.getPartnerId());
|
||||
@@ -87,6 +83,14 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
}
|
||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_63.getCode());
|
||||
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
|
||||
Map<String, String> requestMap = new HashMap<>();
|
||||
requestMap.put("partnerUsername",lineInfoDO.getUsername());
|
||||
requestMap.put("partnerMobile",lineInfoDO.getMobile());
|
||||
requestMap.put("lineId",String.valueOf(lineInfoDO.getId()));
|
||||
requestMap.put("submitTime", DateUtils.dateTimeNow(DateUtils.SPECIAL_DATE_START));
|
||||
commonService.sendMessage(Collections.singletonList(lineInfoDO.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_30,
|
||||
requestMap);
|
||||
return Boolean.TRUE;
|
||||
|
||||
}
|
||||
@@ -162,6 +166,14 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_80.getCode());
|
||||
lineInfo.setUpdateUserId(userId);
|
||||
lineInfoDAO.updateLineInfo(lineInfo);
|
||||
//message
|
||||
Map<String, String> requestMap = new HashMap<>();
|
||||
requestMap.put("partnerUsername",lineInfo.getUsername());
|
||||
requestMap.put("lineId",String.valueOf(lineInfo.getId()));
|
||||
requestMap.put("submitTime", DateUtils.dateTimeNow(DateUtils.SPECIAL_DATE_START));
|
||||
commonService.sendMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_31,
|
||||
requestMap);
|
||||
}
|
||||
//更新auditId
|
||||
intentAgreementMapper.updateAuditId(lineInfo.getId(), auditId);
|
||||
|
||||
@@ -20,6 +20,9 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
@@ -49,6 +52,9 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
@Resource
|
||||
LineInfoMapper lineInfoMapper;
|
||||
|
||||
@Resource
|
||||
CommonService commonService;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(JoinIntentionRequest request) {
|
||||
@@ -76,6 +82,16 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
MemberQuestionDO memberQuestionDO = request.toMemberQuestionDO();
|
||||
memberQuestionDO.setLineId(lineInfoParam.getId());
|
||||
joinIntentionMapper.insertOrUpdate(memberQuestionDO);
|
||||
|
||||
Map<String, String> requestMap = new HashMap<>();
|
||||
requestMap.put("partnerUsername",lineInfoParam.getUsername());
|
||||
requestMap.put("partnerMobile",lineInfoParam.getMobile());
|
||||
requestMap.put("lineId",String.valueOf(lineInfoParam.getId()));
|
||||
HyOpenAreaInfoDO openAreaInfoDO = openAreaInfoMapper.selectById(lineInfoParam.getWantShopAreaId());
|
||||
requestMap.put("regionName",openAreaInfoDO.getAreaName());
|
||||
commonService.sendMessage(Collections.singletonList(lineInfoParam.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_29,
|
||||
requestMap);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -145,6 +145,10 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
MemberQuestionDO memberQuestionDO = joinIntentionMapper.getByLineId(shopInfoDO.getLineId());
|
||||
log.info("submitSignFranchise franchiseAgreementRequest :{}",JSONObject.toJSONString(franchiseAgreementRequest));
|
||||
ResponseResult responseResult = coolStoreStartFlowService.franchiseAgreement(franchiseAgreementRequest, memberQuestionDO.getJoinType());
|
||||
//更新状态为加盟商
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||
lineInfoDO.setJoinStatus(2);
|
||||
lineInfoMapper.insertOrUpdate(lineInfoDO);
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_83);
|
||||
return responseResult;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.*;
|
||||
import com.cool.store.request.TrainingExperienceDistributionRequest;
|
||||
import com.cool.store.service.TrainingExperienceService;
|
||||
import com.cool.store.utils.poi.DateUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -42,15 +43,13 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
|
||||
@Resource
|
||||
EnterpriseUserMapper enterpriseUserMapper;
|
||||
|
||||
@Resource
|
||||
RegionMapper regionMapper;
|
||||
|
||||
@Resource
|
||||
UserAuthMappingMapper userAuthMappingMapper;
|
||||
|
||||
@Resource
|
||||
EnterpriseUserRoleMapper enterpriseUserRoleMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
private CommonService commonService;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean distribution(TrainingExperienceDistributionRequest request) {
|
||||
@@ -69,6 +68,15 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
|
||||
if (currentDate.before(request.getExperienceStartTime())) {
|
||||
leaseBaseInfoDO.setExperienceStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode());
|
||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85.getCode());
|
||||
//message
|
||||
Map<String, String> requestMap = new HashMap<>();
|
||||
LineInfoDO byLineId = lineInfoMapper.getByLineId(request.getLineId());
|
||||
requestMap.put("partnerUsername",byLineId.getUsername());
|
||||
requestMap.put("partnerMobile",byLineId.getMobile());
|
||||
requestMap.put("lineId",String.valueOf(request.getLineId()));
|
||||
commonService.sendMessage(Collections.singletonList(byLineId.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_32,
|
||||
requestMap);
|
||||
} else if (currentDate.after(request.getExperienceStartTime()) || currentDate.before(request.getExperienceEndTime())) {
|
||||
leaseBaseInfoDO.setExperienceStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_90.getCode());
|
||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_90.getCode());
|
||||
@@ -98,6 +106,14 @@ public class TrainingExperienceServiceImpl extends LineFlowService implements Tr
|
||||
lineInfoDO.setWorkflowSubStage(WorkflowSubStageEnum.STORE_EXPERIENCE.getCode());
|
||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.STORE_EXPERIENCE_95.getCode());
|
||||
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
|
||||
|
||||
Map<String, String> requestMap = new HashMap<>();
|
||||
requestMap.put("partnerUsername",lineInfoDO.getUsername());
|
||||
requestMap.put("partnerMobile",lineInfoDO.getMobile());
|
||||
requestMap.put("lineId",String.valueOf(lineInfoDO.getId()));
|
||||
commonService.sendMessage(Collections.singletonList(lineInfoDO.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_33,
|
||||
requestMap);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user