Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: MessageEnum
|
||||
@@ -8,21 +16,21 @@ package com.cool.store.enums;
|
||||
*/
|
||||
public enum MessageEnum {
|
||||
|
||||
MESSAGE_1("您有一份加盟意向申请,请查收。", "##### 加盟商姓名:{0}\n##### 手机号码:{1}\n##### 意向加盟区域:{2}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_2("您收到一份邀约面谈预约,请查收", "##### 加盟商姓名:{0}\n##### 预约时间:{1}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_3("您收到一份一次面审预约,请查收", "##### 加盟商姓名:{0}\n##### 预约时间:{1}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_4("您有线索未通过面审,请查收", "##### 加盟商姓名:{0}\n##### 面审时间:{1}\n##### 面审官:{2}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_5("您收到一份缴纳意向金审核,请查收", "##### 加盟商姓名:{0}\n##### 缴费时间:{1}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_6("您收到一份加盟意向协议信息审核,请查收", "##### 加盟商姓名:{0}\n##### 手机号码:{1}\n##### 信息提交时间:{2}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_7("您提交的一份加盟意向协议OA审核未通过,请查收", "##### 加盟商姓名:{0}\n##### 审批提交时间:{1}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_8("您有一位加盟商待安排体验门店及体验时间,请查收", "##### 加盟商姓名:{0}\n##### 手机号码:{1}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_9("您有一位加盟商已放弃门店体验,请查收", "##### 加盟商姓名:{0}\n##### 手机号码:{1}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_10("您收到一份二次面审预约,请查收", "##### 加盟商姓名:{0}\n##### 预约时间:{1}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_11("您的一个铺位已审核通过,请查收", "##### 铺位名称:{0}\n##### 铺位地址:{1}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_12("您的一个铺位审核未通过,请查收", "##### 铺位名称:{0}\n##### 铺位地址:{1}\n##### 未通过原因:{2}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_13("您有一个铺位需要审核,请查收", "##### 铺位名称:{0}\n##### 铺位地址:{1}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_14("已为您分配一位加盟商,请查收", "##### 加盟商姓名:{0}\n##### 手机号码:{1}\n##### 意向加盟区域:{2}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_15("您有一份加盟商上传的租赁合同待审核,请查收", "##### 加盟商姓名:{0}\n##### 提交时间:{1}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_1("您有一份加盟意向申请,请查收。", "##### 加盟商姓名:${partnerUsername}\n##### 手机号码:${partnerMobile}\n##### 意向加盟区域:${wantShopName}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_2("您收到一份邀约面谈预约,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 预约时间:${appointmentTime}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_3("您收到一份一次面审预约,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 预约时间:${appointmentTime}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_4("您有线索未通过面审,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 面审时间:${interviewTime}\n##### 面审官:${interviewUsername}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_5("您收到一份缴纳意向金审核,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 缴费时间:${payTime}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_6("您收到一份加盟意向协议信息审核,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 手机号码:${partnerMobile}\n##### 信息提交时间:{submitTime}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_7("您提交的一份加盟意向协议OA审核未通过,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 审批提交时间:${submitTime}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_8("您有一位加盟商待安排体验门店及体验时间,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 手机号码:${partnerMobile}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_9("您有一位加盟商已放弃门店体验,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 手机号码:${partnerMobile}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_10("您收到一份二次面审预约,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 预约时间:${appointmentTime}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_11("您的一个铺位已审核通过,请查收", "##### 铺位名称:${pointName}\n##### 铺位地址:${pointAddress}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_12("您的一个铺位审核未通过,请查收", "##### 铺位名称:${pointName}\n##### 铺位地址:${pointAddress}\n##### 未通过原因:${reason}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_13("您有一个铺位需要审核,请查收", "##### 铺位名称:${pointName}\n##### 铺位地址:${pointAddress}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_14("已为您分配一位加盟商,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 手机号码:${partnerMobile}\n##### 意向加盟区域:${wantShopName}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
MESSAGE_15("您有一份加盟商上传的租赁合同待审核,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 提交时间:${submitTime}\n", "https://oss.coolcollege.cn/53c11d2f4ec94d4fa7edd7a96e40e2d6.png"),
|
||||
;
|
||||
|
||||
private String title;
|
||||
@@ -45,7 +53,57 @@ public enum MessageEnum {
|
||||
return content;
|
||||
}
|
||||
|
||||
public String getContent(Map<String, String> paramMap){
|
||||
String result = this.content;
|
||||
for (String key : paramMap.keySet()) {
|
||||
result = result.replace("${" + key + "}", paramMap.get(key));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public String getImageUrl() {
|
||||
return imageUrl;
|
||||
}
|
||||
|
||||
|
||||
public String getMessageUrl(String domainUrl, String appId, String corpId, Map<String, String> paramMap){
|
||||
if(StringUtils.isAnyBlank(domainUrl, appId, corpId) || Objects.isNull(paramMap)){
|
||||
return "";
|
||||
}
|
||||
try {
|
||||
switch (this) {
|
||||
case MESSAGE_1:
|
||||
case MESSAGE_2:
|
||||
case MESSAGE_4:
|
||||
case MESSAGE_5:
|
||||
case MESSAGE_6:
|
||||
case MESSAGE_7:
|
||||
case MESSAGE_8:
|
||||
case MESSAGE_9:
|
||||
case MESSAGE_15:
|
||||
return domainUrl + "/dd-noticemsg?appId=" + appId + "&corpId="+ corpId + "&appUrl=" +
|
||||
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=clue&lineId=" + paramMap.get("lineId"), StandardCharsets.UTF_8.name());
|
||||
case MESSAGE_3:
|
||||
case MESSAGE_10:
|
||||
return domainUrl + "/dd-noticemsg?appId=" + appId + "&corpId="+ corpId + "&appUrl=" +
|
||||
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=interview&lineId=" + paramMap.get("lineId"), StandardCharsets.UTF_8.name());
|
||||
case MESSAGE_11:
|
||||
case MESSAGE_12:
|
||||
return domainUrl + "/dd-noticemsg?appId=" + appId + "&corpId="+ corpId + "&appUrl=" +
|
||||
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=point&pointId=" + paramMap.get("pointId"), StandardCharsets.UTF_8.name());
|
||||
case MESSAGE_13:
|
||||
return "dingtalk://dingtalkclient/action/open_micro_app?appId="+ appId +"&corpId=" + corpId + "&page=" +
|
||||
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=point&pointId="+ paramMap.get("pointId"), StandardCharsets.UTF_8.name());
|
||||
case MESSAGE_14:
|
||||
return "dingtalk://dingtalkclient/action/open_micro_app?appId="+appId+"&corpId="+corpId+"&page=" +
|
||||
URLEncoder.encode("pages/common-web-view/index?noticeType=xfsg&routerUrl=notice&target=pointPush&lineId="+ paramMap.get("lineId"), StandardCharsets.UTF_8.name());
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -494,7 +494,7 @@
|
||||
</if>
|
||||
</select>
|
||||
<select id="getLines" resultType="com.cool.store.dto.openPreparation.PlanLineDTO">
|
||||
select xli.id as lineId, xli.mobile as mobile, xli.username as username, eu.name as name
|
||||
select xli.id as lineId, xli.mobile as mobile, xli.username as username,xli.investment_manager as investmentManagerId ,eu.name as name
|
||||
from xfsg_line_info xli
|
||||
join enterprise_user_${enterpriseId} eu on xli.investment_manager = eu.user_id
|
||||
where deleted = 0 and join_status = 1 and line_status = 1
|
||||
|
||||
@@ -46,32 +46,33 @@
|
||||
</select>
|
||||
<select id="getOpenPlanShopListByCondition"
|
||||
resultType="com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO">
|
||||
select si.id as shopId, si.region_id AS regionId,si.line_id as lineId, si.shop_name as shopName,
|
||||
si.store_num as storeNum, si.shop_manager_user_id as shopManagerUserId,li.investment_manager AS investmentManagerId,
|
||||
li.username as partnerName, li.mobile as mobile ,
|
||||
op.submission_time AS submissionTime , op.result_type AS resultType
|
||||
from xfsg_opening_operation_plan op
|
||||
join xfsg_shop_info si on si.id = op.shop_id
|
||||
join xfsg_line_info li on si.line_id = li.id
|
||||
where 1=1
|
||||
<if test="request.shopName != null and request.shopName != '' ">
|
||||
AND si.shop_name like concat('%', #{request.shopName}, '%')
|
||||
</if>
|
||||
<if test="request.resultType != null and request.resultType != ''">
|
||||
AND op.result_type = #{request.resultType}
|
||||
</if>
|
||||
<if test="request.planStartDate != null and request.planStartDate != ''">
|
||||
and op.create_time >= #{request.planStartDate}
|
||||
</if>
|
||||
<if test="request.planEndDate != null and request.planEndDate != ''">
|
||||
AND op.create_time <= #{request.planEndDate}
|
||||
</if>
|
||||
<if test="request.regionIds != null and request.regionIds.size() > 0">
|
||||
and si.region_id in
|
||||
<foreach collection="request.regionIds" item="regionId" index="index" open="(" separator="," close=")">
|
||||
#{regionId}
|
||||
</foreach>
|
||||
</if>
|
||||
select si.id as shopId, si.region_id AS regionId,si.line_id as lineId, si.shop_name as shopName,
|
||||
si.store_num as storeNum, si.shop_manager_user_id as shopManagerUserId,op.submission_time AS submissionTime ,
|
||||
op.result_type AS resultType
|
||||
from xfsg_opening_operation_plan op
|
||||
join xfsg_shop_info si on si.id = op.shop_id
|
||||
where 1=1
|
||||
<if test="request.shopName != null and request.shopName != '' ">
|
||||
AND si.shop_name like concat('%', #{request.shopName}, '%')
|
||||
</if>
|
||||
<if test="request.resultType != null and request.resultType != ''">
|
||||
AND op.result_type = #{request.resultType}
|
||||
</if>
|
||||
<if test="request.planStartDate == null and request.planEndDate == null">
|
||||
and op.create_time >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH)
|
||||
</if>
|
||||
<if test="request.planStartDate != null">
|
||||
and op.create_time >= #{request.planStartDate}
|
||||
</if>
|
||||
<if test="request.planEndDate != null">
|
||||
AND op.create_time <= #{request.planEndDate}
|
||||
</if>
|
||||
<if test="request.regionIds != null and request.regionIds.size() > 0">
|
||||
and si.region_id in
|
||||
<foreach collection="request.regionIds" item="regionId" index="index" open="(" separator="," close=")">
|
||||
#{regionId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@ public class PlanLineDTO {
|
||||
private String mobile;
|
||||
@ApiModelProperty("加盟商姓名")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty("招商经理Id")
|
||||
private String investmentManagerId;
|
||||
@ApiModelProperty("招商经理姓名")
|
||||
private String investmentManagerName;
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ public class PlanListRequest {
|
||||
@ApiModelProperty("店铺名称")
|
||||
private String shopName;
|
||||
@ApiModelProperty("起始日期")
|
||||
private String planStartDate;
|
||||
private Date planStartDate;
|
||||
@ApiModelProperty("结束日期")
|
||||
private String planEndDate;
|
||||
private Date planEndDate;
|
||||
@ApiModelProperty("选择区域")
|
||||
private List<String> regionIds;
|
||||
@ApiModelProperty("审核状态")
|
||||
|
||||
@@ -27,23 +27,18 @@ public class OpeningOperationPlanListVO {
|
||||
@ApiModelProperty("开店负责人")
|
||||
private String shopManagerName;
|
||||
|
||||
|
||||
@ApiModelProperty("加盟商姓名")
|
||||
private String partnerName;
|
||||
|
||||
@ApiModelProperty("手机号码")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty("所属大区")
|
||||
private String bigName;
|
||||
|
||||
@ApiModelProperty("所属战区")
|
||||
private String fightName;
|
||||
@ApiModelProperty("所属区域")
|
||||
private String region;
|
||||
|
||||
@ApiModelProperty("招商经理名字")
|
||||
private String investmentManagerName;
|
||||
|
||||
|
||||
@ApiModelProperty("督导")
|
||||
private String supervisorName;
|
||||
|
||||
|
||||
@@ -51,6 +51,8 @@ public class CommonService {
|
||||
private SimpleMessageService simpleMessageService;
|
||||
@Value("${coolstore.page.domain}")
|
||||
private String coolStoreDomainUrl;
|
||||
@Value("${cool.app.id}")
|
||||
private String appId;
|
||||
@Value("${mybatis.configuration.variables.enterpriseId}")
|
||||
private String enterpriseId;
|
||||
@Value("${enterprise.dingCorpId}")
|
||||
@@ -73,7 +75,7 @@ public class CommonService {
|
||||
return (AuditResultService) applicationContext.getBean(auditEnum.getClazz());
|
||||
}
|
||||
|
||||
public void sendMessage(List<String> userIds, MessageEnum message, String... param){
|
||||
public void sendMessage(List<String> userIds, MessageEnum message, Map<String, String> requestMap){
|
||||
if(CollectionUtils.isEmpty(userIds)){
|
||||
return;
|
||||
}
|
||||
@@ -81,9 +83,12 @@ public class CommonService {
|
||||
if(CollectionUtils.isEmpty(userIds)){
|
||||
return;
|
||||
}
|
||||
String mobileParam = MessageFormat.format("{0}&eid={1}&corpId={2}&appType=dingding2&lineId={3}", "", enterpriseId, dingCorpId, null);
|
||||
try {
|
||||
String messageUrl = coolStoreDomainUrl + "dd-noticemsg?miniAppId={0}&appId={1}&corpId={2}&appUrl=" + URLEncoder.encode("pages/common-web-view/index?routerUrl=notice&target=" + mobileParam, StandardCharsets.UTF_8.name());
|
||||
String messageUrl = message.getMessageUrl(coolStoreDomainUrl, appId, dingCorpId, requestMap);
|
||||
if(StringUtils.isBlank(messageUrl)){
|
||||
log.info("获取通知url为空");
|
||||
return;
|
||||
}
|
||||
SendMessageDTO messageDTO = new SendMessageDTO();
|
||||
messageDTO.setCorpId(dingCorpId);
|
||||
messageDTO.setUserIds(String.join(Constants.COMMA, userIds));
|
||||
@@ -91,17 +96,18 @@ public class CommonService {
|
||||
messageDTO.setAppType("dingding2");
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("message_url", messageUrl);
|
||||
map.put("pcMessageUrl", messageUrl);
|
||||
JSONObject headJson = new JSONObject();
|
||||
headJson.put("bgcolor", "FFBBBBBB");
|
||||
map.put("head", headJson);
|
||||
JSONObject body = new JSONObject();
|
||||
body.put("title", message.getTitle());
|
||||
body.put("image", message.getImageUrl());
|
||||
body.put("content", MessageFormat.format(message.getContent(), param));
|
||||
body.put("content", message.getContent(requestMap));
|
||||
map.put("body",body);
|
||||
messageDTO.setOaJson(map);
|
||||
simpleMessageService.send(JSONObject.toJSONString(messageDTO), RocketMqTagEnum.STORE_DING_QUEUE);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,6 +113,12 @@ public class FirstOrderServiceImp implements FirstOrderService {
|
||||
throw new ServiceException(ErrorCodeEnum.FIRST_ORDER_PARAM_NULL);
|
||||
}
|
||||
FirstOrderDTO order = firstOrderDAO.selectFirstOrderByShopId(shopId);
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_15);
|
||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus()))
|
||||
{
|
||||
order.setFirstOrderSubStage( ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus());
|
||||
return order;
|
||||
}
|
||||
if (Objects.nonNull(order)) {
|
||||
try {
|
||||
ShopInfoDO shopInfo = shopService.getShopInfo(order.getShopId());
|
||||
|
||||
@@ -163,7 +163,11 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
||||
if(InterviewTypeEnum.SECOND_INTERVIEW.equals(interviewType)){
|
||||
messageEnum = MessageEnum.MESSAGE_10;
|
||||
}
|
||||
commonService.sendMessage(Arrays.asList(interviewerUserId), messageEnum, lineInfo.getUsername(), DateUtils.parseDateToStr(DateUtils.NOTICE_DATE, startTime));
|
||||
Map<String, String> messageMap = new HashMap<>();
|
||||
messageMap.put("lineId", String.valueOf(lineInfo.getId()));
|
||||
messageMap.put("partnerUsername", lineInfo.getUsername());
|
||||
messageMap.put("appointmentTime", DateUtils.parseDateToStr(DateUtils.NOTICE_DATE, startTime));
|
||||
commonService.sendMessage(Arrays.asList(interviewerUserId), messageEnum, messageMap);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@@ -463,7 +467,12 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), null, WorkflowSubStageStatusEnum.getInterviewRejectStatus(interviewType),userId);
|
||||
String noticeTime = DateUtils.parseDateToStr(DateUtils.NOTICE_DATE, interviewInfo.getStartTime());
|
||||
String interviewUserName = enterpriseUserDAO.getUserName(interviewInfo.getInterviewerUserId());
|
||||
commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_4, lineInfo.getUsername(), noticeTime, interviewUserName);
|
||||
Map<String, String> messageMap = new HashMap<>();
|
||||
messageMap.put("lineId", String.valueOf(lineInfo.getId()));
|
||||
messageMap.put("partnerUsername", lineInfo.getUsername());
|
||||
messageMap.put("interviewTime", noticeTime);
|
||||
messageMap.put("interviewUsername", interviewUserName);
|
||||
commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_4, messageMap);
|
||||
return lineInterviewDAO.updateInterviewInfo(updateInterviewInfo) > 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,6 +64,8 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
private ShopInfoDAO shopInfoDAO;
|
||||
@Resource
|
||||
private CoolStoreStartFlowService coolStoreStartFlowService;
|
||||
@Resource
|
||||
private LineInfoDAO lineInfoDAO;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@@ -113,7 +115,7 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_ID_IS_NULL);
|
||||
}
|
||||
OpeningOperationPlanDO openingOperationPlanDO = openingOperationPlanDAO.selectByShopId(shopId);
|
||||
if (Objects.nonNull(openingOperationPlanDO) ) {
|
||||
if (Objects.nonNull(openingOperationPlanDO)) {
|
||||
OpeningOperationPlanVO openingOperationPlanVO = new OpeningOperationPlanVO(openingOperationPlanDO);
|
||||
String preparationUserIds = openingOperationPlanDO.getPreparationUserIds();
|
||||
List<String> stream = Arrays.stream(preparationUserIds.split(CommonConstants.COMMA)).collect(Collectors.toList());
|
||||
@@ -134,26 +136,41 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
public PageInfo<OpeningOperationPlanListVO> getPlanListPage(PlanListRequest request) {
|
||||
log.info("getPlanListPage request:{}", JSONObject.toJSONString(request));
|
||||
PageHelper.startPage(request.getPageNumber(), request.getPageSize());
|
||||
//去shop_info表查询店铺名字,店铺code,开店负责人id,督导id,区域id,lineinfo 加盟商name,手机号,招商经理id,open_plan,提交时间,审核状态
|
||||
//TODO 拆表 产品沟通限定时间
|
||||
//不指定时间为3个月数据 去shop_info表查询店铺名字,店铺code,开店负责人id,督导id,区域id,open_plan,提交时间,审核状态
|
||||
List<OpenPlanShopInfoDTO> openPlanShopInfoDTOS = openingOperationPlanDAO.getOpenPlanShopListByCondition(request);
|
||||
//lineinfo 加盟商name,手机号,招商经理name,
|
||||
if (CollectionUtils.isEmpty(openPlanShopInfoDTOS)) {
|
||||
log.error("查询运营方案列表没有数据");
|
||||
return null;
|
||||
}
|
||||
List<Long> lines = openPlanShopInfoDTOS.stream().map(OpenPlanShopInfoDTO::getLineId).collect(Collectors.toList());
|
||||
List<PlanLineDTO> lineInfos = lineInfoDAO.getLines(lines);
|
||||
Map<Long, PlanLineDTO> lineInfoMap = lineInfos.stream().collect(Collectors.toMap(PlanLineDTO::getLineId, dto -> dto));
|
||||
for (OpenPlanShopInfoDTO openPlanShopInfoDTO : openPlanShopInfoDTOS) {
|
||||
openPlanShopInfoDTO.setPartnerName(lineInfoMap.get(openPlanShopInfoDTO.getLineId()).getUsername());
|
||||
openPlanShopInfoDTO.setMobile(lineInfoMap.get(openPlanShopInfoDTO.getLineId()).getMobile());
|
||||
openPlanShopInfoDTO.setInvestmentManagerId(lineInfoMap.get(openPlanShopInfoDTO.getLineId()).getInvestmentManagerId());
|
||||
}
|
||||
PageInfo pageInfo = new PageInfo<>(openPlanShopInfoDTOS);
|
||||
//开店负责人id,督导id,招商经理id // TODO id 为null过滤
|
||||
//开店负责人id,督导id,招商经理id //
|
||||
Set<String> userIdset = openPlanShopInfoDTOS.stream()
|
||||
.filter(dto -> dto.getShopManagerUserId() != null)
|
||||
.map(OpenPlanShopInfoDTO::getShopManagerUserId)
|
||||
.collect(Collectors.toSet());
|
||||
userIdset.addAll(openPlanShopInfoDTOS.stream()
|
||||
.filter(dto -> dto.getSupervisorUserId() != null)
|
||||
.map(OpenPlanShopInfoDTO::getSupervisorUserId)
|
||||
.collect(Collectors.toSet()));
|
||||
userIdset.addAll(openPlanShopInfoDTOS.stream()
|
||||
.filter(dto -> dto.getInvestmentManagerId() != null)
|
||||
.map(OpenPlanShopInfoDTO::getInvestmentManagerId)
|
||||
.collect(Collectors.toSet()));
|
||||
List<String> userlist = new ArrayList<>();
|
||||
userlist.addAll(userIdset);
|
||||
Map<String, EnterpriseUserDO> vonameMap = enterpriseUserDAO.getUserMap(userlist);
|
||||
List<String> userIdList = new ArrayList<>(userIdset);
|
||||
Map<String, String> vonameMap = enterpriseUserDAO.getUserNameMap(userIdList);
|
||||
log.info("getPlanListPage vonameMap:{}", JSONObject.toJSONString(vonameMap));
|
||||
//region
|
||||
List<Long> regionIds = openPlanShopInfoDTOS.stream().map(OpenPlanShopInfoDTO::getRegionId).collect(Collectors.toList());
|
||||
List<Long> regionIds = openPlanShopInfoDTOS.stream()
|
||||
.filter(dto -> dto.getRegionId() != null).map(OpenPlanShopInfoDTO::getRegionId).collect(Collectors.toList());
|
||||
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
|
||||
List<OpeningOperationPlanListVO> openingOperationPlanListVOList = new ArrayList<>();
|
||||
openPlanShopInfoDTOS.forEach(x -> {
|
||||
@@ -163,23 +180,13 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
openingOperationPlanListVO.setStoreNum(x.getStoreNum());
|
||||
openingOperationPlanListVO.setPartnerName(x.getPartnerName());
|
||||
openingOperationPlanListVO.setMobile(x.getMobile());
|
||||
//TODO
|
||||
String[] split = regionNameMap.getOrDefault(x.getRegionId(), "").split("-");
|
||||
if (split.length > 0) {
|
||||
openingOperationPlanListVO.setBigName(split[0]);
|
||||
openingOperationPlanListVO.setFightName(split[1]);
|
||||
}
|
||||
if (!StringUtils.isEmpty(x.getInvestmentManagerId())) {
|
||||
openingOperationPlanListVO.setInvestmentManagerName
|
||||
(vonameMap.get(x.getInvestmentManagerId()).getName());
|
||||
}
|
||||
if (!StringUtils.isEmpty(x.getShopManagerUserId())) {
|
||||
openingOperationPlanListVO.setShopManagerName
|
||||
(vonameMap.get(x.getInvestmentManagerId()).getName());
|
||||
}
|
||||
if (!StringUtils.isEmpty(x.getSupervisorUserId())) {
|
||||
openingOperationPlanListVO.setSupervisorName(vonameMap.get(x.getSupervisorUserId()).getName());
|
||||
}
|
||||
openingOperationPlanListVO.setRegion(regionNameMap.get(x.getRegionId()));
|
||||
openingOperationPlanListVO.setInvestmentManagerName
|
||||
(vonameMap.get(x.getInvestmentManagerId()));
|
||||
openingOperationPlanListVO.setShopManagerName
|
||||
(vonameMap.get(x.getInvestmentManagerId()));
|
||||
openingOperationPlanListVO.setSupervisorName(
|
||||
vonameMap.get(x.getSupervisorUserId()));
|
||||
openingOperationPlanListVO.setSubmissionTime(x.getSubmissionTime());
|
||||
openingOperationPlanListVO.setResultType(x.getResultType());
|
||||
openingOperationPlanListVOList.add(openingOperationPlanListVO);
|
||||
|
||||
@@ -385,7 +385,11 @@ public class PointServiceImpl implements PointService {
|
||||
result = pointInfoDAO.updatePointInfo(updatePoint);
|
||||
}
|
||||
List<String> sendMessageUserIds = JSONObject.parseArray(nextAuditRecord.getHandlerUserIds(), String.class);
|
||||
commonService.sendMessage(sendMessageUserIds, MessageEnum.MESSAGE_13, pointInfo.getPointName(), pointInfo.getAddress());
|
||||
Map<String, String> messageMap = new HashMap<>();
|
||||
messageMap.put("pointId", String.valueOf(pointInfo.getId()));
|
||||
messageMap.put("pointName", pointInfo.getPointName());
|
||||
messageMap.put("pointAddress", pointInfo.getAddress());
|
||||
commonService.sendMessage(sendMessageUserIds, MessageEnum.MESSAGE_13, messageMap);
|
||||
}else{
|
||||
PointInfoDO updatePoint = new PointInfoDO();
|
||||
updatePoint.setId(pointInfo.getId());
|
||||
@@ -394,7 +398,11 @@ public class PointServiceImpl implements PointService {
|
||||
if(SelectStatusEnum.SELECT_STATUS_1.getCode().equals(pointInfo.getSelectStatus())){
|
||||
initUploadRentContract(pointInfo);
|
||||
}
|
||||
commonService.sendMessage(Arrays.asList(pointInfo.getDevelopmentManager()), MessageEnum.MESSAGE_11, pointInfo.getPointName(), pointInfo.getAddress());
|
||||
Map<String, String> messageMap = new HashMap<>();
|
||||
messageMap.put("pointId", String.valueOf(pointInfo.getId()));
|
||||
messageMap.put("pointName", pointInfo.getPointName());
|
||||
messageMap.put("pointAddress", pointInfo.getAddress());
|
||||
commonService.sendMessage(Arrays.asList(pointInfo.getDevelopmentManager()), MessageEnum.MESSAGE_11, messageMap);
|
||||
result = pointInfoDAO.updatePointInfo(updatePoint);
|
||||
}
|
||||
return result;
|
||||
@@ -414,7 +422,12 @@ public class PointServiceImpl implements PointService {
|
||||
pointInfoUpdate.setStorageStatus(StorageStatusEnum.NOT_IN_STORAGE.getCode());
|
||||
//删除剩余未完成的审核记录
|
||||
pointAuditRecordDAO.deletePointAuditRecord(pointId, pointInfo.getSubmitAuditCount());
|
||||
commonService.sendMessage(Arrays.asList(pointInfo.getDevelopmentManager()), MessageEnum.MESSAGE_12, pointInfo.getPointName(), pointInfo.getAddress(), reason);
|
||||
Map<String, String> messageMap = new HashMap<>();
|
||||
messageMap.put("pointId", String.valueOf(pointInfo.getId()));
|
||||
messageMap.put("pointName", pointInfo.getPointName());
|
||||
messageMap.put("pointAddress", pointInfo.getAddress());
|
||||
messageMap.put("reason", reason);
|
||||
commonService.sendMessage(Arrays.asList(pointInfo.getDevelopmentManager()), MessageEnum.MESSAGE_12, messageMap);
|
||||
return pointInfoDAO.updatePointInfo(pointInfoUpdate);
|
||||
}
|
||||
|
||||
@@ -685,7 +698,13 @@ public class PointServiceImpl implements PointService {
|
||||
//更新已被选择的铺位的拓展经理
|
||||
pointInfoDAO.updateSelectedDevelopmentManager(lineId, request.getDevelopmentManager());
|
||||
String wantShopName = hyOpenAreaInfoDAO.selectNameMapById(lineInfo.getWantShopAreaId());
|
||||
commonService.sendMessage(Arrays.asList(request.getDevelopmentManager()), MessageEnum.MESSAGE_14, lineInfo.getUsername(), lineInfo.getMobile(), wantShopName);
|
||||
|
||||
Map<String, String> messageMap = new HashMap<>();
|
||||
messageMap.put("lineId", String.valueOf(lineId));
|
||||
messageMap.put("partnerUsername", lineInfo.getUsername());
|
||||
messageMap.put("partnerMobile", lineInfo.getMobile());
|
||||
messageMap.put("wantShopName", wantShopName);
|
||||
commonService.sendMessage(Arrays.asList(request.getDevelopmentManager()), MessageEnum.MESSAGE_14, messageMap);
|
||||
//删除未选择的推荐铺位
|
||||
return pointRecommendDAO.turnLineUpdateRecommendStatus(lineId, request.getDevelopmentManager());
|
||||
}
|
||||
|
||||
@@ -31,7 +31,12 @@ public class PCTestController {
|
||||
|
||||
@GetMapping("/sendMessage")
|
||||
public ResponseResult<Boolean> sendMessage(){
|
||||
commonService.sendMessage(Arrays.asList("123836131931284423"), MessageEnum.MESSAGE_1, "张三", "浙江-杭州");
|
||||
Map<String, String> messageMap = new HashMap<>();
|
||||
messageMap.put("lineId", "217");
|
||||
messageMap.put("partnerUsername", "彪~");
|
||||
messageMap.put("partnerMobile", "17681878615");
|
||||
messageMap.put("wantShopName", "杭州市余杭区");
|
||||
commonService.sendMessage(Arrays.asList("123836131931284423"), MessageEnum.MESSAGE_14, messageMap);
|
||||
return ResponseResult.success(Boolean.FALSE);
|
||||
}
|
||||
|
||||
|
||||
@@ -79,6 +79,7 @@ xxl.job.accessToken = 25365115eed84e9ba5e0040abb255a09
|
||||
exhibition.channel.id=52399
|
||||
recommended.channel.id=52400
|
||||
|
||||
cool.app.id=80685
|
||||
coolstore.page.domain=https://t2store.coolstore.cn/
|
||||
|
||||
xfsg.url=https://inf-test.xianfengsg.com/InfService
|
||||
|
||||
@@ -74,6 +74,7 @@ wx.pay.privateKeyPath=D:\\weixin\\apiclient_key.pem
|
||||
aliyun.accessKeyId=LTAI5tQ6QBnWaB5LaJYz6zcD
|
||||
aliyun.accessKeySecret=spqsOgtfr54cwK861O3N3fInydTgjA
|
||||
|
||||
cool.app.id=80685
|
||||
coolstore.page.domain=https://t2store.coolstore.cn/
|
||||
|
||||
xfsg.url=https://inf-test.xianfengsg.com/InfService
|
||||
|
||||
@@ -79,6 +79,9 @@ xxl.job.accessToken=25365115eed84e9ba5e0040abb255a09
|
||||
exhibition.channel.id=52399
|
||||
recommended.channel.id=52400
|
||||
|
||||
cool.app.id=78836
|
||||
coolstore.page.domain=https://store.coolstore.cn/
|
||||
|
||||
xfsg.url=https://inf.xianfengsg.com/InfService
|
||||
|
||||
aliyun.sms.accessKeyId=LTAI5tAVZ3r9UtSpLGcmGoQn
|
||||
|
||||
@@ -79,7 +79,8 @@ xxl.job.accessToken = 25365115eed84e9ba5e0040abb255a09
|
||||
exhibition.channel.id=52399
|
||||
recommended.channel.id=52400
|
||||
|
||||
coolstore.page.domain=https://t2store.coolstore.cn/
|
||||
cool.app.id=80685
|
||||
coolstore.page.domain=https://tstore.coolstore.cn/
|
||||
|
||||
xfsg.url=https://inf-test.xianfengsg.com/InfService
|
||||
|
||||
|
||||
Reference in New Issue
Block a user