add 企微通知
This commit is contained in:
@@ -1,12 +1,15 @@
|
|||||||
package com.cool.store.enums;
|
package com.cool.store.enums;
|
||||||
|
|
||||||
import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils;
|
import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils;
|
||||||
|
import com.cool.store.constants.CommonConstants;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import java.util.StringJoiner;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author zhangchenbiao
|
* @author zhangchenbiao
|
||||||
@@ -14,15 +17,16 @@ import java.util.Objects;
|
|||||||
* @Description:
|
* @Description:
|
||||||
* @date 2024-03-27 10:50
|
* @date 2024-03-27 10:50
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
public enum MessageEnum {
|
public enum MessageEnum {
|
||||||
|
|
||||||
MESSAGE_1("您有一份加盟意向申请,请查收。", "##### 加盟商姓名:${partnerUsername}\n##### 手机号码:${partnerMobile}\n##### 意向加盟区域:${wantShopName}\n"),
|
MESSAGE_1("您有一份加盟意向申请,请查收。", "加盟商姓名:${partnerUsername}\n手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_2("您收到一份邀约面谈预约,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 预约时间:${appointmentTime}\n"),
|
MESSAGE_2("您收到一份邀约面谈预约,请查收", "加盟商姓名:${partnerUsername}\n预约时间:${appointmentTime}\n"),
|
||||||
MESSAGE_3("您收到一份一次面审预约,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 预约时间:${appointmentTime}\n"),
|
MESSAGE_3("您收到一份一次面审预约,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 预约时间:${appointmentTime}\n"),
|
||||||
MESSAGE_3_1("您的线索已预约一次面审,请关注", "##### 加盟商姓名:${partnerUsername}\n面审官:${interviewUsername}\n##### 预约时间:${appointmentTime}\n"),
|
MESSAGE_3_1("您的线索已预约一次面审,请关注", "##### 加盟商姓名:${partnerUsername}\n面审官:${interviewUsername}\n##### 预约时间:${appointmentTime}\n"),
|
||||||
MESSAGE_4("您有线索未通过面审,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 面审时间:${interviewTime}\n##### 面审官:${interviewUsername}\n"),
|
MESSAGE_4("您有线索未通过面审,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 面审时间:${interviewTime}\n##### 面审官:${interviewUsername}\n"),
|
||||||
MESSAGE_5("您收到一份缴纳意向金审核,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 缴费时间:${payTime}\n"),
|
MESSAGE_5("您收到一份缴纳意向金审核,请查收", "加盟商姓名:${partnerUsername}\n手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_6("您收到一份加盟意向协议信息审核,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 手机号码:${partnerMobile}\n##### 信息提交时间:${submitTime}\n"),
|
MESSAGE_6("您有一份加盟意向协议待提交,请查收", "加盟商姓名:${partnerUsername}\n手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_7("您提交的一份加盟意向协议OA审核未通过,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 审批提交时间:${submitTime}\n"),
|
MESSAGE_7("您提交的一份加盟意向协议OA审核未通过,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 审批提交时间:${submitTime}\n"),
|
||||||
MESSAGE_8("您有一位加盟商待安排体验门店及体验时间,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 手机号码:${partnerMobile}\n"),
|
MESSAGE_8("您有一位加盟商待安排体验门店及体验时间,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_9("您有一位加盟商已放弃门店体验,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 手机号码:${partnerMobile}\n"),
|
MESSAGE_9("您有一位加盟商已放弃门店体验,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 手机号码:${partnerMobile}\n"),
|
||||||
@@ -31,20 +35,20 @@ public enum MessageEnum {
|
|||||||
MESSAGE_11("您的一个铺位已审核通过,请查收", "##### 铺位名称:${pointName}\n##### 铺位地址:${pointAddress}\n"),
|
MESSAGE_11("您的一个铺位已审核通过,请查收", "##### 铺位名称:${pointName}\n##### 铺位地址:${pointAddress}\n"),
|
||||||
MESSAGE_12("您的一个铺位审核未通过,请查收", "##### 铺位名称:${pointName}\n##### 铺位地址:${pointAddress}\n##### 未通过原因:${reason}\n"),
|
MESSAGE_12("您的一个铺位审核未通过,请查收", "##### 铺位名称:${pointName}\n##### 铺位地址:${pointAddress}\n##### 未通过原因:${reason}\n"),
|
||||||
MESSAGE_13("您有一个铺位需要审核,请查收", "##### 铺位名称:${pointName}\n##### 铺位地址:${pointAddress}\n"),
|
MESSAGE_13("您有一个铺位需要审核,请查收", "##### 铺位名称:${pointName}\n##### 铺位地址:${pointAddress}\n"),
|
||||||
MESSAGE_14("已为您分配一位加盟商,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 手机号码:${partnerMobile}\n##### 意向加盟区域:${wantShopName}\n"),
|
MESSAGE_14("已为您分配一位加盟商,待推送铺位,请查收", "加盟商姓名:${partnerUsername}\n手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_15("您有一份加盟商上传的租赁合同待审核,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 提交时间:${submitTime}\n"),
|
MESSAGE_15("您有一份加盟商上传的租赁合同待审核,请查收", " 加盟商姓名:${partnerUsername}\n手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_16("您有一家门店待提交系统建店申请,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_16("您有一家门店待提交系统建店申请,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_16_1("您有一家门店待提交系统建店申请,请查收", "##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_16_1("您有一家门店待提交系统建店申请,请查收", "##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_17("您收到一份证照信息审核申请,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_17("您收到一份证照信息审核申请,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_18("您有一个门店已缴纳加盟费/保证金,请审核", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_18("您有一个门店已缴纳加盟费/保证金,请审核", " 门店名称:${storeName}\n 加盟商姓名:${partnerName}\n 加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_19("您有一个门店待提交加盟合同审核,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_19("您有一个门店待提交加盟合同,请查收", "门店名称:${storeName}\n加盟商姓名:${partnerName}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_20("您有一个门店的加盟合同审核未通过,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_20("您有一个门店的加盟合同审核未通过,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_21("加盟商已登记一位员工,请及时安排培训", "##### 员工姓名:【${userName}】,员工手机号码:【${mobile}】,登记时间:【${registerTime}】"),
|
MESSAGE_21("您有一个门店待提交培训人员,请查收", "加盟商姓名:${partnerUsername}\n手机号码:${partnerMobile}"),
|
||||||
MESSAGE_22("您收到一位员工由您带教,请查收", "##### 员工姓名:【${userName}】,员工手机号码:【${mobile}】,登记时间:【${registerTime}】"),
|
MESSAGE_22("您收到一位员工由您带教,请查收", "员工姓名:【${userName}】,员工手机号码:【${mobile}】,登记时间:【${registerTime}】"),
|
||||||
MESSAGE_23("您有一个门店待发布加盟费/保证金账单,请查收", "##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_23("您有一个门店待发布加盟费/保证金账单,请查收", "加盟商姓名:${partnerName}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_24("您有一个门店待预约三方验收时间,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_24("您有一个门店待预约三方验收时间,请查收", "门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_25("您有一个门店待进行三方验收,请查收","##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_25("您有一个门店待进行三方验收,请查收","##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_26("您有一个门店需要上传开业运营方案,请查收","##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_26("您有一个门店需要上传开业运营方案,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_27("您有一个门店需要上传首批订货清单,请查收","##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_27("您有一个门店需要上传首批订货清单,请查收","##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_28("您有一个门店需要进行视觉验收,请查收","##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_28("您有一个门店需要进行视觉验收,请查收","##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
|
||||||
@@ -55,6 +59,15 @@ public enum MessageEnum {
|
|||||||
MESSAGE_33("您有一位加盟商已放弃门店体验,请查收","##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_33("您有一位加盟商已放弃门店体验,请查收","##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
|
||||||
|
|
||||||
|
MESSAGE_34("您有一个门店待提交发票,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_35("您有一个门店设计阶段待提交,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_36("您有一个门店施工阶段待提交,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_37("您有一个门店装修验收待验收,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_38("您有一个门店POS信息待提交,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_39("您有一个门店订货系统信息待提交,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_40("您有一个门店信发系统信息待提交,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_41("您有一个门店营帐通信息待提交,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_42("您有一个门店开业运营方案待审核,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
@@ -174,4 +187,40 @@ public enum MessageEnum {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getQWMessageUrl(String qywxUrl2, String corpId, Map<String, String> paramMap) {
|
||||||
|
if (StringUtils.isAnyBlank(qywxUrl2, corpId) ) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
String messageUrl = null;
|
||||||
|
try {
|
||||||
|
String noticeUrl = String.format(qywxUrl2, corpId, "qw_self_dkf","common");
|
||||||
|
String finalUrl = buildUrlWithParams(noticeUrl, paramMap);
|
||||||
|
log.info("finalUrl:{}", finalUrl);
|
||||||
|
messageUrl = URLEncoder.encode(finalUrl, "UTF-8");
|
||||||
|
messageUrl = String.format(CommonConstants.WX_SELF_AUTH_URL, corpId, messageUrl);
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return messageUrl;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 拼接参数
|
||||||
|
* @param url
|
||||||
|
* @param paramMap
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String buildUrlWithParams(String url, Map<String, String> paramMap) {
|
||||||
|
// 检查 URL 是否已经包含参数
|
||||||
|
StringJoiner urlWithParams = new StringJoiner("&", url.contains("?") ? "&" : "?", "");
|
||||||
|
|
||||||
|
// 遍历 Map,拼接参数
|
||||||
|
for (Map.Entry<String, String> entry : paramMap.entrySet()) {
|
||||||
|
urlWithParams.add(entry.getKey() + "=" + entry.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 返回拼接后的 URL
|
||||||
|
return url + urlWithParams.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ public enum UserRoleEnum {
|
|||||||
DESIGN_CUSTOMER(390000000L,"设计客服"),
|
DESIGN_CUSTOMER(390000000L,"设计客服"),
|
||||||
CONSTRUCTION_CUSTOMER(400000000L,"施工客服"),
|
CONSTRUCTION_CUSTOMER(400000000L,"施工客服"),
|
||||||
BRANCH_OFFICE(1724233283449L,"分布内勤"),
|
BRANCH_OFFICE(1724233283449L,"分布内勤"),
|
||||||
|
FINANCE(1735895867344L,"财务"),
|
||||||
;
|
;
|
||||||
|
|
||||||
private Long code;
|
private Long code;
|
||||||
|
|||||||
@@ -83,9 +83,12 @@ public class BankServiceImpl extends LineFlowService implements BankService {
|
|||||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
|
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
|
||||||
String key = MessageFormat.format(CommonConstants.AMOUNT_KEY, eid, lineInfo.getId());
|
String key = MessageFormat.format(CommonConstants.AMOUNT_KEY, eid, lineInfo.getId());
|
||||||
redisUtilPool.delKey(key);
|
redisUtilPool.delKey(key);
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("partnerUsername",lineInfo.getUsername());
|
||||||
|
map.put("partnerMobile",lineInfo.getMobile());
|
||||||
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||||
QWMessageEnum.MESSAGE_1,
|
MessageEnum.MESSAGE_6,
|
||||||
new HashMap<>());
|
map);
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,10 @@ package com.cool.store.service.impl;
|
|||||||
|
|
||||||
|
|
||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.entity.BuildInformationDO;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.entity.PointInfoDO;
|
|
||||||
import com.cool.store.entity.QualificationsInfoDO;
|
|
||||||
import com.cool.store.entity.ShopInfoDO;
|
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.enums.MessageEnum;
|
||||||
|
import com.cool.store.enums.UserRoleEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
@@ -15,13 +14,14 @@ import com.cool.store.response.BuildInformationResponse;
|
|||||||
import com.cool.store.service.BuildInformationService;
|
import com.cool.store.service.BuildInformationService;
|
||||||
import com.cool.store.mapper.BuildInformationMapper;
|
import com.cool.store.mapper.BuildInformationMapper;
|
||||||
import com.cool.store.service.PreparationService;
|
import com.cool.store.service.PreparationService;
|
||||||
|
import com.cool.store.service.UserAuthMappingService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.Date;
|
import java.util.*;
|
||||||
import java.util.Objects;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author EDY
|
* @author EDY
|
||||||
@@ -43,7 +43,12 @@ public class BuildInformationServiceImpl implements BuildInformationService{
|
|||||||
PreparationService preparationService;
|
PreparationService preparationService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private QualificationsInfoDAO qualificationsInfoDAO;
|
private QualificationsInfoDAO qualificationsInfoDAO;
|
||||||
|
@Resource
|
||||||
|
private LineInfoDAO lineInfoDAO;
|
||||||
|
@Resource
|
||||||
|
private CommonService commonService;
|
||||||
|
@Autowired
|
||||||
|
private UserAuthMappingService userAuthMappingService;
|
||||||
@Override
|
@Override
|
||||||
public BuildInformationResponse getBuildInformation(Long shopId) {
|
public BuildInformationResponse getBuildInformation(Long shopId) {
|
||||||
BuildInformationResponse response = new BuildInformationResponse();
|
BuildInformationResponse response = new BuildInformationResponse();
|
||||||
@@ -101,6 +106,30 @@ public class BuildInformationServiceImpl implements BuildInformationService{
|
|||||||
//初始化数据
|
//初始化数据
|
||||||
preparationService.licenseCompleted(request.getShopId());
|
preparationService.licenseCompleted(request.getShopId());
|
||||||
preparationService.sysStoreCompleted(request.getShopId());
|
preparationService.sysStoreCompleted(request.getShopId());
|
||||||
|
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||||
|
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("partnerUsername",lineInfoDO.getUsername());
|
||||||
|
map.put("partnerMobile",lineInfoDO.getMobile());
|
||||||
|
map.put("storeName",shopInfoDO.getShopName());
|
||||||
|
List<EnterpriseUserDO> itList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.IT_EMPLOYEE, shopInfoDO.getRegionId());
|
||||||
|
List<String> itUsers = itList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||||
|
commonService.sendQWMessage(itUsers,
|
||||||
|
MessageEnum.MESSAGE_39,
|
||||||
|
map);
|
||||||
|
commonService.sendQWMessage(itUsers,
|
||||||
|
MessageEnum.MESSAGE_40,
|
||||||
|
map);
|
||||||
|
List<EnterpriseUserDO> posList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.HUO_MA_EMPLOYEE, shopInfoDO.getRegionId());
|
||||||
|
List<String> posUsers = posList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||||
|
commonService.sendQWMessage(posUsers,
|
||||||
|
MessageEnum.MESSAGE_38,
|
||||||
|
map);
|
||||||
|
List<EnterpriseUserDO> xfList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.XIN_FA_SYS_CUSTOMER, shopInfoDO.getRegionId());
|
||||||
|
List<String> xfUsers = xfList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||||
|
commonService.sendQWMessage(xfUsers,
|
||||||
|
MessageEnum.MESSAGE_40,
|
||||||
|
map);
|
||||||
return buildInformationDAO.insertSelective(buildInformationDO);
|
return buildInformationDAO.insertSelective(buildInformationDO);
|
||||||
}else {
|
}else {
|
||||||
buildInformationDO.setUpdateTime(new Date());
|
buildInformationDO.setUpdateTime(new Date());
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ public class CommonService {
|
|||||||
* @param message 消息内容
|
* @param message 消息内容
|
||||||
* @param requestMap 参数
|
* @param requestMap 参数
|
||||||
*/
|
*/
|
||||||
public void sendQWMessage(List<String> userIds, QWMessageEnum message, Map<String, String> requestMap){
|
public void sendQWMessage(List<String> userIds, MessageEnum message, Map<String, String> requestMap){
|
||||||
log.info("message:{}, request:{}, userIds:{}", message.getTitle(), JSONObject.toJSONString(requestMap), JSONObject.toJSONString(userIds));
|
log.info("message:{}, request:{}, userIds:{}", message.getTitle(), JSONObject.toJSONString(requestMap), JSONObject.toJSONString(userIds));
|
||||||
if(CollectionUtils.isEmpty(userIds)){
|
if(CollectionUtils.isEmpty(userIds)){
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -361,6 +361,17 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
}
|
}
|
||||||
//更新阶段状态验收中
|
//更新阶段状态验收中
|
||||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122);
|
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122);
|
||||||
|
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||||
|
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("partnerUsername",lineInfoDO.getUsername());
|
||||||
|
map.put("partnerMobile",lineInfoDO.getMobile());
|
||||||
|
map.put("storeName",shopInfoDO.getShopName());
|
||||||
|
List<EnterpriseUserDO> userDOList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.ENGINEER_DEP_SUPERVISOR, shopInfoDO.getRegionId());
|
||||||
|
List<String> userIds = userDOList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||||
|
commonService.sendQWMessage(userIds,
|
||||||
|
MessageEnum.MESSAGE_37,
|
||||||
|
map);
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -634,6 +645,15 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
}
|
}
|
||||||
//更新装修设计状态
|
//更新装修设计状态
|
||||||
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110));
|
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110));
|
||||||
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||||
|
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfo.getLineId());
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("partnerUsername",lineInfoDO.getUsername());
|
||||||
|
map.put("partnerMobile",lineInfoDO.getMobile());
|
||||||
|
map.put("storeName",shopInfo.getShopName());
|
||||||
|
commonService.sendQWMessage(Collections.singletonList(shopInfo.getInvestmentManager()),
|
||||||
|
MessageEnum.MESSAGE_36,
|
||||||
|
map);
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -124,15 +124,15 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
|||||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_73;
|
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_73;
|
||||||
//更新阶段信息
|
//更新阶段信息
|
||||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_80);
|
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_80);
|
||||||
Map<String, String> requestMap = new HashMap<>();
|
|
||||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
||||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||||
requestMap.put("storeName", shopInfoDO.getShopName());
|
HashMap<String, String> map = new HashMap<>();
|
||||||
requestMap.put("partnerName", lineInfo.getUsername());
|
map.put("partnerUsername",lineInfo.getUsername());
|
||||||
requestMap.put("partnerMobile", lineInfo.getMobile());
|
map.put("partnerMobile",lineInfo.getMobile());
|
||||||
requestMap.put("lineId", String.valueOf(lineInfo.getId()));
|
map.put("storeName",shopInfoDO.getShopName());
|
||||||
requestMap.put("shopId", String.valueOf(shopInfoDO.getId()));
|
commonService.sendQWMessage(Collections.singletonList(shopInfoDO.getInvestmentManager()),
|
||||||
commonService.sendMessage(Collections.singletonList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_19, requestMap);
|
MessageEnum.MESSAGE_19,
|
||||||
|
map);
|
||||||
} else if (Constants.ONE_INTEGER.equals(request.getStatus())) {
|
} else if (Constants.ONE_INTEGER.equals(request.getStatus())) {
|
||||||
shopAuditInfoDO.setRejectReason(request.getResult());
|
shopAuditInfoDO.setRejectReason(request.getResult());
|
||||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_74;
|
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_74;
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
|||||||
private ShopInfoDAO shopInfoDAO;
|
private ShopInfoDAO shopInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
private ShopStageInfoDAO shopStageInfoDAO;
|
private ShopStageInfoDAO shopStageInfoDAO;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean submit(IntentAgreementSubmitRequest request) {
|
public boolean submit(IntentAgreementSubmitRequest request) {
|
||||||
@@ -150,12 +151,27 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
|||||||
lineInfoDAO.updateLineInfo(lineInfo);
|
lineInfoDAO.updateLineInfo(lineInfo);
|
||||||
//初始化店铺
|
//初始化店铺
|
||||||
shopService.initShop(lineInfo);
|
shopService.initShop(lineInfo);
|
||||||
// 批量获取线索下门店的选址未开始的数据
|
// 批量获取线索下门店的选址未开始的数据
|
||||||
List<ShopStageInfoDO> stages = shopStageInfoDAO.getByLineIdAndSubStage(lineInfo.getId());
|
List<ShopStageInfoDO> stages = shopStageInfoDAO.getByLineIdAndSubStage(lineInfo.getId());
|
||||||
List<Long> shopIds = stages.stream().map(ShopStageInfoDO::getShopId).collect(Collectors.toList());
|
List<Long> shopIds = stages.stream().map(ShopStageInfoDO::getShopId).collect(Collectors.toList());
|
||||||
shopStageInfoDAO.batchUpdateByShopIdsAndSubStageStatus(shopIds,
|
shopStageInfoDAO.batchUpdateByShopIdsAndSubStageStatus(shopIds,
|
||||||
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_10,
|
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_10,
|
||||||
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_50,ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70));
|
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_50, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70));
|
||||||
|
List<ShopInfoDO> shopListByIds = shopInfoDAO.getShopListByIds(shopIds);
|
||||||
|
Set<String> userSet = shopListByIds.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toSet());
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("partnerUsername", lineInfo.getUsername());
|
||||||
|
map.put("partnerMobile", lineInfo.getMobile());
|
||||||
|
commonService.sendQWMessage(new ArrayList<>(userSet),
|
||||||
|
MessageEnum.MESSAGE_14,
|
||||||
|
map);
|
||||||
|
commonService.sendQWMessage(new ArrayList<>(userSet),
|
||||||
|
MessageEnum.MESSAGE_23,
|
||||||
|
map);
|
||||||
|
commonService.sendQWMessage(new ArrayList<>(userSet),
|
||||||
|
MessageEnum.MESSAGE_21,
|
||||||
|
map);
|
||||||
|
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,7 +183,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean initiating(IntentAgreementSubmitRequest request, LoginUserInfo user) {
|
public Boolean initiating(IntentAgreementSubmitRequest request, LoginUserInfo user) {
|
||||||
log.info("initiating request:{}",JSONObject.toJSONString(request));
|
log.info("initiating request:{}", JSONObject.toJSONString(request));
|
||||||
SigningBaseInfoDO signingBaseInfoDO = request.toSigningBaseInfoDO();
|
SigningBaseInfoDO signingBaseInfoDO = request.toSigningBaseInfoDO();
|
||||||
boolean submitStatus = intentAgreementMapper.insert(signingBaseInfoDO);
|
boolean submitStatus = intentAgreementMapper.insert(signingBaseInfoDO);
|
||||||
if (submitStatus) {
|
if (submitStatus) {
|
||||||
@@ -201,14 +217,14 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean skipIntentAgreement(Long lineId,LoginUserInfo user) {
|
public Boolean skipIntentAgreement(Long lineId, LoginUserInfo user) {
|
||||||
log.info("skipIntentAgreement lineId:{},操作人:{}",lineId,user.getName());
|
log.info("skipIntentAgreement lineId:{},操作人:{}", lineId, user.getName());
|
||||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
|
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
|
||||||
if (lineInfo == null){
|
if (lineInfo == null) {
|
||||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||||
}
|
}
|
||||||
if ( !WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode().equals(lineInfo.getWorkflowSubStageStatus())) {
|
if (!WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode().equals(lineInfo.getWorkflowSubStageStatus())) {
|
||||||
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
|
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
lineInfo.setWorkflowStage(WorkflowStageEnum.STORE.getCode());
|
lineInfo.setWorkflowStage(WorkflowStageEnum.STORE.getCode());
|
||||||
@@ -223,7 +239,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
|||||||
List<Long> shopIds = stages.stream().map(ShopStageInfoDO::getShopId).collect(Collectors.toList());
|
List<Long> shopIds = stages.stream().map(ShopStageInfoDO::getShopId).collect(Collectors.toList());
|
||||||
shopStageInfoDAO.batchUpdateByShopIdsAndSubStageStatus(shopIds,
|
shopStageInfoDAO.batchUpdateByShopIdsAndSubStageStatus(shopIds,
|
||||||
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_10,
|
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_10,
|
||||||
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_50,ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70));
|
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_50, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70));
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,7 +255,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
|||||||
@Override
|
@Override
|
||||||
public InitiatingRequest getOaDetail(String mobile, String idCardNo) {
|
public InitiatingRequest getOaDetail(String mobile, String idCardNo) {
|
||||||
SigningBaseInfoDO signingBaseInfoDO = intentAgreementMapper.selectByMobile(mobile, idCardNo);
|
SigningBaseInfoDO signingBaseInfoDO = intentAgreementMapper.selectByMobile(mobile, idCardNo);
|
||||||
if (signingBaseInfoDO==null){
|
if (signingBaseInfoDO == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String redisKey = "OA:" + mobile + idCardNo;
|
String redisKey = "OA:" + mobile + idCardNo;
|
||||||
|
|||||||
@@ -98,16 +98,12 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
|||||||
QualificationsInfoDO qualificationsInfoDO = request.toQualificationsInfoDO();
|
QualificationsInfoDO qualificationsInfoDO = request.toQualificationsInfoDO();
|
||||||
qualificationsInfoDAO.insertOrUpdate(qualificationsInfoDO);
|
qualificationsInfoDAO.insertOrUpdate(qualificationsInfoDO);
|
||||||
|
|
||||||
// Map<String, String> requestMap = new HashMap<>();
|
Map<String, String> requestMap = new HashMap<>();
|
||||||
// requestMap.put("partnerUsername", lineInfoParam.getUsername());
|
requestMap.put("partnerUsername", lineInfoParam.getUsername());
|
||||||
// requestMap.put("partnerMobile", lineInfoParam.getMobile());
|
requestMap.put("partnerMobile", lineInfoParam.getMobile());
|
||||||
// requestMap.put("lineId", String.valueOf(lineInfoParam.getId()));
|
|
||||||
// HyOpenAreaInfoDO openAreaInfoDO = openAreaInfoMapper.selectById(lineInfoParam.getWantShopAreaId());
|
|
||||||
// requestMap.put("regionName", openAreaInfoDO.getAreaName());
|
|
||||||
|
|
||||||
commonService.sendQWMessage(Collections.singletonList(lineInfoDO.getInvestmentManager()),
|
commonService.sendQWMessage(Collections.singletonList(lineInfoDO.getInvestmentManager()),
|
||||||
QWMessageEnum.MESSAGE_1,
|
MessageEnum.MESSAGE_1,
|
||||||
new HashMap<>());
|
requestMap);
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -119,9 +119,12 @@ public class LinePayServiceImpl implements LinePayService {
|
|||||||
lineInfoDAO.insertOrUpdate(lineInfo);
|
lineInfoDAO.insertOrUpdate(lineInfo);
|
||||||
String key = MessageFormat.format(CommonConstants.AMOUNT_KEY, eid, lineInfo.getId());
|
String key = MessageFormat.format(CommonConstants.AMOUNT_KEY, eid, lineInfo.getId());
|
||||||
redisUtilPool.delKey(key);
|
redisUtilPool.delKey(key);
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("partnerUsername",lineInfo.getUsername());
|
||||||
|
map.put("partnerMobile",lineInfo.getMobile());
|
||||||
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||||
QWMessageEnum.MESSAGE_1,
|
MessageEnum.MESSAGE_6,
|
||||||
new HashMap<>());
|
map);
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,22 +150,25 @@ public class LinePayServiceImpl implements LinePayService {
|
|||||||
franchiseFeeDO.setPayId(payId);
|
franchiseFeeDO.setPayId(payId);
|
||||||
franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO);
|
franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO);
|
||||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_72);
|
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_72);
|
||||||
Map<String, String> requestMap = new HashMap<>();
|
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(franchiseFeeDO.getShopId());
|
||||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
HashMap<String, String> map = new HashMap<>();
|
||||||
requestMap.put("storeName", shopInfoDO.getShopName());
|
map.put("partnerUsername",lineInfo.getUsername());
|
||||||
requestMap.put("partnerName", lineInfo.getUsername());
|
map.put("partnerMobile",lineInfo.getMobile());
|
||||||
requestMap.put("partnerMobile", lineInfo.getMobile());
|
map.put("storeName",shopInfoDO.getShopName());
|
||||||
requestMap.put("lineId", String.valueOf(lineInfo.getId()));
|
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||||
requestMap.put("shopId", String.valueOf(shopInfoDO.getId()));
|
MessageEnum.MESSAGE_18,
|
||||||
//commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_18,requestMap);
|
map);
|
||||||
}
|
}
|
||||||
if (PayBusinessTypeEnum.INTENT_MONEY.getCode().equals(request.getPayBusinessType())) {
|
if (PayBusinessTypeEnum.INTENT_MONEY.getCode().equals(request.getPayBusinessType())) {
|
||||||
lineInfo.setWorkflowSubStage(WorkflowSubStageEnum.PAY_DEPOSIT.getCode());
|
lineInfo.setWorkflowSubStage(WorkflowSubStageEnum.PAY_DEPOSIT.getCode());
|
||||||
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode());
|
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode());
|
||||||
lineInfoDAO.insertOrUpdate(lineInfo);
|
lineInfoDAO.insertOrUpdate(lineInfo);
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("partnerUsername",lineInfo.getUsername());
|
||||||
|
map.put("partnerMobile",lineInfo.getMobile());
|
||||||
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||||
QWMessageEnum.MESSAGE_1,
|
MessageEnum.MESSAGE_5,
|
||||||
new HashMap<>());
|
map);
|
||||||
}
|
}
|
||||||
return payId == null ? null : payId;
|
return payId == null ? null : payId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import com.cool.store.dto.openPreparation.UserNameDTO;
|
|||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.AuditStatusEnum;
|
import com.cool.store.enums.AuditStatusEnum;
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.enums.MessageEnum;
|
||||||
import com.cool.store.enums.UserRoleEnum;
|
import com.cool.store.enums.UserRoleEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
@@ -51,7 +52,7 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
|||||||
@Resource
|
@Resource
|
||||||
private ShopStageInfoDAO shopStageInfoDAO;
|
private ShopStageInfoDAO shopStageInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
private PreparationService preparationService;
|
private CommonService commonService;
|
||||||
@Resource
|
@Resource
|
||||||
private RegionService regionService;
|
private RegionService regionService;
|
||||||
@Resource
|
@Resource
|
||||||
@@ -102,6 +103,15 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
|||||||
planId = openingOperationPlanDAO.insertSelective(openingOperationPlanDO);
|
planId = openingOperationPlanDAO.insertSelective(openingOperationPlanDO);
|
||||||
}
|
}
|
||||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_141);
|
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_141);
|
||||||
|
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||||
|
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("partnerUsername",lineInfoDO.getUsername());
|
||||||
|
map.put("partnerMobile",lineInfoDO.getMobile());
|
||||||
|
map.put("storeName",shopInfoDO.getShopName());
|
||||||
|
commonService.sendQWMessage(Collections.singletonList(shopInfoDO.getInvestmentManager()),
|
||||||
|
MessageEnum.MESSAGE_38,
|
||||||
|
map);
|
||||||
return planId;
|
return planId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -887,11 +887,12 @@ public class PointServiceImpl implements PointService {
|
|||||||
shopRentInfoDAO.updateRentContract(shopRentInfo);
|
shopRentInfoDAO.updateRentContract(shopRentInfo);
|
||||||
}
|
}
|
||||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopSubStageInfo.getLineId());
|
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopSubStageInfo.getLineId());
|
||||||
Map<String, String> messageMap = new HashMap<>();
|
HashMap<String, String> map = new HashMap<>();
|
||||||
messageMap.put("lineId", String.valueOf(lineInfo.getId()));
|
map.put("partnerUsername",lineInfo.getUsername());
|
||||||
messageMap.put("partnerUsername", lineInfo.getUsername());
|
map.put("partnerMobile",lineInfo.getMobile());
|
||||||
messageMap.put("submitTime", DateUtils.parseDateToStr(DateUtils.NOTICE_DATE, new Date()));
|
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||||
commonService.sendMessage(Arrays.asList(lineInfo.getDevelopmentManager()), MessageEnum.MESSAGE_15, messageMap);
|
MessageEnum.MESSAGE_15,
|
||||||
|
map);
|
||||||
return shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21);
|
return shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -983,11 +984,12 @@ public class PointServiceImpl implements PointService {
|
|||||||
if(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_22.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())){
|
if(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_22.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())){
|
||||||
shopStageInfoDAO.updateShopStageAndAuditInfo(shopRentInfo.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21, null);
|
shopStageInfoDAO.updateShopStageAndAuditInfo(shopRentInfo.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21, null);
|
||||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopSubStageInfo.getLineId());
|
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopSubStageInfo.getLineId());
|
||||||
Map<String, String> messageMap = new HashMap<>();
|
HashMap<String, String> map = new HashMap<>();
|
||||||
messageMap.put("lineId", String.valueOf(lineInfo.getId()));
|
map.put("partnerUsername",lineInfo.getUsername());
|
||||||
messageMap.put("partnerUsername", lineInfo.getUsername());
|
map.put("partnerMobile",lineInfo.getMobile());
|
||||||
messageMap.put("submitTime", DateUtils.parseDateToStr(DateUtils.NOTICE_DATE, new Date()));
|
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||||
commonService.sendMessage(Arrays.asList(lineInfo.getDevelopmentManager()), MessageEnum.MESSAGE_15, messageMap);
|
MessageEnum.MESSAGE_15,
|
||||||
|
map);
|
||||||
}
|
}
|
||||||
return shopRentInfoDAO.updateRentContract(shopRentInfo);
|
return shopRentInfoDAO.updateRentContract(shopRentInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,10 +118,19 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
shopInfoDAO.batchAddShop(addShopList);
|
shopInfoDAO.batchAddShop(addShopList);
|
||||||
List<Long> shopIds = addShopList.stream().map(ShopInfoDO::getId).collect(Collectors.toList());
|
List<Long> shopIds = addShopList.stream().map(ShopInfoDO::getId).collect(Collectors.toList());
|
||||||
Integer result = shopStageInfoDAO.initShopStageInfo(lineInfo.getId(), shopIds,true);
|
Integer result = shopStageInfoDAO.initShopStageInfo(lineInfo.getId(), shopIds,true);
|
||||||
//todo 确认数量
|
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("partnerUsername",lineInfo.getUsername());
|
||||||
|
map.put("partnerMobile",lineInfo.getMobile());
|
||||||
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||||
QWMessageEnum.MESSAGE_1,
|
MessageEnum.MESSAGE_14,
|
||||||
new HashMap<>());
|
map);
|
||||||
|
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||||
|
MessageEnum.MESSAGE_23,
|
||||||
|
map);
|
||||||
|
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||||
|
MessageEnum.MESSAGE_21,
|
||||||
|
map);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -277,9 +286,22 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
Long shopId = shopInfoDAO.addShopInfo(shopInfoDO);
|
Long shopId = shopInfoDAO.addShopInfo(shopInfoDO);
|
||||||
if (lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_125.getCode())) {
|
if (lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_125.getCode())) {
|
||||||
shopStageInfoDAO.initShopStageInfo(request.getLineId(), Collections.singletonList(shopId), true);
|
shopStageInfoDAO.initShopStageInfo(request.getLineId(), Collections.singletonList(shopId), true);
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("partnerUsername",lineInfo.getUsername());
|
||||||
|
map.put("partnerMobile",lineInfo.getMobile());
|
||||||
|
commonService.sendQWMessage(Collections.singletonList(request.getInvestmentManagerUserId()),
|
||||||
|
MessageEnum.MESSAGE_14,
|
||||||
|
map);
|
||||||
|
commonService.sendQWMessage(Collections.singletonList(request.getInvestmentManagerUserId()),
|
||||||
|
MessageEnum.MESSAGE_23,
|
||||||
|
map);
|
||||||
|
commonService.sendQWMessage(Collections.singletonList(request.getInvestmentManagerUserId()),
|
||||||
|
MessageEnum.MESSAGE_21,
|
||||||
|
map);
|
||||||
} else {
|
} else {
|
||||||
shopStageInfoDAO.initShopStageInfo(request.getLineId(), Collections.singletonList(shopId), false);
|
shopStageInfoDAO.initShopStageInfo(request.getLineId(), Collections.singletonList(shopId), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
return shopId;
|
return shopId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import com.cool.store.response.ResponseResult;
|
|||||||
import com.cool.store.service.CoolStoreStartFlowService;
|
import com.cool.store.service.CoolStoreStartFlowService;
|
||||||
import com.cool.store.service.PreparationService;
|
import com.cool.store.service.PreparationService;
|
||||||
import com.cool.store.service.SignFranchiseService;
|
import com.cool.store.service.SignFranchiseService;
|
||||||
|
import com.cool.store.service.UserAuthMappingService;
|
||||||
import com.cool.store.utils.GeoMapUtil;
|
import com.cool.store.utils.GeoMapUtil;
|
||||||
import com.cool.store.utils.RedisUtilPool;
|
import com.cool.store.utils.RedisUtilPool;
|
||||||
import com.cool.store.utils.poi.DateUtils;
|
import com.cool.store.utils.poi.DateUtils;
|
||||||
@@ -32,6 +33,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -40,7 +42,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
SignFranchiseMapper signFranchiseMapper;
|
SignFranchiseMapper signFranchiseMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
CoolStoreStartFlowService coolStoreStartFlowService;
|
UserAuthMappingService userAuthMappingService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
FranchiseFeeMapper franchiseFeeMapper;
|
FranchiseFeeMapper franchiseFeeMapper;
|
||||||
@@ -174,6 +176,22 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
//初始化数据
|
//初始化数据
|
||||||
preparationService.contractAndBuildStoreCompletion(request.getShopId());
|
preparationService.contractAndBuildStoreCompletion(request.getShopId());
|
||||||
commonService.sendSms(lineInfoDO.getMobile(),SMSMsgEnum.SIGN_CONTRACT);
|
commonService.sendSms(lineInfoDO.getMobile(),SMSMsgEnum.SIGN_CONTRACT);
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("partnerUsername",lineInfoDO.getUsername());
|
||||||
|
map.put("partnerMobile",lineInfoDO.getMobile());
|
||||||
|
map.put("storeName",shopInfoDO.getShopName());
|
||||||
|
List<EnterpriseUserDO> userDOList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.FINANCE, shopInfoDO.getRegionId());
|
||||||
|
List<String> finances = userDOList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||||
|
commonService.sendQWMessage(finances,
|
||||||
|
MessageEnum.MESSAGE_34,
|
||||||
|
map);
|
||||||
|
commonService.sendQWMessage(Collections.singletonList(shopInfoDO.getInvestmentManager()),
|
||||||
|
MessageEnum.MESSAGE_35,
|
||||||
|
map);
|
||||||
|
commonService.sendQWMessage(Collections.singletonList(shopInfoDO.getInvestmentManager()),
|
||||||
|
MessageEnum.MESSAGE_26,
|
||||||
|
map);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
signFranchiseMapper.updateByPrimaryKeySelective(signFranchiseDO);
|
signFranchiseMapper.updateByPrimaryKeySelective(signFranchiseDO);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,7 +106,13 @@ public class PCTestController {
|
|||||||
public ResponseResult<Boolean> testQWMessage(){
|
public ResponseResult<Boolean> testQWMessage(){
|
||||||
List<String> userIds = new ArrayList<>();
|
List<String> userIds = new ArrayList<>();
|
||||||
userIds.add("wpayJeDAAAhGIFgUJpJN-zg39JuNbYhg_woayJeDAAA52Wm6ZigyveSjniyimeqZQ");
|
userIds.add("wpayJeDAAAhGIFgUJpJN-zg39JuNbYhg_woayJeDAAA52Wm6ZigyveSjniyimeqZQ");
|
||||||
commonService.sendQWMessage(userIds, QWMessageEnum.MESSAGE_1, new HashMap<>());
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("partnerUsername","sx");
|
||||||
|
map.put("partnerMobile","13563273279");
|
||||||
|
commonService.sendQWMessage(userIds,
|
||||||
|
MessageEnum.MESSAGE_14,
|
||||||
|
map);
|
||||||
|
|
||||||
return ResponseResult.success(Boolean.TRUE);
|
return ResponseResult.success(Boolean.TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user