Merge branch 'cc_20250211_v2.6' into 'master'
Cc 20250211 v2.6 See merge request hangzhou/java/custom_zxjp!48
This commit is contained in:
@@ -22,6 +22,8 @@ public class CommonConstants {
|
|||||||
|
|
||||||
public static final int THREE_DAY_SECONDS = 60 * 60 * 24 * 3;
|
public static final int THREE_DAY_SECONDS = 60 * 60 * 24 * 3;
|
||||||
|
|
||||||
|
public static final int SEVEN_DAY_SECONDS = 60 * 60 * 24 * 7;
|
||||||
|
|
||||||
public static final int NORMAL_LOCK_TIMES = 60 * 1000;
|
public static final int NORMAL_LOCK_TIMES = 60 * 1000;
|
||||||
|
|
||||||
public static final int AN_HOUR_SECONDS = 3600;
|
public static final int AN_HOUR_SECONDS = 3600;
|
||||||
@@ -48,6 +50,8 @@ public class CommonConstants {
|
|||||||
public static final String WX_APP_SECRET_KEY = "wx_app_secret_key:{0}";
|
public static final String WX_APP_SECRET_KEY = "wx_app_secret_key:{0}";
|
||||||
public static final String MINI_PROGRAM_SESSION_KEY = "mini_program_session_key:{0}:{1}";
|
public static final String MINI_PROGRAM_SESSION_KEY = "mini_program_session_key:{0}:{1}";
|
||||||
|
|
||||||
|
public static final String ZXJP_MINI_PROGRAM_LOGIN_FLAG = "zxjp_mini_program_login_flag:{0}";
|
||||||
|
|
||||||
public static final String ROOT_DEPT_ID_STR = "1";
|
public static final String ROOT_DEPT_ID_STR = "1";
|
||||||
|
|
||||||
public static final Integer DEAL_RECORD_MAX_SIZE = 1000;
|
public static final Integer DEAL_RECORD_MAX_SIZE = 1000;
|
||||||
@@ -192,4 +196,7 @@ public class CommonConstants {
|
|||||||
public static final String ONLINE_ENV = "online";
|
public static final String ONLINE_ENV = "online";
|
||||||
public static final String AMOUNT_KEY = "amount:{0}:{1}";
|
public static final String AMOUNT_KEY = "amount:{0}:{1}";
|
||||||
|
|
||||||
|
public static final String WX_SELF_AUTH_URL = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=%s&redirect_uri=%s&response_type=code&scope=snsapi_base&state=1#wechat_redirect";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ public enum ErrorCodeEnum {
|
|||||||
PARAMS_REQUIRED(400002, "参数缺失!", null),
|
PARAMS_REQUIRED(400002, "参数缺失!", null),
|
||||||
DATA_CONVERT_ERROR(400002, "日期转换异常!", null),
|
DATA_CONVERT_ERROR(400002, "日期转换异常!", null),
|
||||||
PARENT_NODE_NOT_EXIST(400002, "父节点不存在", null),
|
PARENT_NODE_NOT_EXIST(400002, "父节点不存在", null),
|
||||||
|
LOGIN_ERROR_MOBILE_ERROR(418, "登录失败 获取手机号失败!!", null),
|
||||||
|
|
||||||
|
|
||||||
LINE_ID_IS_NOT_EXIST(500001, "线索信息不存在!", null),
|
LINE_ID_IS_NOT_EXIST(500001, "线索信息不存在!", null),
|
||||||
|
|||||||
@@ -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,37 +17,38 @@ 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"),
|
||||||
MESSAGE_10("您收到一份二次面审预约,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 预约时间:${appointmentTime}\n"),
|
MESSAGE_10("您收到一份二次面审预约,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 预约时间:${appointmentTime}\n"),
|
||||||
MESSAGE_10_1("您的线索已预约二次面审,请关注", "##### 加盟商姓名:${partnerUsername}\n面审官:${interviewUsername}\n##### 预约时间:${appointmentTime}\n"),
|
MESSAGE_10_1("您的线索已预约二次面审,请关注", "##### 加盟商姓名:${partnerUsername}\n面审官:${interviewUsername}\n##### 预约时间:${appointmentTime}\n"),
|
||||||
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}"),
|
||||||
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##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_16_1("您有一家门店待提交系统建店申请,请查收", "##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_16_1("您有一家门店待提交系统建店申请,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_17("您收到一份证照信息审核申请,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_17("您收到一份证照信息审核申请,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_18("您有一个门店已缴纳加盟费/保证金,请审核", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_18("您有一个门店已缴纳加盟费/保证金,请审核", " 门店名称:${storeName}\n 加盟商姓名:${partnerUsername}\n 加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_19("您有一个门店待提交加盟合同审核,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_19("您有一个门店待提交加盟合同,请查收", "门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
MESSAGE_20("您有一个门店的加盟合同审核未通过,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerName}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
MESSAGE_20("您有一个门店的加盟合同审核未通过,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\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("您有一个门店待发布加盟费/保证金账单,请查收", "加盟商姓名:${partnerUsername}\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,7 +59,24 @@ 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"),
|
||||||
|
MESSAGE_43("您有一个门店已提交抖音建店资料,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_44("您有一个门店已提交美团外卖建店资料,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_45("您有一个门店已提交美团团购建店资料,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_46("您有一个门店已提交饿了么建店资料,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_47("您有一个门店已提交快手建店资料,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_48("您有一个门店饿了么初审已通过,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_49("您有一个门店美团外卖初审已通过,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_50("您有一个门店开业运营方案审核未通过,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
MESSAGE_51("您有一个加盟商提交了铺位,请查收","铺位名称:${pointName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
@@ -174,4 +195,40 @@ public enum MessageEnum {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getQWMessageUrl(String qywxUrl2, String corpId, Map<String, String> paramMap,String target,String eid) {
|
||||||
|
if (StringUtils.isAnyBlank(qywxUrl2, corpId) ) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
String messageUrl = null;
|
||||||
|
try {
|
||||||
|
String noticeUrl = String.format(qywxUrl2, corpId,"qw_self_dkf",target,corpId,"qw_self_dkf",eid);
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,89 @@
|
|||||||
|
package com.cool.store.enums;
|
||||||
|
|
||||||
|
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.net.URLEncoder;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.StringJoiner;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: WangShuo
|
||||||
|
* @Date: 2025/02/11/16:06
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
public enum QWMessageEnum {
|
||||||
|
MESSAGE_1("common","您有一个待办任务,请尽快处理。", ""),
|
||||||
|
;
|
||||||
|
|
||||||
|
private String target;
|
||||||
|
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
private String content;
|
||||||
|
QWMessageEnum(String target,String title, String content) {
|
||||||
|
this.target = target;
|
||||||
|
this.title = title;
|
||||||
|
this.content = content;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTarget() {
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
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 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",this.target);
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.entity.PartnerUserWechatBindDO;
|
||||||
|
import com.cool.store.mapper.PartnerUserWechatBindMapper;
|
||||||
|
import com.cool.store.utils.StringUtil;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/2/19 15:09
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public class PartnerUserWechatBindDAO {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PartnerUserWechatBindMapper partnerUserWechatBindMapper;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
* @param partnerUserWechatBindDO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Integer insertSelective(PartnerUserWechatBindDO partnerUserWechatBindDO) {
|
||||||
|
if (partnerUserWechatBindDO == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return partnerUserWechatBindMapper.insert(partnerUserWechatBindDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public PartnerUserWechatBindDO getByOpenIdAndPartnerId(String partnerId, String openId) {
|
||||||
|
if (StringUtil.isEmpty(partnerId)|| StringUtil.isEmpty(openId)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return partnerUserWechatBindMapper.selectByPartnerAndOpenId(partnerId,openId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.entity.PartnerUserWechatBindDO;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2025/2/19 15:07
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public interface PartnerUserWechatBindMapper {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
* @param partnerUserWechatBindDO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer insert(PartnerUserWechatBindDO partnerUserWechatBindDO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据partnerId与openId查询
|
||||||
|
* @param partnerId
|
||||||
|
* @param openId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PartnerUserWechatBindDO selectByPartnerAndOpenId(String partnerId, String openId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -17,6 +17,7 @@
|
|||||||
<select id="getPayTimeByShopIds" resultType="com.cool.store.dto.FranchiseFeeDTO">
|
<select id="getPayTimeByShopIds" resultType="com.cool.store.dto.FranchiseFeeDTO">
|
||||||
select a.shop_id AS shopId ,
|
select a.shop_id AS shopId ,
|
||||||
b.pay_time as payTime,
|
b.pay_time as payTime,
|
||||||
|
b.combined_field as combinedField,
|
||||||
a.year_franchise_fee as yearFranchiseFee,
|
a.year_franchise_fee as yearFranchiseFee,
|
||||||
a.first_year_manage_fee as firstYearManagementFee,
|
a.first_year_manage_fee as firstYearManagementFee,
|
||||||
a.loan_margin as loanMargin,
|
a.loan_margin as loanMargin,
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||||
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
||||||
|
<result column="annex" jdbcType="VARCHAR" property="annex"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -24,11 +24,12 @@
|
|||||||
<result column="deleted" jdbcType="BIT" property="deleted"/>
|
<result column="deleted" jdbcType="BIT" property="deleted"/>
|
||||||
<result column="pay_business_type" jdbcType="TINYINT" property="payBusinessType"/>
|
<result column="pay_business_type" jdbcType="TINYINT" property="payBusinessType"/>
|
||||||
<result column="amount" jdbcType="DECIMAL" property="amount"/>
|
<result column="amount" jdbcType="DECIMAL" property="amount"/>
|
||||||
|
<result column="combined_field" jdbcType="VARCHAR" property="combinedField"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id,shop_id, partner_id, line_id, pay_status, pay_type, pay_user_name, pay_account, bank_code,
|
id,shop_id, partner_id, line_id, pay_status, pay_type, pay_user_name, pay_account, bank_code,
|
||||||
bank_name, branch_bank_code, branch_bank_name, pay_time, pay_pic, promise_pic, create_time,
|
bank_name, branch_bank_code, branch_bank_name, pay_time, pay_pic, promise_pic, create_time,
|
||||||
update_time, create_user_id, update_user_id, deleted,pay_business_type,amount
|
update_time, create_user_id, update_user_id, deleted,pay_business_type,amount,combined_field
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
@@ -77,12 +78,9 @@
|
|||||||
<if test="branchBankName != null">
|
<if test="branchBankName != null">
|
||||||
branch_bank_name,
|
branch_bank_name,
|
||||||
</if>
|
</if>
|
||||||
<if test="payTime != null">
|
|
||||||
pay_time,
|
pay_time,
|
||||||
</if>
|
|
||||||
<if test="payPic != null">
|
|
||||||
pay_pic,
|
pay_pic,
|
||||||
</if>
|
|
||||||
<if test="promisePic != null">
|
<if test="promisePic != null">
|
||||||
promise_pic,
|
promise_pic,
|
||||||
</if>
|
</if>
|
||||||
@@ -110,6 +108,9 @@
|
|||||||
<if test="amount != null">
|
<if test="amount != null">
|
||||||
amount,
|
amount,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="combinedField != null">
|
||||||
|
combined_field,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="partnerId != null">
|
<if test="partnerId != null">
|
||||||
@@ -142,12 +143,8 @@
|
|||||||
<if test="branchBankName != null">
|
<if test="branchBankName != null">
|
||||||
#{branchBankName,jdbcType=VARCHAR},
|
#{branchBankName,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="payTime != null">
|
|
||||||
#{payTime,jdbcType=TIMESTAMP},
|
#{payTime,jdbcType=TIMESTAMP},
|
||||||
</if>
|
|
||||||
<if test="payPic != null">
|
|
||||||
#{payPic,jdbcType=VARCHAR},
|
#{payPic,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="promisePic != null">
|
<if test="promisePic != null">
|
||||||
#{promisePic,jdbcType=VARCHAR},
|
#{promisePic,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
@@ -175,6 +172,9 @@
|
|||||||
<if test="amount !=null">
|
<if test="amount !=null">
|
||||||
#{amount},
|
#{amount},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="combinedField != null">
|
||||||
|
#{combinedField,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.LinePayDO">
|
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.LinePayDO">
|
||||||
@@ -210,12 +210,9 @@
|
|||||||
<if test="branchBankName != null">
|
<if test="branchBankName != null">
|
||||||
branch_bank_name = #{branchBankName,jdbcType=VARCHAR},
|
branch_bank_name = #{branchBankName,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="payTime != null">
|
|
||||||
pay_time = #{payTime,jdbcType=TIMESTAMP},
|
pay_time = #{payTime,jdbcType=TIMESTAMP},
|
||||||
</if>
|
|
||||||
<if test="payPic != null">
|
|
||||||
pay_pic = #{payPic,jdbcType=VARCHAR},
|
pay_pic = #{payPic,jdbcType=VARCHAR},
|
||||||
</if>
|
|
||||||
<if test="promisePic != null">
|
<if test="promisePic != null">
|
||||||
promise_pic = #{promisePic,jdbcType=VARCHAR},
|
promise_pic = #{promisePic,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
@@ -237,6 +234,9 @@
|
|||||||
<if test="amount != null">
|
<if test="amount != null">
|
||||||
amount = #{amount,jdbcType=VARCHAR},
|
amount = #{amount,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="combinedField != null">
|
||||||
|
combined_field = #{combinedField,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=BIGINT}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.cool.store.mapper.PartnerUserWechatBindMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<resultMap id="BaseResultMap" type="com.cool.store.entity.PartnerUserWechatBindDO">
|
||||||
|
<id column="id" property="id" jdbcType="BIGINT" />
|
||||||
|
<result column="open_id" property="openId" jdbcType="VARCHAR" />
|
||||||
|
<result column="bind_time" property="bindTime" jdbcType="TIMESTAMP" />
|
||||||
|
<result column="partner_id" property="partnerId" jdbcType="VARCHAR" />
|
||||||
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||||
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<insert id="insert" parameterType="com.cool.store.entity.PartnerUserWechatBindDO">
|
||||||
|
INSERT INTO xfsg_partner_user_wechat_bind (
|
||||||
|
open_id,
|
||||||
|
bind_time,
|
||||||
|
partner_id,
|
||||||
|
create_time
|
||||||
|
) VALUES (
|
||||||
|
#{openId, jdbcType=VARCHAR},
|
||||||
|
#{bindTime, jdbcType=TIMESTAMP},
|
||||||
|
#{partnerId, jdbcType=VARCHAR},
|
||||||
|
#{createTime, jdbcType=TIMESTAMP}
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<select id="selectByPartnerAndOpenId" resultMap="BaseResultMap">
|
||||||
|
select * from xfsg_partner_user_wechat_bind where partner_id = #{partnerId} and open_id = #{openId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
limit 1
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByShopIds" resultType="com.cool.store.entity.SignFranchiseDO">
|
<select id="selectByShopIds" resultType="com.cool.store.entity.SignFranchiseDO">
|
||||||
select contract_code,shop_id,contract_start_time,contract_end_time
|
select contract_code,shop_id,contract_start_time,contract_end_time,contract_amount
|
||||||
from xfsg_sign_franchise
|
from xfsg_sign_franchise
|
||||||
where 1=1
|
where 1=1
|
||||||
<if test="list !=null and list.size >0">
|
<if test="list !=null and list.size >0">
|
||||||
|
|||||||
@@ -161,6 +161,16 @@ public class ExportBranchShopDTO {
|
|||||||
@ExcelProperty(value = "开店时长(天)",order =37)
|
@ExcelProperty(value = "开店时长(天)",order =37)
|
||||||
@ColumnWidth(30)
|
@ColumnWidth(30)
|
||||||
private String openDuration;
|
private String openDuration;
|
||||||
|
@ExcelProperty(value = "缴纳加盟费/保证金",order =38)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String franchiseFeeStageStatus;
|
||||||
|
@ExcelProperty(value = "加盟合同签约",order =39)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String signFranchiseStageStatus ;
|
||||||
|
@ExcelProperty(value = "合同金额",order =40)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String contractAmount;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ public class FranchiseFeeDTO {
|
|||||||
private String firstYearFee;
|
private String firstYearFee;
|
||||||
//履约保证金
|
//履约保证金
|
||||||
private String performanceBond;
|
private String performanceBond;
|
||||||
|
//组合字段
|
||||||
|
private String combinedField;
|
||||||
|
|
||||||
private List<Date> payTimeList;
|
private List<Date> payTimeList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,6 +111,9 @@ public class InvoicingDTO {
|
|||||||
private BigDecimal actualPaymentAmount;
|
private BigDecimal actualPaymentAmount;
|
||||||
|
|
||||||
private String financialRemarks;
|
private String financialRemarks;
|
||||||
|
@Column(name = "annex")
|
||||||
|
@ApiModelProperty("附件")
|
||||||
|
private String annex;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -112,6 +112,8 @@ public class InvoicingDO {
|
|||||||
private BigDecimal actualPaymentAmount;
|
private BigDecimal actualPaymentAmount;
|
||||||
|
|
||||||
private String financialRemarks;
|
private String financialRemarks;
|
||||||
|
@Column(name = "annex")
|
||||||
|
private String annex;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return id
|
* @return id
|
||||||
|
|||||||
@@ -84,4 +84,7 @@ public class LinePayDO implements Serializable {
|
|||||||
private Integer payBusinessType;
|
private Integer payBusinessType;
|
||||||
@ApiModelProperty("缴费金额")
|
@ApiModelProperty("缴费金额")
|
||||||
private BigDecimal amount;
|
private BigDecimal amount;
|
||||||
|
|
||||||
|
@ApiModelProperty("组合字段:缴费时间+付款截图,数组")
|
||||||
|
private String combinedField;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.cool.store.entity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* C端微信用户映射表DO
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author ZhangHua
|
||||||
|
* @since 2024/08/19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PartnerUserWechatBindDO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平台内用户标识
|
||||||
|
*/
|
||||||
|
private String openId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定时间
|
||||||
|
*/
|
||||||
|
private Date bindTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* zl_partner_user_info.partner_id
|
||||||
|
*/
|
||||||
|
private String partnerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -54,4 +54,6 @@ public class SignFranchiseDO {
|
|||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
@Column(name = "contract_code")
|
@Column(name = "contract_code")
|
||||||
private String contractCode;
|
private String contractCode;
|
||||||
|
@Column(name = "contract_amount")
|
||||||
|
private String contractAmount;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ public class AddSignFranchiseRequest {
|
|||||||
|
|
||||||
@ApiModelProperty("合同编码")
|
@ApiModelProperty("合同编码")
|
||||||
private String contractCode;
|
private String contractCode;
|
||||||
|
@ApiModelProperty("合同金额")
|
||||||
|
private String contractAmount;
|
||||||
|
|
||||||
|
|
||||||
public SignFranchiseDO toSignFranchiseDO() {
|
public SignFranchiseDO toSignFranchiseDO() {
|
||||||
@@ -85,6 +87,7 @@ public class AddSignFranchiseRequest {
|
|||||||
signFranchiseDO.setResign(this.resign);
|
signFranchiseDO.setResign(this.resign);
|
||||||
signFranchiseDO.setMobile(this.mobile);
|
signFranchiseDO.setMobile(this.mobile);
|
||||||
signFranchiseDO.setContractCode(this.contractCode);
|
signFranchiseDO.setContractCode(this.contractCode);
|
||||||
|
signFranchiseDO.setContractAmount(this.contractAmount);
|
||||||
return signFranchiseDO;
|
return signFranchiseDO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ public class LinePaySubmitRequest {
|
|||||||
@ApiModelProperty("支行名称")
|
@ApiModelProperty("支行名称")
|
||||||
private String branchBankName;
|
private String branchBankName;
|
||||||
|
|
||||||
|
//正新缴纳加盟费后续:payTime,payPic废弃使用combinedField
|
||||||
@ApiModelProperty("缴纳时间")
|
@ApiModelProperty("缴纳时间")
|
||||||
private String payTime;
|
private String payTime;
|
||||||
|
|
||||||
@@ -57,4 +58,6 @@ public class LinePaySubmitRequest {
|
|||||||
private Long shopId;
|
private Long shopId;
|
||||||
@ApiModelProperty("缴费金额")
|
@ApiModelProperty("缴费金额")
|
||||||
private BigDecimal amount;
|
private BigDecimal amount;
|
||||||
|
@ApiModelProperty("组合字段:缴费时间+付款截图,数组")
|
||||||
|
private String combinedField;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,5 +162,7 @@ public class AddSignFranchiseResponse {
|
|||||||
private Date resultTime;
|
private Date resultTime;
|
||||||
@ApiModelProperty("合同编码")
|
@ApiModelProperty("合同编码")
|
||||||
private String contractCode;
|
private String contractCode;
|
||||||
|
@ApiModelProperty("合同金额")
|
||||||
|
private String contractAmount;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,6 +119,8 @@ public class FranchiseFeeResponse {
|
|||||||
|
|
||||||
@ApiModelProperty("审核状态 0通过,1拒绝")
|
@ApiModelProperty("审核状态 0通过,1拒绝")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
@ApiModelProperty("组合字段:缴费时间+付款截图,数组")
|
||||||
|
private String combinedField;
|
||||||
|
|
||||||
public static LinePay from(LinePayDO linePayDO) {
|
public static LinePay from(LinePayDO linePayDO) {
|
||||||
if (linePayDO == null) {
|
if (linePayDO == null) {
|
||||||
@@ -145,6 +147,7 @@ public class FranchiseFeeResponse {
|
|||||||
linePayDO1.setUpdateUserId(linePayDO.getUpdateUserId());
|
linePayDO1.setUpdateUserId(linePayDO.getUpdateUserId());
|
||||||
linePayDO1.setDeleted(linePayDO.getDeleted());
|
linePayDO1.setDeleted(linePayDO.getDeleted());
|
||||||
linePayDO1.setPayBusinessType(linePayDO.getPayBusinessType());
|
linePayDO1.setPayBusinessType(linePayDO.getPayBusinessType());
|
||||||
|
linePayDO1.setCombinedField(linePayDO.getCombinedField());
|
||||||
return linePayDO1;
|
return linePayDO1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ public interface WechatMiniAppService {
|
|||||||
|
|
||||||
PartnerUserInfoVO getUserInfoByJsCode(String jsCode);
|
PartnerUserInfoVO getUserInfoByJsCode(String jsCode);
|
||||||
|
|
||||||
|
Boolean cancellation(String openId);
|
||||||
|
|
||||||
String getUserPhoneNumber(String mobileCode);
|
String getUserPhoneNumber(String mobileCode);
|
||||||
|
|
||||||
String updateUserPhoneNumber(MobileUpdateRequest request, PartnerUserInfoVO userInfoVO);
|
String updateUserPhoneNumber(MobileUpdateRequest request, PartnerUserInfoVO userInfoVO);
|
||||||
|
|||||||
@@ -5,13 +5,8 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.cool.store.context.CurrentUserHolder;
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.entity.EnterpriseUserDO;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.entity.OpeningOperationPlanDO;
|
import com.cool.store.enums.*;
|
||||||
import com.cool.store.entity.ShopAuditInfoDO;
|
|
||||||
import com.cool.store.enums.AuditResultTypeEnum;
|
|
||||||
import com.cool.store.enums.AuditTypeEnum;
|
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
|
||||||
import com.cool.store.enums.OpeningOperationPlanResultTypeEnum;
|
|
||||||
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;
|
||||||
import com.cool.store.request.OpeningOperationPlanAuditRequest;
|
import com.cool.store.request.OpeningOperationPlanAuditRequest;
|
||||||
@@ -21,6 +16,9 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
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.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,6 +40,12 @@ public class AuditOpeningOperationPlanImpl implements AuditOpeningOperationPlanS
|
|||||||
private PreparationService preparationService;
|
private PreparationService preparationService;
|
||||||
@Resource
|
@Resource
|
||||||
private ShopAuditInfoDAO shopAuditInfoDAO;
|
private ShopAuditInfoDAO shopAuditInfoDAO;
|
||||||
|
@Resource
|
||||||
|
private LineInfoDAO lineInfoDAO;
|
||||||
|
@Resource
|
||||||
|
private ShopInfoDAO shopInfoDAO;
|
||||||
|
@Resource
|
||||||
|
private CommonService commonService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@@ -67,7 +71,16 @@ public class AuditOpeningOperationPlanImpl implements AuditOpeningOperationPlanS
|
|||||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_143;
|
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_143;
|
||||||
flag = Boolean.TRUE;
|
flag = Boolean.TRUE;
|
||||||
}else {
|
}else {
|
||||||
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||||
|
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_142;
|
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_142;
|
||||||
|
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_50,
|
||||||
|
map);
|
||||||
}
|
}
|
||||||
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(),
|
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(),
|
||||||
shopSubStageStatusEnum, auditId);
|
shopSubStageStatusEnum, auditId);
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ import org.springframework.stereotype.Service;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -81,6 +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()),
|
||||||
|
MessageEnum.MESSAGE_6,
|
||||||
|
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,44 @@ 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 = new ArrayList<>();
|
||||||
|
if (Objects.nonNull(itList)){
|
||||||
|
itUsers.addAll(itList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
commonService.sendQWMessage(itUsers,
|
||||||
|
MessageEnum.MESSAGE_39,
|
||||||
|
map);
|
||||||
|
List<EnterpriseUserDO> posList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.HUO_MA_EMPLOYEE, shopInfoDO.getRegionId());
|
||||||
|
List<String> posUsers = new ArrayList<>();
|
||||||
|
if (Objects.nonNull(posList)){
|
||||||
|
posUsers.addAll( 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 = new ArrayList<>();
|
||||||
|
if(Objects.nonNull(xfList)){
|
||||||
|
xfUsers.addAll(xfList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
commonService.sendQWMessage(xfUsers,
|
||||||
|
MessageEnum.MESSAGE_40,
|
||||||
|
map);
|
||||||
|
List<EnterpriseUserDO> zxtList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.TENT_PASS_CUSTOMER, shopInfoDO.getRegionId());
|
||||||
|
List<String> zxtUsers = new ArrayList<>();
|
||||||
|
if(Objects.nonNull(zxtList)){
|
||||||
|
zxtUsers.addAll(zxtList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
commonService.sendQWMessage(zxtUsers,
|
||||||
|
MessageEnum.MESSAGE_41,
|
||||||
|
map);
|
||||||
return buildInformationDAO.insertSelective(buildInformationDO);
|
return buildInformationDAO.insertSelective(buildInformationDO);
|
||||||
}else {
|
}else {
|
||||||
buildInformationDO.setUpdateTime(new Date());
|
buildInformationDO.setUpdateTime(new Date());
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.aliyun.auth.credentials.Credential;
|
import com.aliyun.auth.credentials.Credential;
|
||||||
import com.aliyun.auth.credentials.provider.StaticCredentialProvider;
|
import com.aliyun.auth.credentials.provider.StaticCredentialProvider;
|
||||||
import com.aliyun.sdk.service.dysmsapi20170525.models.*;
|
import com.aliyun.sdk.service.dysmsapi20170525.models.*;
|
||||||
import com.aliyun.sdk.service.dysmsapi20170525.*;
|
|
||||||
import com.aliyun.sdk.service.dysmsapi20170525.AsyncClient;
|
import com.aliyun.sdk.service.dysmsapi20170525.AsyncClient;
|
||||||
import com.cool.store.dao.EnterpriseUserDAO;
|
import com.cool.store.dao.EnterpriseUserDAO;
|
||||||
import com.cool.store.dto.message.SendMessageDTO;
|
import com.cool.store.dto.message.SendMessageDTO;
|
||||||
@@ -13,7 +12,6 @@ import com.cool.store.mq.producer.SimpleMessageService;
|
|||||||
import com.cool.store.request.AuditResultRequest;
|
import com.cool.store.request.AuditResultRequest;
|
||||||
import com.cool.store.utils.UUIDUtils;
|
import com.cool.store.utils.UUIDUtils;
|
||||||
import com.cool.store.utils.poi.constant.Constants;
|
import com.cool.store.utils.poi.constant.Constants;
|
||||||
import com.google.gson.Gson;
|
|
||||||
import darabonba.core.client.ClientOverrideConfiguration;
|
import darabonba.core.client.ClientOverrideConfiguration;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
@@ -24,14 +22,9 @@ import org.springframework.context.ApplicationContext;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.net.URLEncoder;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.text.MessageFormat;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.ExecutorService;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -64,6 +57,10 @@ public class CommonService {
|
|||||||
private String smsAccessKeySecret;
|
private String smsAccessKeySecret;
|
||||||
@Value("${aliyun.sms.signName}")
|
@Value("${aliyun.sms.signName}")
|
||||||
private String signName;
|
private String signName;
|
||||||
|
// @Value("${qywx.task.notice.url1}")
|
||||||
|
// private String qywxUrl1;
|
||||||
|
@Value("${qywx.task.notice.url2}")
|
||||||
|
private String qywxUrl2;
|
||||||
|
|
||||||
public LineFlowService getLineFlowService(Integer workflowSubStage){
|
public LineFlowService getLineFlowService(Integer workflowSubStage){
|
||||||
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(workflowSubStage);
|
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(workflowSubStage);
|
||||||
@@ -181,4 +178,57 @@ public class CommonService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消息通知
|
||||||
|
* @param userIds 消息接收人列表
|
||||||
|
* @param message 消息内容
|
||||||
|
* @param 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));
|
||||||
|
if(CollectionUtils.isEmpty(userIds)){
|
||||||
|
log.info("消息接收人列表为空");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
userIds = userIds.stream().filter(StringUtils::isNotBlank).collect(Collectors.toList());
|
||||||
|
if(CollectionUtils.isEmpty(userIds)){
|
||||||
|
log.info("消息接收人列表为空");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
// String pcMessageUrl = message.getQWMessageUrl(qywxUrl1, dingCorpId, requestMap);
|
||||||
|
String messageUrl = message.getQWMessageUrl(qywxUrl2, dingCorpId, requestMap,"todo",enterpriseId);
|
||||||
|
log.info("messageUrl:{}", messageUrl);
|
||||||
|
if(StringUtils.isBlank(messageUrl)){
|
||||||
|
log.info("获取通知url为空");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (StringUtils.isEmpty(requestMap.get("eid"))) {
|
||||||
|
requestMap.put("eid", enterpriseId);
|
||||||
|
}
|
||||||
|
SendMessageDTO messageDTO = new SendMessageDTO();
|
||||||
|
messageDTO.setCorpId(dingCorpId);
|
||||||
|
messageDTO.setUserIds(String.join(Constants.COMMA, userIds));
|
||||||
|
messageDTO.setOutBusinessId(UUIDUtils.get32UUID());
|
||||||
|
messageDTO.setAppType("qw_self_dkf");
|
||||||
|
JSONObject map = new JSONObject();
|
||||||
|
|
||||||
|
map.put("message_url", messageUrl);
|
||||||
|
log.info("【sendMessage】,message_url【{}】",messageUrl);
|
||||||
|
JSONObject headJson = new JSONObject();
|
||||||
|
headJson.put("bgcolor", "FFBBBBBB");
|
||||||
|
map.put("head", headJson);
|
||||||
|
JSONObject body = new JSONObject();
|
||||||
|
body.put("title", message.getTitle());
|
||||||
|
body.put("content", message.getContent(requestMap));
|
||||||
|
map.put("body",body);
|
||||||
|
messageDTO.setOaJson(map);
|
||||||
|
simpleMessageService.send(JSONObject.toJSONString(messageDTO), RocketMqTagEnum.STORE_DING_QUEUE);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,7 +134,9 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
}
|
}
|
||||||
//预算
|
//预算
|
||||||
BudgetDTO proposedBookBudget = getBudgetDTOS(decoration);
|
BudgetDTO proposedBookBudget = getBudgetDTOS(decoration);
|
||||||
if (proposedBookBudget == null) {return null;}
|
if (proposedBookBudget == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
BigDecimal vzHj = proposedBookBudget.getVzHj();
|
BigDecimal vzHj = proposedBookBudget.getVzHj();
|
||||||
//支付二维码url
|
//支付二维码url
|
||||||
DecorationModelDTO decorationModelDTO = new DecorationModelDTO();
|
DecorationModelDTO decorationModelDTO = new DecorationModelDTO();
|
||||||
@@ -361,6 +363,15 @@ 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());
|
||||||
|
commonService.sendQWMessage(Collections.singletonList(shopInfoDO.getInvestmentManager()),
|
||||||
|
MessageEnum.MESSAGE_37,
|
||||||
|
map);
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -379,7 +390,7 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
List<fitmentCheckVO> fitmentCheckVOList = new ArrayList<>();
|
List<fitmentCheckVO> fitmentCheckVOList = new ArrayList<>();
|
||||||
//shopId,lineid,regionid,shopname,storenum,
|
//shopId,lineid,regionid,shopname,storenum,
|
||||||
|
|
||||||
List<ShopInfoDO> shopInfoDOS = shopInfoMapper.selectShopListByRegionId(regions, ShopSubStageEnum.SHOP_STAGE_12.getShopSubStage(),request.getSubStageStatus(),null);
|
List<ShopInfoDO> shopInfoDOS = shopInfoMapper.selectShopListByRegionId(regions, ShopSubStageEnum.SHOP_STAGE_12.getShopSubStage(), request.getSubStageStatus(), null);
|
||||||
PageInfo pageInfo = new PageInfo<>(shopInfoDOS);
|
PageInfo pageInfo = new PageInfo<>(shopInfoDOS);
|
||||||
if (shopInfoDOS.isEmpty()) {
|
if (shopInfoDOS.isEmpty()) {
|
||||||
log.info("该工程部监理下门店为空");
|
log.info("该工程部监理下门店为空");
|
||||||
@@ -450,7 +461,7 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(ShopStageInfoDOMap.get(shopId))) {
|
if (Objects.nonNull(ShopStageInfoDOMap.get(shopId))) {
|
||||||
fitmentCheckVO.setShopSubStageStatus(ShopStageInfoDOMap.getOrDefault(shopId,new ShopStageInfoDO()).getShopSubStageStatus());
|
fitmentCheckVO.setShopSubStageStatus(ShopStageInfoDOMap.getOrDefault(shopId, new ShopStageInfoDO()).getShopSubStageStatus());
|
||||||
}
|
}
|
||||||
fitmentCheckVOList.add(fitmentCheckVO);
|
fitmentCheckVOList.add(fitmentCheckVO);
|
||||||
}
|
}
|
||||||
@@ -517,25 +528,25 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
//重复提交校验 3秒内不能重复提交
|
//重复提交校验 3秒内不能重复提交
|
||||||
String lockKey = "submitDecorationDesign:" + request.getShopId();
|
String lockKey = "submitDecorationDesign:" + request.getShopId();
|
||||||
String lockValue = UUID.randomUUID().toString();
|
String lockValue = UUID.randomUUID().toString();
|
||||||
boolean acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.THREE*CommonConstants.ONE_SECONDS);
|
boolean acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.THREE * CommonConstants.ONE_SECONDS);
|
||||||
if (!acquired){
|
if (!acquired) {
|
||||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||||
}
|
}
|
||||||
//校验参数
|
//校验参数
|
||||||
if (Objects.isNull(request)||request.getShopId()==null){
|
if (Objects.isNull(request) || request.getShopId() == null) {
|
||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
}
|
}
|
||||||
//必须是待提交状态才能提交
|
//必须是待提交状态才能提交
|
||||||
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getByShopIdAndSubStage(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_9.getShopSubStage());
|
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getByShopIdAndSubStage(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_9.getShopSubStage());
|
||||||
if (shopStageInfo!=null&&!ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90.getShopSubStageStatus().equals(shopStageInfo.getShopSubStageStatus())) {
|
if (shopStageInfo != null && !ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90.getShopSubStageStatus().equals(shopStageInfo.getShopSubStageStatus())) {
|
||||||
throw new ServiceException(ErrorCodeEnum.STATUS_NOT_SUPPORT_SUMMIT);
|
throw new ServiceException(ErrorCodeEnum.STATUS_NOT_SUPPORT_SUMMIT);
|
||||||
}
|
}
|
||||||
DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO();
|
DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO();
|
||||||
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
|
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
|
||||||
if (Objects.nonNull(decoration)){
|
if (Objects.nonNull(decoration)) {
|
||||||
decorationDesignInfoDO.setId(decoration.getId());
|
decorationDesignInfoDO.setId(decoration.getId());
|
||||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO);
|
decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO);
|
||||||
}else {
|
} else {
|
||||||
decorationDesignInfoDAO.insertSelective(decorationDesignInfoDO);
|
decorationDesignInfoDAO.insertSelective(decorationDesignInfoDO);
|
||||||
}
|
}
|
||||||
//更新装修设计状态
|
//更新装修设计状态
|
||||||
@@ -544,17 +555,17 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId());
|
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId());
|
||||||
Map<String, String> templateParam = new HashMap<>();
|
Map<String, String> templateParam = new HashMap<>();
|
||||||
templateParam.put("shopName", shopInfo.getShopName());
|
templateParam.put("shopName", shopInfo.getShopName());
|
||||||
commonService.sendSms(lineInfo.getMobile(),SMSMsgEnum.DESIGN_STAGE,templateParam);
|
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.DESIGN_STAGE, templateParam);
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DecorationDesignVO getDecorationDesign(Long shopId) {
|
public DecorationDesignVO getDecorationDesign(Long shopId) {
|
||||||
if (shopId==null){
|
if (shopId == null) {
|
||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
}
|
}
|
||||||
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(shopId);
|
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(shopId);
|
||||||
if (!Objects.isNull(decoration)){
|
if (!Objects.isNull(decoration)) {
|
||||||
DecorationDesignVO decorationDesignVO = new DecorationDesignVO();
|
DecorationDesignVO decorationDesignVO = new DecorationDesignVO();
|
||||||
decorationDesignVO.setDesignUrl(decoration.getDesignUrl());
|
decorationDesignVO.setDesignUrl(decoration.getDesignUrl());
|
||||||
decorationDesignVO.setRemark(decoration.getRemark());
|
decorationDesignVO.setRemark(decoration.getRemark());
|
||||||
@@ -570,17 +581,17 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
public Boolean submitConstructionData(ConstructionRequest request, LoginUserInfo user) {
|
public Boolean submitConstructionData(ConstructionRequest request, LoginUserInfo user) {
|
||||||
String lockKey = "submitConstructionData:" + request.getShopId();
|
String lockKey = "submitConstructionData:" + request.getShopId();
|
||||||
String lockValue = UUID.randomUUID().toString();
|
String lockValue = UUID.randomUUID().toString();
|
||||||
boolean acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.THREE*CommonConstants.ONE_SECONDS);
|
boolean acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.THREE * CommonConstants.ONE_SECONDS);
|
||||||
if (!acquired){
|
if (!acquired) {
|
||||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||||
}
|
}
|
||||||
//校验参数
|
//校验参数
|
||||||
if (Objects.isNull(request)||request.getShopId()==null){
|
if (Objects.isNull(request) || request.getShopId() == null) {
|
||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
}
|
}
|
||||||
//必须是待提交状态才能提交
|
//必须是待提交状态才能提交
|
||||||
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getByShopIdAndSubStage(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_11.getShopSubStage());
|
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getByShopIdAndSubStage(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_11.getShopSubStage());
|
||||||
if (shopStageInfo!=null&&!ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus().equals(shopStageInfo.getShopSubStageStatus())) {
|
if (shopStageInfo != null && !ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus().equals(shopStageInfo.getShopSubStageStatus())) {
|
||||||
throw new ServiceException(ErrorCodeEnum.STATUS_NOT_SUPPORT_SUMMIT);
|
throw new ServiceException(ErrorCodeEnum.STATUS_NOT_SUPPORT_SUMMIT);
|
||||||
}
|
}
|
||||||
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
|
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
|
||||||
@@ -600,16 +611,16 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
public ConstructionDataVO getConstructionData(Long shopId) {
|
public ConstructionDataVO getConstructionData(Long shopId) {
|
||||||
ConstructionDataVO constructionDataVO = new ConstructionDataVO();
|
ConstructionDataVO constructionDataVO = new ConstructionDataVO();
|
||||||
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(shopId);
|
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(shopId);
|
||||||
if (Objects.isNull(decoration)){
|
if (Objects.isNull(decoration)) {
|
||||||
return constructionDataVO;
|
return constructionDataVO;
|
||||||
}
|
}
|
||||||
constructionDataVO.setConstructionAnnex(decoration.getConstructionAnnex());
|
constructionDataVO.setConstructionAnnex(decoration.getConstructionAnnex());
|
||||||
constructionDataVO.setConstructionRemark(decoration.getConstructionRemark());
|
constructionDataVO.setConstructionRemark(decoration.getConstructionRemark());
|
||||||
constructionDataVO.setConstructionPlanStartTime(decoration.getConstructionPlanStartTime()!=null?decoration.getConstructionPlanStartTime().getTime():null);
|
constructionDataVO.setConstructionPlanStartTime(decoration.getConstructionPlanStartTime() != null ? decoration.getConstructionPlanStartTime().getTime() : null);
|
||||||
constructionDataVO.setConstructionPlanEndTime(decoration.getConstructionPlanEndTime()!=null?decoration.getConstructionPlanEndTime().getTime():null);
|
constructionDataVO.setConstructionPlanEndTime(decoration.getConstructionPlanEndTime() != null ? decoration.getConstructionPlanEndTime().getTime() : null);
|
||||||
constructionDataVO.setConstructionCreateTime(decoration.getConstructionCreateTime()!=null?decoration.getConstructionCreateTime().getTime():null);
|
constructionDataVO.setConstructionCreateTime(decoration.getConstructionCreateTime() != null ? decoration.getConstructionCreateTime().getTime() : null);
|
||||||
constructionDataVO.setConstructionCreateUser(decoration.getConstructionCreateUser());
|
constructionDataVO.setConstructionCreateUser(decoration.getConstructionCreateUser());
|
||||||
if (StringUtils.isNotEmpty(decoration.getConstructionCreateUser())){
|
if (StringUtils.isNotEmpty(decoration.getConstructionCreateUser())) {
|
||||||
EnterpriseUserDO user = enterpriseUserDAO.getUserInfoById(decoration.getConstructionCreateUser());
|
EnterpriseUserDO user = enterpriseUserDAO.getUserInfoById(decoration.getConstructionCreateUser());
|
||||||
constructionDataVO.setConstructionCreateUserName(user.getName());
|
constructionDataVO.setConstructionCreateUserName(user.getName());
|
||||||
}
|
}
|
||||||
@@ -622,18 +633,27 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
//重复提交校验 3秒内不能重复提交
|
//重复提交校验 3秒内不能重复提交
|
||||||
String lockKey = "confirmDesign:" + request.getShopId();
|
String lockKey = "confirmDesign:" + request.getShopId();
|
||||||
String lockValue = UUID.randomUUID().toString();
|
String lockValue = UUID.randomUUID().toString();
|
||||||
boolean acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.THREE*CommonConstants.ONE_SECONDS);
|
boolean acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.THREE * CommonConstants.ONE_SECONDS);
|
||||||
if (!acquired){
|
if (!acquired) {
|
||||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||||
}
|
}
|
||||||
DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO();
|
DecorationDesignInfoDO decorationDesignInfoDO = request.toDecorationDesignInfoDO();
|
||||||
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
|
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
|
||||||
if (Objects.nonNull(decoration)){
|
if (Objects.nonNull(decoration)) {
|
||||||
decorationDesignInfoDO.setId(decoration.getId());
|
decorationDesignInfoDO.setId(decoration.getId());
|
||||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO);
|
decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO);
|
||||||
}
|
}
|
||||||
//更新装修设计状态
|
//更新装修设计状态
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -642,11 +662,11 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
public Boolean confirmComplete(Long shopId, LoginUserInfo user) {
|
public Boolean confirmComplete(Long shopId, LoginUserInfo user) {
|
||||||
//判断施工阶段是否时施工中 施工中才能施工完成
|
//判断施工阶段是否时施工中 施工中才能施工完成
|
||||||
ShopStageInfoDO shopStageInfoDO = shopStageInfoDAO.getByShopIdAndSubStage(shopId, ShopSubStageEnum.SHOP_STAGE_11.getShopSubStage());
|
ShopStageInfoDO shopStageInfoDO = shopStageInfoDAO.getByShopIdAndSubStage(shopId, ShopSubStageEnum.SHOP_STAGE_11.getShopSubStage());
|
||||||
if (shopStageInfoDO!=null && !ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus().equals(shopStageInfoDO.getShopSubStageStatus())){
|
if (shopStageInfoDO != null && !ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus().equals(shopStageInfoDO.getShopSubStageStatus())) {
|
||||||
throw new ServiceException(ErrorCodeEnum.DESIGN_NO_COMPLETE);
|
throw new ServiceException(ErrorCodeEnum.DESIGN_NO_COMPLETE);
|
||||||
}
|
}
|
||||||
AcceptanceInfoDO acceptance = acceptanceInfoDAO.selectByShopId(shopId);
|
AcceptanceInfoDO acceptance = acceptanceInfoDAO.selectByShopId(shopId);
|
||||||
if(Objects.isNull(acceptance)) {
|
if (Objects.isNull(acceptance)) {
|
||||||
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
|
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
|
||||||
acceptanceInfoDO.setShopId(shopId);
|
acceptanceInfoDO.setShopId(shopId);
|
||||||
acceptanceInfoDO.setCreateTime(new Date());
|
acceptanceInfoDO.setCreateTime(new Date());
|
||||||
@@ -657,7 +677,7 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId());
|
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfo.getLineId());
|
||||||
Map<String, String> templateParam = new HashMap<>();
|
Map<String, String> templateParam = new HashMap<>();
|
||||||
templateParam.put("shopName", shopInfo.getShopName());
|
templateParam.put("shopName", shopInfo.getShopName());
|
||||||
commonService.sendSms(lineInfo.getMobile(),SMSMsgEnum.CONSTRUCTION_STAGE,templateParam);
|
commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.CONSTRUCTION_STAGE, templateParam);
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,9 @@ import com.cool.store.utils.easyExcel.EasyExcelUtil;
|
|||||||
import com.cool.store.utils.poi.DateUtils;
|
import com.cool.store.utils.poi.DateUtils;
|
||||||
import com.cool.store.utils.poi.StringUtils;
|
import com.cool.store.utils.poi.StringUtils;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.JsonNode;
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@@ -39,6 +42,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
|
import java.text.ParseException;
|
||||||
import java.time.temporal.ChronoUnit;
|
import java.time.temporal.ChronoUnit;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
@@ -97,6 +101,7 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private InvoicingDAO invoicingDAO;
|
private InvoicingDAO invoicingDAO;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Async
|
@Async
|
||||||
public void branchShopList(List<BranchShopResponse> list, ImportTaskDO importTaskDO) {
|
public void branchShopList(List<BranchShopResponse> list, ImportTaskDO importTaskDO) {
|
||||||
@@ -107,9 +112,20 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
|
|||||||
List<Long> shopIds = list.stream().map(BranchShopResponse::getShopId).collect(Collectors.toList());
|
List<Long> shopIds = list.stream().map(BranchShopResponse::getShopId).collect(Collectors.toList());
|
||||||
List<SignFranchiseDO> signFranchises = signFranchiseMapper.selectByShopIds(shopIds);
|
List<SignFranchiseDO> signFranchises = signFranchiseMapper.selectByShopIds(shopIds);
|
||||||
List<FranchiseFeeDTO> franchiseFees = franchiseFeeMapper.getPayTimeByShopIds(shopIds);
|
List<FranchiseFeeDTO> franchiseFees = franchiseFeeMapper.getPayTimeByShopIds(shopIds);
|
||||||
Map<Long, Date> payTimeMap = franchiseFees.stream().filter(o -> o.getPayTime() != null)
|
List<ShopStageInfoDO> franchiseFeeStages = shopStageInfoDAO.getSubStageList(shopIds, ShopSubStageEnum.SHOP_STAGE_7.getShopSubStage());
|
||||||
.filter(o -> o.getShopId() != null)
|
Map<Long, Integer> franchiseFeeStageMap = franchiseFeeStages.stream().filter(o -> o.getShopId() != null).collect(Collectors.toMap(ShopStageInfoDO::getShopId, ShopStageInfoDO::getShopSubStageStatus));
|
||||||
.collect(Collectors.toMap(FranchiseFeeDTO::getShopId, FranchiseFeeDTO::getPayTime));
|
List<ShopStageInfoDO> signFranchisesStages = shopStageInfoDAO.getSubStageList(shopIds, ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage());
|
||||||
|
Map<Long, Integer> signFranchisesStageMap = signFranchisesStages.stream().filter(o -> o.getShopId() != null).collect(Collectors.toMap(ShopStageInfoDO::getShopId, ShopStageInfoDO::getShopSubStageStatus));
|
||||||
|
Map<Long, List<Date>> payTimeMap = new HashMap<>();
|
||||||
|
for (FranchiseFeeDTO dto : franchiseFees) {
|
||||||
|
List<Date> payTimeList = JsonToDate(dto.getCombinedField());
|
||||||
|
if (dto.getPayTime() != null) {
|
||||||
|
payTimeList.add(dto.getPayTime());
|
||||||
|
}
|
||||||
|
Collections.sort(payTimeList);
|
||||||
|
payTimeMap.put(dto.getShopId(), payTimeList);
|
||||||
|
}
|
||||||
|
|
||||||
Map<Long, FranchiseFeeDTO> franchiseFeeDTOMap = franchiseFees.stream().filter(o -> o.getShopId() != null)
|
Map<Long, FranchiseFeeDTO> franchiseFeeDTOMap = franchiseFees.stream().filter(o -> o.getShopId() != null)
|
||||||
.collect(Collectors.toMap(FranchiseFeeDTO::getShopId, Function.identity()));
|
.collect(Collectors.toMap(FranchiseFeeDTO::getShopId, Function.identity()));
|
||||||
Map<Long, SignFranchiseDO> signFranchiseMap = new HashMap<>();
|
Map<Long, SignFranchiseDO> signFranchiseMap = new HashMap<>();
|
||||||
@@ -148,13 +164,27 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
|
|||||||
dto.setInvestmentManager(response.getInvestmentManagerName());
|
dto.setInvestmentManager(response.getInvestmentManagerName());
|
||||||
SignFranchiseDO signFranchiseDO = signFranchiseMap.get(response.getShopId());
|
SignFranchiseDO signFranchiseDO = signFranchiseMap.get(response.getShopId());
|
||||||
if (signFranchiseDO != null) {
|
if (signFranchiseDO != null) {
|
||||||
|
dto.setContractAmount(signFranchiseDO.getContractAmount());
|
||||||
dto.setContractCode(signFranchiseDO.getContractCode());
|
dto.setContractCode(signFranchiseDO.getContractCode());
|
||||||
dto.setContractStartTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, signFranchiseDO.getContractStartTime()));
|
dto.setContractStartTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, signFranchiseDO.getContractStartTime()));
|
||||||
dto.setContractEndTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, signFranchiseDO.getContractEndTime()));
|
dto.setContractEndTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, signFranchiseDO.getContractEndTime()));
|
||||||
}
|
}
|
||||||
Date payTime = payTimeMap.get(response.getShopId());
|
List<Date> payTime = payTimeMap.getOrDefault(response.getShopId(), new ArrayList<>());
|
||||||
if (Objects.nonNull(payTime)) {
|
for (int i = 0; i < payTime.size() && i <= 3; i++) {
|
||||||
dto.setFirstPayTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, payTime));
|
switch (i) {
|
||||||
|
case 0:
|
||||||
|
dto.setFirstPayTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, payTime.get(i)));
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
dto.setSecondPayTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, payTime.get(i)));
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
dto.setThirdPayTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, payTime.get(i)));
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
dto.setFourthPayTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, payTime.get(i)));
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
InvoicingDO invoicingDO = InvoicingMap.get(response.getShopId());
|
InvoicingDO invoicingDO = InvoicingMap.get(response.getShopId());
|
||||||
if (invoicingDO != null) {
|
if (invoicingDO != null) {
|
||||||
@@ -168,6 +198,35 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
|
|||||||
dto.setDesignFeeTax(toString(invoicingDO.getDesignServiceFeeTax()));
|
dto.setDesignFeeTax(toString(invoicingDO.getDesignServiceFeeTax()));
|
||||||
dto.setDesignFee(toString(invoicingDO.getDesignServiceFee()));
|
dto.setDesignFee(toString(invoicingDO.getDesignServiceFee()));
|
||||||
}
|
}
|
||||||
|
Integer franchiseFeeStageStatus = franchiseFeeStageMap.getOrDefault(response.getShopId(), 0);
|
||||||
|
switch (franchiseFeeStageStatus) {
|
||||||
|
case 700:
|
||||||
|
dto.setFranchiseFeeStageStatus("待提交账单");
|
||||||
|
break;
|
||||||
|
case 710:
|
||||||
|
dto.setFranchiseFeeStageStatus("待缴费");
|
||||||
|
break;
|
||||||
|
case 720:
|
||||||
|
dto.setFranchiseFeeStageStatus("待审核");
|
||||||
|
break;
|
||||||
|
case 730:
|
||||||
|
dto.setFranchiseFeeStageStatus("已缴费");
|
||||||
|
break;
|
||||||
|
case 740:
|
||||||
|
dto.setFranchiseFeeStageStatus("审核未通过");
|
||||||
|
break;
|
||||||
|
default: dto.setFranchiseFeeStageStatus("");
|
||||||
|
}
|
||||||
|
Integer signFranchisesStageStatus = signFranchisesStageMap.getOrDefault(response.getShopId(), 0);
|
||||||
|
switch (signFranchisesStageStatus) {
|
||||||
|
case 800:
|
||||||
|
dto.setSignFranchiseStageStatus("待提交");
|
||||||
|
break;
|
||||||
|
case 840:
|
||||||
|
dto.setSignFranchiseStageStatus("已签约");
|
||||||
|
break;
|
||||||
|
default: dto.setSignFranchiseStageStatus("");
|
||||||
|
}
|
||||||
dto.setCurrentProgress(response.getCompletionColumn() + "/" + response.getTotalColumn());
|
dto.setCurrentProgress(response.getCompletionColumn() + "/" + response.getTotalColumn());
|
||||||
dto.setShopStatus(response.getShopStatus());
|
dto.setShopStatus(response.getShopStatus());
|
||||||
dto.setPlanOpenTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, response.getPlanOpenTime()));
|
dto.setPlanOpenTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, response.getPlanOpenTime()));
|
||||||
@@ -198,5 +257,26 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
|
|||||||
}
|
}
|
||||||
return o.toString();
|
return o.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<Date> JsonToDate(String json) {
|
||||||
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
// 解析JSON字符串为JsonNode对象
|
||||||
|
JsonNode jsonNode = null;
|
||||||
|
try {
|
||||||
|
jsonNode = mapper.readTree(json);
|
||||||
|
List<Date> payTimeList = new ArrayList<>();
|
||||||
|
// 遍历数组节点
|
||||||
|
for (JsonNode node : jsonNode) {
|
||||||
|
long payTime = node.get("payTime").asLong();
|
||||||
|
// 将时间戳转换为Date对象
|
||||||
|
Date date = new Date(payTime);
|
||||||
|
payTimeList.add(date);
|
||||||
|
}
|
||||||
|
return payTimeList;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.info("解析加盟费缴纳时间json失败");
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,7 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
import com.cool.store.dao.ShopStageInfoDAO;
|
import com.cool.store.dao.ShopStageInfoDAO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.AuditTypeEnum;
|
import com.cool.store.enums.*;
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
|
||||||
import com.cool.store.enums.MessageEnum;
|
|
||||||
import com.cool.store.enums.SMSMsgEnum;
|
|
||||||
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;
|
||||||
import com.cool.store.mapper.*;
|
import com.cool.store.mapper.*;
|
||||||
@@ -15,6 +12,7 @@ import com.cool.store.request.AuditFranchiseFeeRequest;
|
|||||||
import com.cool.store.request.FranchiseFeeRequest;
|
import com.cool.store.request.FranchiseFeeRequest;
|
||||||
import com.cool.store.response.FranchiseFeeResponse;
|
import com.cool.store.response.FranchiseFeeResponse;
|
||||||
import com.cool.store.service.FranchiseFeeService;
|
import com.cool.store.service.FranchiseFeeService;
|
||||||
|
import com.cool.store.service.UserAuthMappingService;
|
||||||
import com.cool.store.utils.poi.constant.Constants;
|
import com.cool.store.utils.poi.constant.Constants;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -23,6 +21,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -48,6 +47,8 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
CommonService commonService;
|
CommonService commonService;
|
||||||
|
@Resource
|
||||||
|
UserAuthMappingService userAuthMappingService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@@ -124,15 +125,26 @@ 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());
|
Set<String> franchiseContractUser = new HashSet<>();
|
||||||
requestMap.put("partnerName", lineInfo.getUsername());
|
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, shopInfoDO.getRegionId());
|
||||||
requestMap.put("partnerMobile", lineInfo.getMobile());
|
if (Objects.nonNull(joinUser)) {
|
||||||
requestMap.put("lineId", String.valueOf(lineInfo.getId()));
|
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
requestMap.put("shopId", String.valueOf(shopInfoDO.getId()));
|
franchiseContractUser.addAll(joinUserIds);
|
||||||
commonService.sendMessage(Collections.singletonList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_19, requestMap);
|
}
|
||||||
|
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, shopInfoDO.getRegionId());
|
||||||
|
if (Objects.nonNull(regionUser)) {
|
||||||
|
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
|
franchiseContractUser.addAll(regionUserIds);
|
||||||
|
}
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("partnerUsername",lineInfo.getUsername());
|
||||||
|
map.put("partnerMobile",lineInfo.getMobile());
|
||||||
|
map.put("storeName",shopInfoDO.getShopName());
|
||||||
|
commonService.sendQWMessage(new ArrayList<>(franchiseContractUser),
|
||||||
|
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,41 @@ 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<Long> regionIds = shopListByIds.stream().map(ShopInfoDO::getRegionId).collect(Collectors.toSet());
|
||||||
|
Set<String> userSet = shopListByIds.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toSet());
|
||||||
|
Set<String>publishFranchiseFeeUsers = new HashSet<>();
|
||||||
|
for (Long regionId : regionIds){
|
||||||
|
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, regionId);
|
||||||
|
if (Objects.nonNull(joinUser)){
|
||||||
|
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
|
publishFranchiseFeeUsers.addAll(joinUserIds);
|
||||||
|
}
|
||||||
|
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, regionId);
|
||||||
|
if (Objects.nonNull(regionUser)){
|
||||||
|
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
|
publishFranchiseFeeUsers.addAll(regionUserIds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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<>(publishFranchiseFeeUsers),
|
||||||
|
MessageEnum.MESSAGE_23,
|
||||||
|
map);
|
||||||
|
commonService.sendQWMessage(new ArrayList<>(userSet),
|
||||||
|
MessageEnum.MESSAGE_21,
|
||||||
|
map);
|
||||||
|
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,7 +197,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 +231,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 +253,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 +269,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;
|
||||||
|
|||||||
@@ -97,17 +97,13 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
|||||||
lineInfoDAO.insertOrUpdate(lineInfoParam);
|
lineInfoDAO.insertOrUpdate(lineInfoParam);
|
||||||
QualificationsInfoDO qualificationsInfoDO = request.toQualificationsInfoDO();
|
QualificationsInfoDO qualificationsInfoDO = request.toQualificationsInfoDO();
|
||||||
qualificationsInfoDAO.insertOrUpdate(qualificationsInfoDO);
|
qualificationsInfoDAO.insertOrUpdate(qualificationsInfoDO);
|
||||||
|
LineInfoDO lineInfoDO1 = lineInfoDAO.getLineInfo(request.getLineId());
|
||||||
// Map<String, String> requestMap = new HashMap<>();
|
Map<String, String> requestMap = new HashMap<>();
|
||||||
// requestMap.put("partnerUsername", lineInfoParam.getUsername());
|
requestMap.put("partnerUsername", lineInfoDO1.getUsername());
|
||||||
// requestMap.put("partnerMobile", lineInfoParam.getMobile());
|
requestMap.put("partnerMobile", lineInfoDO1.getMobile());
|
||||||
// requestMap.put("lineId", String.valueOf(lineInfoParam.getId()));
|
commonService.sendQWMessage(Collections.singletonList(lineInfoDO1.getInvestmentManager()),
|
||||||
// HyOpenAreaInfoDO openAreaInfoDO = openAreaInfoMapper.selectById(lineInfoParam.getWantShopAreaId());
|
MessageEnum.MESSAGE_1,
|
||||||
// requestMap.put("regionName", openAreaInfoDO.getAreaName());
|
requestMap);
|
||||||
//工作通知后面对接企业微信
|
|
||||||
// commonService.sendMessage(Collections.singletonList(lineInfoParam.getInvestmentManager()),
|
|
||||||
// MessageEnum.MESSAGE_29,
|
|
||||||
// requestMap);
|
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,10 +11,7 @@ import com.cool.store.dao.LinePayDAO;
|
|||||||
import com.cool.store.dao.ShopStageInfoDAO;
|
import com.cool.store.dao.ShopStageInfoDAO;
|
||||||
import com.cool.store.dto.AmountDTO;
|
import com.cool.store.dto.AmountDTO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.*;
|
||||||
import com.cool.store.enums.MessageEnum;
|
|
||||||
import com.cool.store.enums.WorkflowSubStageEnum;
|
|
||||||
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
|
||||||
import com.cool.store.enums.point.PayBusinessTypeEnum;
|
import com.cool.store.enums.point.PayBusinessTypeEnum;
|
||||||
import com.cool.store.enums.point.PayTypeEnum;
|
import com.cool.store.enums.point.PayTypeEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
@@ -24,6 +21,7 @@ import com.cool.store.mapper.LineInfoMapper;
|
|||||||
import com.cool.store.mapper.ShopInfoMapper;
|
import com.cool.store.mapper.ShopInfoMapper;
|
||||||
import com.cool.store.request.LinePaySubmitRequest;
|
import com.cool.store.request.LinePaySubmitRequest;
|
||||||
import com.cool.store.service.LinePayService;
|
import com.cool.store.service.LinePayService;
|
||||||
|
import com.cool.store.service.UserAuthMappingService;
|
||||||
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;
|
||||||
import com.cool.store.utils.poi.StringUtils;
|
import com.cool.store.utils.poi.StringUtils;
|
||||||
@@ -41,6 +39,7 @@ import javax.annotation.Resource;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author wxp
|
* @Author wxp
|
||||||
@@ -72,6 +71,8 @@ public class LinePayServiceImpl implements LinePayService {
|
|||||||
ShopInfoMapper shopInfoMapper;
|
ShopInfoMapper shopInfoMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private RedisUtilPool redisUtilPool;
|
private RedisUtilPool redisUtilPool;
|
||||||
|
@Resource
|
||||||
|
private UserAuthMappingService userAuthMappingService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LinePayVO getLinePayInfo(Long lineId, Integer businessType, Long shopId) {
|
public LinePayVO getLinePayInfo(Long lineId, Integer businessType, Long shopId) {
|
||||||
@@ -122,6 +123,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()),
|
||||||
|
MessageEnum.MESSAGE_6,
|
||||||
|
map);
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,24 +154,36 @@ 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());
|
Set<String> auditFranchiseFeeUsers = new HashSet<>();
|
||||||
requestMap.put("storeName", shopInfoDO.getShopName());
|
List<EnterpriseUserDO> branchUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.BRANCH_OFFICE, shopInfoDO.getRegionId());
|
||||||
requestMap.put("partnerName", lineInfo.getUsername());
|
if (Objects.nonNull(branchUser)) {
|
||||||
requestMap.put("partnerMobile", lineInfo.getMobile());
|
Set<String> branchUserIds = branchUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
requestMap.put("lineId", String.valueOf(lineInfo.getId()));
|
auditFranchiseFeeUsers.addAll(branchUserIds);
|
||||||
requestMap.put("shopId", String.valueOf(shopInfoDO.getId()));
|
}
|
||||||
//commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_18,requestMap);
|
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, shopInfoDO.getRegionId());
|
||||||
|
if (Objects.nonNull(regionUser)) {
|
||||||
|
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
|
auditFranchiseFeeUsers.addAll(regionUserIds);
|
||||||
|
}
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("partnerUsername", lineInfo.getUsername());
|
||||||
|
map.put("partnerMobile", lineInfo.getMobile());
|
||||||
|
map.put("storeName", shopInfoDO.getShopName());
|
||||||
|
commonService.sendQWMessage(new ArrayList<>(auditFranchiseFeeUsers),
|
||||||
|
MessageEnum.MESSAGE_18,
|
||||||
|
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);
|
||||||
Map<String, String> requestMap = new HashMap<>();
|
HashMap<String, String> map = new HashMap<>();
|
||||||
requestMap.put("partnerUsername", lineInfo.getUsername());
|
map.put("partnerUsername", lineInfo.getUsername());
|
||||||
requestMap.put("payTime", DateUtils.parseDateToStr(DateUtils.SPECIAL_DATE_START, linePayDO.getPayTime()));
|
map.put("partnerMobile", lineInfo.getMobile());
|
||||||
requestMap.put("lineId", String.valueOf(lineInfo.getId()));
|
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||||
// commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_5,requestMap);
|
MessageEnum.MESSAGE_5,
|
||||||
|
map);
|
||||||
}
|
}
|
||||||
return payId == null ? null : payId;
|
return payId == null ? null : payId;
|
||||||
}
|
}
|
||||||
@@ -185,6 +204,7 @@ public class LinePayServiceImpl implements LinePayService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void fillLinePay(Boolean isAdd, LinePayDO linePayDO, LinePaySubmitRequest request, PartnerUserInfoVO partnerUser) {
|
private void fillLinePay(Boolean isAdd, LinePayDO linePayDO, LinePaySubmitRequest request, PartnerUserInfoVO partnerUser) {
|
||||||
|
linePayDO.setCombinedField(request.getCombinedField());
|
||||||
linePayDO.setPayType(request.getPayType());
|
linePayDO.setPayType(request.getPayType());
|
||||||
linePayDO.setPayUserName(request.getPayUserName());
|
linePayDO.setPayUserName(request.getPayUserName());
|
||||||
linePayDO.setPayAccount(request.getPayAccount());
|
linePayDO.setPayAccount(request.getPayAccount());
|
||||||
@@ -192,7 +212,11 @@ public class LinePayServiceImpl implements LinePayService {
|
|||||||
linePayDO.setBankName(request.getBankName());
|
linePayDO.setBankName(request.getBankName());
|
||||||
linePayDO.setBranchBankCode(request.getBranchBankCode());
|
linePayDO.setBranchBankCode(request.getBranchBankCode());
|
||||||
linePayDO.setBranchBankName(request.getBranchBankName());
|
linePayDO.setBranchBankName(request.getBranchBankName());
|
||||||
linePayDO.setPayTime(DateUtils.dateTime("yyyy-MM-dd HH:mm:ss", request.getPayTime()));
|
if (Objects.nonNull(request.getPayTime())) {
|
||||||
|
linePayDO.setPayTime(DateUtils.dateTime("yyyy-MM-dd HH:mm:ss", request.getPayTime()));
|
||||||
|
}else {
|
||||||
|
linePayDO.setPayTime(null);
|
||||||
|
}
|
||||||
linePayDO.setPayPic(request.getPayPic());
|
linePayDO.setPayPic(request.getPayPic());
|
||||||
linePayDO.setPromisePic(request.getPromisePic());
|
linePayDO.setPromisePic(request.getPromisePic());
|
||||||
linePayDO.setPayStatus(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode());
|
linePayDO.setPayStatus(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode());
|
||||||
|
|||||||
@@ -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,27 @@ 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());
|
||||||
|
Set<String> planAuditUser = new HashSet<>();
|
||||||
|
List<EnterpriseUserDO> regionManagerUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_MANAGER, shopInfoDO.getRegionId());
|
||||||
|
if (Objects.nonNull(regionManagerUser)){
|
||||||
|
Set<String> regionManagerUserIds = regionManagerUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
|
planAuditUser.addAll(regionManagerUserIds);
|
||||||
|
}
|
||||||
|
List<EnterpriseUserDO> regionalManager = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGIONAL_MANAGER, shopInfoDO.getRegionId());
|
||||||
|
if (Objects.nonNull(regionalManager)){
|
||||||
|
Set<String> regionalManagerUserIds = regionalManager.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
|
planAuditUser.addAll(regionalManagerUserIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("partnerUsername",lineInfoDO.getUsername());
|
||||||
|
map.put("partnerMobile",lineInfoDO.getMobile());
|
||||||
|
map.put("storeName",shopInfoDO.getShopName());
|
||||||
|
commonService.sendQWMessage(new ArrayList<>(planAuditUser),
|
||||||
|
MessageEnum.MESSAGE_42,
|
||||||
|
map);
|
||||||
return planId;
|
return planId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,6 +78,8 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
|||||||
private PointInfoDAO pointInfoDAO;
|
private PointInfoDAO pointInfoDAO;
|
||||||
@Autowired
|
@Autowired
|
||||||
private RegionMapper regionMapper;
|
private RegionMapper regionMapper;
|
||||||
|
@Resource
|
||||||
|
private CommonService commonService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String juridicalIdCard(Long shopId) {
|
public String juridicalIdCard(Long shopId) {
|
||||||
@@ -97,6 +99,11 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
|||||||
PlatformBuildDO platformBuild = request.toDO();
|
PlatformBuildDO platformBuild = request.toDO();
|
||||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||||
Long regionId = shopInfo.getRegionId();
|
Long regionId = shopInfo.getRegionId();
|
||||||
|
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("partnerUsername", lineInfoDO.getUsername());
|
||||||
|
map.put("partnerMobile", lineInfoDO.getMobile());
|
||||||
|
map.put("storeName", shopInfo.getShopName());
|
||||||
//抖音
|
//抖音
|
||||||
if (type.equals(PlatformBuildEnum.DOU_YIN.getCode())) {
|
if (type.equals(PlatformBuildEnum.DOU_YIN.getCode())) {
|
||||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_18);
|
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_18);
|
||||||
@@ -104,12 +111,20 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
|||||||
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_182.getShopSubStageStatus())) {
|
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_182.getShopSubStageStatus())) {
|
||||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
}
|
}
|
||||||
|
List<EnterpriseUserDO> dyCustomerUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.DOU_YIN_CUSTOMER, regionId);
|
||||||
|
List<String> dyCustomerUserIds = new ArrayList<>();
|
||||||
|
if (Objects.nonNull(dyCustomerUser)) {
|
||||||
|
dyCustomerUserIds.addAll(dyCustomerUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
commonService.sendQWMessage(dyCustomerUserIds,
|
||||||
|
MessageEnum.MESSAGE_43,
|
||||||
|
map);
|
||||||
if (Objects.isNull(platformBuildDO)) {
|
if (Objects.isNull(platformBuildDO)) {
|
||||||
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_180, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_181,
|
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_180, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_181,
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.DOU_YIN_CUSTOMER, regionId));
|
dyCustomerUser);
|
||||||
} else {
|
} else {
|
||||||
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_182, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_181,
|
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_182, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_181,
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.DOU_YIN_CUSTOMER, regionId));
|
dyCustomerUser);
|
||||||
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuild);
|
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuild);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -120,12 +135,20 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
|||||||
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_222.getShopSubStageStatus())) {
|
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_222.getShopSubStageStatus())) {
|
||||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
}
|
}
|
||||||
|
List<EnterpriseUserDO> ksUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.KUAI_SHOU_CUSTOMER, regionId);
|
||||||
|
List<String> ksUserIds = new ArrayList<>();
|
||||||
|
if (Objects.nonNull(ksUser)) {
|
||||||
|
ksUserIds.addAll(ksUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
commonService.sendQWMessage(ksUserIds,
|
||||||
|
MessageEnum.MESSAGE_47,
|
||||||
|
map);
|
||||||
if (Objects.isNull(platformBuildDO)) {
|
if (Objects.isNull(platformBuildDO)) {
|
||||||
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_220, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_221,
|
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_220, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_221,
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.KUAI_SHOU_CUSTOMER, regionId));
|
ksUser);
|
||||||
} else {
|
} else {
|
||||||
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_222, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_221,
|
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_222, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_221,
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.KUAI_SHOU_CUSTOMER, regionId));
|
ksUser);
|
||||||
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuild);
|
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuild);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -136,12 +159,20 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
|||||||
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_202.getShopSubStageStatus())) {
|
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_202.getShopSubStageStatus())) {
|
||||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
}
|
}
|
||||||
|
List<EnterpriseUserDO> mtbcUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_BUY_CUSTOMER, regionId);
|
||||||
|
List<String> mtbcUserIds = new ArrayList<>();
|
||||||
|
if (Objects.nonNull(mtbcUser)) {
|
||||||
|
mtbcUserIds.addAll(mtbcUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
commonService.sendQWMessage(mtbcUserIds,
|
||||||
|
MessageEnum.MESSAGE_45,
|
||||||
|
map);
|
||||||
if (Objects.isNull(platformBuildDO)) {
|
if (Objects.isNull(platformBuildDO)) {
|
||||||
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_200, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_201,
|
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_200, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_201,
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_BUY_CUSTOMER, regionId));
|
mtbcUser);
|
||||||
} else {
|
} else {
|
||||||
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_202, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_201,
|
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_202, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_201,
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_BUY_CUSTOMER, regionId));
|
mtbcUser);
|
||||||
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuild);
|
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuild);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -152,12 +183,20 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
|||||||
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_214.getShopSubStageStatus())) {
|
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_214.getShopSubStageStatus())) {
|
||||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
}
|
}
|
||||||
|
List<EnterpriseUserDO> elmUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.E_L_ME_TUAN_OPERATIONS_CUSTOMER, regionId);
|
||||||
|
List<String> elmUserIds = new ArrayList<>();
|
||||||
|
if (Objects.nonNull(elmUser)) {
|
||||||
|
elmUserIds.addAll(elmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
commonService.sendQWMessage(elmUserIds,
|
||||||
|
MessageEnum.MESSAGE_46,
|
||||||
|
map);
|
||||||
if (Objects.isNull(platformBuildDO)) {
|
if (Objects.isNull(platformBuildDO)) {
|
||||||
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_210, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211,
|
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_210, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211,
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.E_L_ME_TUAN_OPERATIONS_CUSTOMER, regionId));
|
elmUser);
|
||||||
} else {
|
} else {
|
||||||
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_214, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211,
|
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_214, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211,
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.E_L_ME_TUAN_OPERATIONS_CUSTOMER, regionId));
|
elmUser);
|
||||||
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuild);
|
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuild);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -168,12 +207,20 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
|||||||
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_194.getShopSubStageStatus())) {
|
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_194.getShopSubStageStatus())) {
|
||||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
}
|
}
|
||||||
|
List<EnterpriseUserDO> mtocUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_OPERATIONS_CUSTOMER, regionId);
|
||||||
|
List<String> mtocUserIds = new ArrayList<>();
|
||||||
|
if (Objects.nonNull(mtocUser)) {
|
||||||
|
mtocUserIds.addAll(mtocUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
commonService.sendQWMessage(mtocUserIds,
|
||||||
|
MessageEnum.MESSAGE_44,
|
||||||
|
map);
|
||||||
if (Objects.isNull(platformBuildDO)) {
|
if (Objects.isNull(platformBuildDO)) {
|
||||||
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_190, SHOP_SUB_STAGE_STATUS_191,
|
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_190, SHOP_SUB_STAGE_STATUS_191,
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_OPERATIONS_CUSTOMER, regionId));
|
mtocUser);
|
||||||
} else {
|
} else {
|
||||||
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_194, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_191,
|
extracted(partnerUserInfoVO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_194, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_191,
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_OPERATIONS_CUSTOMER, regionId));
|
mtocUser);
|
||||||
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuild);
|
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuild);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -208,10 +255,12 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
|||||||
platformBuildInfoVO.setShopName(shopInfo.getShopName());
|
platformBuildInfoVO.setShopName(shopInfo.getShopName());
|
||||||
platformBuildInfoVO.setShopCode(shopInfo.getShopCode());
|
platformBuildInfoVO.setShopCode(shopInfo.getShopCode());
|
||||||
platformBuildInfoVO.setRegionName(regionNameMap.get(shopInfo.getRegionId()));
|
platformBuildInfoVO.setRegionName(regionNameMap.get(shopInfo.getRegionId()));
|
||||||
platformBuildInfoVO.setProvince(pointInfoDO.getProvince());
|
if (Objects.nonNull(pointInfoDO)) {
|
||||||
platformBuildInfoVO.setCity(pointInfoDO.getCity());
|
platformBuildInfoVO.setProvince(pointInfoDO.getProvince());
|
||||||
platformBuildInfoVO.setDistrict(pointInfoDO.getDistrict());
|
platformBuildInfoVO.setCity(pointInfoDO.getCity());
|
||||||
platformBuildInfoVO.setAddress(pointInfoDO.getAddress());
|
platformBuildInfoVO.setDistrict(pointInfoDO.getDistrict());
|
||||||
|
platformBuildInfoVO.setAddress(pointInfoDO.getAddress());
|
||||||
|
}
|
||||||
if (CollectionUtils.isNotEmpty(shopContractActualCompletionTime)) {
|
if (CollectionUtils.isNotEmpty(shopContractActualCompletionTime)) {
|
||||||
ScheduleDTO scheduleDTO = shopContractActualCompletionTime.get(CommonConstants.ZERO);
|
ScheduleDTO scheduleDTO = shopContractActualCompletionTime.get(CommonConstants.ZERO);
|
||||||
platformBuildInfoVO.setCompletionColumn(scheduleDTO.getCompletionColumn());
|
platformBuildInfoVO.setCompletionColumn(scheduleDTO.getCompletionColumn());
|
||||||
@@ -288,20 +337,20 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
|||||||
ShopAuditInfoDO auditInfo = shopAuditInfoDAO.getAuditInfo(platformBuildDO.getAuditId());
|
ShopAuditInfoDO auditInfo = shopAuditInfoDAO.getAuditInfo(platformBuildDO.getAuditId());
|
||||||
doSomething(platformBuildResponse, trial, auditInfo);
|
doSomething(platformBuildResponse, trial, auditInfo);
|
||||||
|
|
||||||
} else{
|
} else {
|
||||||
ShopAuditInfoDO auditInfo = shopAuditInfoDAO.getAuditInfo(platformBuildDO.getAuditId());
|
ShopAuditInfoDO auditInfo = shopAuditInfoDAO.getAuditInfo(platformBuildDO.getAuditId());
|
||||||
if (Objects.nonNull(auditInfo)) {
|
if (Objects.nonNull(auditInfo)) {
|
||||||
if (auditInfo.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
|
if (auditInfo.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
|
||||||
platformBuildResponse.setReason(auditInfo.getPassReason());
|
platformBuildResponse.setReason(auditInfo.getPassReason());
|
||||||
} else {
|
} else {
|
||||||
platformBuildResponse.setReason(auditInfo.getRejectReason());
|
platformBuildResponse.setReason(auditInfo.getRejectReason());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return platformBuildResponse;
|
return platformBuildResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doSomething(PlatformBuildResponse platformBuildResponse, OperationLogDO trial, ShopAuditInfoDO auditInfo ) {
|
private void doSomething(PlatformBuildResponse platformBuildResponse, OperationLogDO trial, ShopAuditInfoDO auditInfo) {
|
||||||
if (Objects.nonNull(trial)) {
|
if (Objects.nonNull(trial)) {
|
||||||
ShopAuditInfoDO atrialAuditInfo = shopAuditInfoDAO.getAuditInfo(trial.getAuditResultId());
|
ShopAuditInfoDO atrialAuditInfo = shopAuditInfoDAO.getAuditInfo(trial.getAuditResultId());
|
||||||
if (Objects.nonNull(atrialAuditInfo)) {
|
if (Objects.nonNull(atrialAuditInfo)) {
|
||||||
@@ -313,123 +362,144 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(auditInfo)) {
|
if (Objects.nonNull(auditInfo)) {
|
||||||
if (auditInfo.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
|
if (auditInfo.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
|
||||||
platformBuildResponse.setNewReason(auditInfo.getPassReason());
|
platformBuildResponse.setNewReason(auditInfo.getPassReason());
|
||||||
} else {
|
} else {
|
||||||
platformBuildResponse.setNewReason(auditInfo.getRejectReason());
|
platformBuildResponse.setNewReason(auditInfo.getRejectReason());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Integer firstAudit(PlatformBuildAuditRequest request) {
|
public Integer firstAudit(PlatformBuildAuditRequest request) {
|
||||||
Integer type = request.getType();
|
Integer type = request.getType();
|
||||||
Long shopId = request.getShopId();
|
Long shopId = request.getShopId();
|
||||||
PlatformBuildDO platformBuildDO = platformBuildDAO.selectOneByShopId(shopId, type);
|
PlatformBuildDO platformBuildDO = platformBuildDAO.selectOneByShopId(shopId, type);
|
||||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||||
Long regionId = shopInfo.getRegionId();
|
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||||
if (type.equals(PlatformBuildEnum.DOU_YIN.getCode())) {
|
Long regionId = shopInfo.getRegionId();
|
||||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_18);
|
HashMap<String, String> map = new HashMap<>();
|
||||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_181.getShopSubStageStatus())) {
|
map.put("partnerUsername", lineInfoDO.getUsername());
|
||||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
map.put("partnerMobile", lineInfoDO.getMobile());
|
||||||
|
map.put("storeName", shopInfo.getShopName());
|
||||||
|
if (type.equals(PlatformBuildEnum.DOU_YIN.getCode())) {
|
||||||
|
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_18);
|
||||||
|
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_181.getShopSubStageStatus())) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
|
}
|
||||||
|
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.DOU_YIN);
|
||||||
|
return doThing(platformBuildDO, request, shopAuditInfoDO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_181, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_183, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_182);
|
||||||
}
|
}
|
||||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.DOU_YIN);
|
|
||||||
return doThing(platformBuildDO, request, shopAuditInfoDO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_181, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_183, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_182);
|
if (type.equals(PlatformBuildEnum.KUAI_SHOU.getCode())) {
|
||||||
|
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_22);
|
||||||
|
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_221.getShopSubStageStatus())) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
|
}
|
||||||
|
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.KUAI_SHOU);
|
||||||
|
return doThing(platformBuildDO, request, shopAuditInfoDO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_221, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_223, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_222);
|
||||||
|
|
||||||
|
}
|
||||||
|
if (type.equals(PlatformBuildEnum.MEI_TUAN_TUAN_GOU.getCode())) {
|
||||||
|
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_20);
|
||||||
|
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_201.getShopSubStageStatus())) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
|
}
|
||||||
|
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.MEI_TUAN_TUAN_GOU);
|
||||||
|
return doThing(platformBuildDO, request, shopAuditInfoDO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_201, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_203, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_202);
|
||||||
|
|
||||||
|
}
|
||||||
|
if (type.equals(PlatformBuildEnum.E_LE_ME.getCode())) {
|
||||||
|
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_21);
|
||||||
|
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211.getShopSubStageStatus())) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
|
}
|
||||||
|
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.E_LE_ME);
|
||||||
|
doThing(platformBuildDO, request, shopAuditInfoDO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211, SHOP_SUB_STAGE_STATUS_213, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_214);
|
||||||
|
if (request.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
|
||||||
|
List<EnterpriseUserDO> elmUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.E_L_ME_HEADQUARTERS_BUILD_CUSTOMER, regionId);
|
||||||
|
List<String> elmUserIds = new ArrayList<>();
|
||||||
|
if (Objects.nonNull(elmUser)) {
|
||||||
|
elmUserIds.addAll(elmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
operationLogService.addOperationLog(shopId, SHOP_SUB_STAGE_STATUS_213, request.getOperateUserId(),
|
||||||
|
elmUser, OperationTypeEnum.OPERATION_TYPE_1, null, OperationStatusEnum.NOT_PROCESSED);
|
||||||
|
commonService.sendQWMessage(elmUserIds,
|
||||||
|
MessageEnum.MESSAGE_48,
|
||||||
|
map);
|
||||||
|
}
|
||||||
|
return CommonConstants.ONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (type.equals(PlatformBuildEnum.MEI_TUAN_WAI_MAI.getCode())) {
|
||||||
|
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_19);
|
||||||
|
if (!shopSubStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_191.getShopSubStageStatus())) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
|
}
|
||||||
|
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.MEI_TUAN_WAI_MAI);
|
||||||
|
doThing(platformBuildDO, request, shopAuditInfoDO, shopId, SHOP_SUB_STAGE_STATUS_191, SHOP_SUB_STAGE_STATUS_193, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_194);
|
||||||
|
if (request.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
|
||||||
|
List<EnterpriseUserDO> mtwmUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_HEADQUARTERS_BUILD_CUSTOMER, regionId);
|
||||||
|
List<String> mtwmUserIds = new ArrayList<>();
|
||||||
|
if (Objects.nonNull(mtwmUser)) {
|
||||||
|
mtwmUserIds.addAll(mtwmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
commonService.sendQWMessage(mtwmUserIds,
|
||||||
|
MessageEnum.MESSAGE_49,
|
||||||
|
map);
|
||||||
|
operationLogService.addOperationLog(shopId, SHOP_SUB_STAGE_STATUS_193, request.getOperateUserId(),
|
||||||
|
mtwmUser, OperationTypeEnum.OPERATION_TYPE_1, null, OperationStatusEnum.NOT_PROCESSED);
|
||||||
|
}
|
||||||
|
return CommonConstants.ONE;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type.equals(PlatformBuildEnum.KUAI_SHOU.getCode())) {
|
@Override
|
||||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_22);
|
public Integer secondAudit(PlatformBuildAuditRequest request) {
|
||||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_221.getShopSubStageStatus())) {
|
Integer type = request.getType();
|
||||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
Long shopId = request.getShopId();
|
||||||
|
PlatformBuildDO platformBuildDO = platformBuildDAO.selectOneByShopId(shopId, type);
|
||||||
|
if (type.equals(PlatformBuildEnum.E_LE_ME.getCode())) {
|
||||||
|
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_21);
|
||||||
|
if (!shopSubStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_213.getShopSubStageStatus())) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
|
}
|
||||||
|
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.E_LE_ME);
|
||||||
|
return doThing(platformBuildDO, request, shopAuditInfoDO, shopId, SHOP_SUB_STAGE_STATUS_213, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_215, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_214);
|
||||||
}
|
}
|
||||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.KUAI_SHOU);
|
|
||||||
return doThing(platformBuildDO, request, shopAuditInfoDO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_221, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_223, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_222);
|
|
||||||
|
|
||||||
}
|
if (type.equals(PlatformBuildEnum.MEI_TUAN_WAI_MAI.getCode())) {
|
||||||
if (type.equals(PlatformBuildEnum.MEI_TUAN_TUAN_GOU.getCode())) {
|
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_19);
|
||||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_20);
|
if (!shopSubStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_193.getShopSubStageStatus())) {
|
||||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_201.getShopSubStageStatus())) {
|
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
}
|
||||||
|
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.MEI_TUAN_WAI_MAI);
|
||||||
|
return doThing(platformBuildDO, request, shopAuditInfoDO, shopId, SHOP_SUB_STAGE_STATUS_193, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_195, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_194);
|
||||||
}
|
}
|
||||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.MEI_TUAN_TUAN_GOU);
|
return 0;
|
||||||
return doThing(platformBuildDO, request, shopAuditInfoDO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_201, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_203, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_202);
|
}
|
||||||
|
|
||||||
}
|
private Integer doThing(PlatformBuildDO platformBuildDO, PlatformBuildAuditRequest request, ShopAuditInfoDO shopAuditInfoDO, Long shopId, ShopSubStageStatusEnum nowStatus, ShopSubStageStatusEnum passStatus, ShopSubStageStatusEnum rejectStatus) {
|
||||||
if (type.equals(PlatformBuildEnum.E_LE_ME.getCode())) {
|
Long auditId = shopAuditInfoDAO.addAuditInfo(shopAuditInfoDO);
|
||||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_21);
|
|
||||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211.getShopSubStageStatus())) {
|
|
||||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
|
||||||
}
|
|
||||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.E_LE_ME);
|
|
||||||
doThing(platformBuildDO, request, shopAuditInfoDO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211, SHOP_SUB_STAGE_STATUS_213, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_214);
|
|
||||||
if (request.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
|
if (request.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
|
||||||
operationLogService.addOperationLog(shopId, SHOP_SUB_STAGE_STATUS_213, request.getOperateUserId(),
|
shopStageInfoDAO.updateShopStageInfo(shopId, passStatus);
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.E_L_ME_HEADQUARTERS_BUILD_CUSTOMER, regionId), OperationTypeEnum.OPERATION_TYPE_1, null, OperationStatusEnum.NOT_PROCESSED);
|
} else {
|
||||||
|
shopStageInfoDAO.updateShopStageInfo(shopId, rejectStatus);
|
||||||
}
|
}
|
||||||
return CommonConstants.ONE;
|
List<OperationLogDO> operationLogs = operationLogDAO.getBySubStageStatusEnumAndsStatus(shopId, nowStatus, OperationTypeEnum.OPERATION_TYPE_1.getCode());
|
||||||
|
operationLogService.batchUpdateProcessed(operationLogs, auditId, request.getOperateUserId(), request.getReason());
|
||||||
|
platformBuildDO.setAuditId(auditId);
|
||||||
|
platformBuildDO.setAccount(request.getAccount());
|
||||||
|
platformBuildDO.setPassword(request.getPassword());
|
||||||
|
platformBuildDO.setUpdateTime(new Date());
|
||||||
|
platformBuildDO.setUpdateUser(request.getOperateUserId());
|
||||||
|
platformBuildDO.setPoi(request.getPoi());
|
||||||
|
platformBuildDO.setStoreId(request.getStoreId());
|
||||||
|
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuildDO);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type.equals(PlatformBuildEnum.MEI_TUAN_WAI_MAI.getCode())) {
|
|
||||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_19);
|
|
||||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_191.getShopSubStageStatus())) {
|
|
||||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
|
||||||
}
|
|
||||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.MEI_TUAN_WAI_MAI);
|
|
||||||
doThing(platformBuildDO, request, shopAuditInfoDO, shopId, SHOP_SUB_STAGE_STATUS_191, SHOP_SUB_STAGE_STATUS_193, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_194);
|
|
||||||
if (request.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
|
|
||||||
operationLogService.addOperationLog(shopId, SHOP_SUB_STAGE_STATUS_193, request.getOperateUserId(),
|
|
||||||
userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_HEADQUARTERS_BUILD_CUSTOMER, regionId), OperationTypeEnum.OPERATION_TYPE_1, null, OperationStatusEnum.NOT_PROCESSED);
|
|
||||||
}
|
|
||||||
return CommonConstants.ONE;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Integer secondAudit(PlatformBuildAuditRequest request) {
|
|
||||||
Integer type = request.getType();
|
|
||||||
Long shopId = request.getShopId();
|
|
||||||
PlatformBuildDO platformBuildDO = platformBuildDAO.selectOneByShopId(shopId, type);
|
|
||||||
if (type.equals(PlatformBuildEnum.E_LE_ME.getCode())) {
|
|
||||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_21);
|
|
||||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_213.getShopSubStageStatus())) {
|
|
||||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
|
||||||
}
|
|
||||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.E_LE_ME);
|
|
||||||
return doThing(platformBuildDO, request, shopAuditInfoDO, shopId, SHOP_SUB_STAGE_STATUS_213, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_215, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_214);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (type.equals(PlatformBuildEnum.MEI_TUAN_WAI_MAI.getCode())) {
|
|
||||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_19);
|
|
||||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_193.getShopSubStageStatus())) {
|
|
||||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
|
||||||
}
|
|
||||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.MEI_TUAN_WAI_MAI);
|
|
||||||
return doThing(platformBuildDO, request, shopAuditInfoDO, shopId, SHOP_SUB_STAGE_STATUS_193, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_195, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_194);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Integer doThing(PlatformBuildDO platformBuildDO, PlatformBuildAuditRequest request, ShopAuditInfoDO shopAuditInfoDO, Long shopId, ShopSubStageStatusEnum nowStatus, ShopSubStageStatusEnum passStatus, ShopSubStageStatusEnum rejectStatus) {
|
|
||||||
Long auditId = shopAuditInfoDAO.addAuditInfo(shopAuditInfoDO);
|
|
||||||
if (request.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
|
|
||||||
shopStageInfoDAO.updateShopStageInfo(shopId, passStatus);
|
|
||||||
} else {
|
|
||||||
shopStageInfoDAO.updateShopStageInfo(shopId, rejectStatus);
|
|
||||||
}
|
|
||||||
List<OperationLogDO> operationLogs = operationLogDAO.getBySubStageStatusEnumAndsStatus(shopId, nowStatus, OperationTypeEnum.OPERATION_TYPE_1.getCode());
|
|
||||||
operationLogService.batchUpdateProcessed(operationLogs, auditId, request.getOperateUserId(), request.getReason());
|
|
||||||
platformBuildDO.setAuditId(auditId);
|
|
||||||
platformBuildDO.setAccount(request.getAccount());
|
|
||||||
platformBuildDO.setPassword(request.getPassword());
|
|
||||||
platformBuildDO.setUpdateTime(new Date());
|
|
||||||
platformBuildDO.setUpdateUser(request.getOperateUserId());
|
|
||||||
platformBuildDO.setPoi(request.getPoi());
|
|
||||||
platformBuildDO.setStoreId(request.getStoreId());
|
|
||||||
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuildDO);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -345,11 +345,10 @@ public class PointServiceImpl implements PointService {
|
|||||||
//审批通过的情况下 生成下一个节点的待办数据
|
//审批通过的情况下 生成下一个节点的待办数据
|
||||||
pointTodoInfoDAO.addPointTodoInfo(PointAuditRecordDO.convertTODO(nextAuditRecord));
|
pointTodoInfoDAO.addPointTodoInfo(PointAuditRecordDO.convertTODO(nextAuditRecord));
|
||||||
List<String> sendMessageUserIds = JSONObject.parseArray(nextAuditRecord.getHandlerUserIds(), String.class);
|
List<String> sendMessageUserIds = JSONObject.parseArray(nextAuditRecord.getHandlerUserIds(), String.class);
|
||||||
Map<String, String> messageMap = new HashMap<>();
|
HashMap<String, String> map = new HashMap<>();
|
||||||
messageMap.put("pointId", String.valueOf(pointInfo.getId()));
|
map.put("pointName",pointInfo.getPointName()) ;
|
||||||
messageMap.put("pointName", pointInfo.getPointName());
|
map.put("pointAddress",pointInfo.getAddress()) ;
|
||||||
messageMap.put("pointAddress", pointInfo.getAddress());
|
commonService.sendQWMessage(sendMessageUserIds, MessageEnum.MESSAGE_13, map);
|
||||||
commonService.sendMessage(sendMessageUserIds, MessageEnum.MESSAGE_13, messageMap);
|
|
||||||
}else{
|
}else{
|
||||||
PointInfoDO updatePoint = new PointInfoDO();
|
PointInfoDO updatePoint = new PointInfoDO();
|
||||||
updatePoint.setId(pointInfo.getId());
|
updatePoint.setId(pointInfo.getId());
|
||||||
@@ -363,7 +362,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
messageMap.put("pointId", String.valueOf(pointInfo.getId()));
|
messageMap.put("pointId", String.valueOf(pointInfo.getId()));
|
||||||
messageMap.put("pointName", pointInfo.getPointName());
|
messageMap.put("pointName", pointInfo.getPointName());
|
||||||
messageMap.put("pointAddress", pointInfo.getAddress());
|
messageMap.put("pointAddress", pointInfo.getAddress());
|
||||||
commonService.sendMessage(Arrays.asList(pointInfo.getDevelopmentManager()), MessageEnum.MESSAGE_11, messageMap);
|
commonService.sendQWMessage(Arrays.asList(pointInfo.getDevelopmentManager()), MessageEnum.MESSAGE_11, messageMap);
|
||||||
result = pointInfoDAO.updatePointInfo(updatePoint);
|
result = pointInfoDAO.updatePointInfo(updatePoint);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@@ -388,7 +387,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
messageMap.put("pointName", pointInfo.getPointName());
|
messageMap.put("pointName", pointInfo.getPointName());
|
||||||
messageMap.put("pointAddress", pointInfo.getAddress());
|
messageMap.put("pointAddress", pointInfo.getAddress());
|
||||||
messageMap.put("reason", reason);
|
messageMap.put("reason", reason);
|
||||||
commonService.sendMessage(Arrays.asList(pointInfo.getDevelopmentManager()), MessageEnum.MESSAGE_12, messageMap);
|
commonService.sendQWMessage(Arrays.asList(pointInfo.getDevelopmentManager()), MessageEnum.MESSAGE_12, messageMap);
|
||||||
return pointInfoDAO.updatePointInfo(pointInfoUpdate);
|
return pointInfoDAO.updatePointInfo(pointInfoUpdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -796,6 +795,15 @@ public class PointServiceImpl implements PointService {
|
|||||||
}
|
}
|
||||||
updateStatusList.add(selectStatus);
|
updateStatusList.add(selectStatus);
|
||||||
shopStageInfoDAO.batchUpdateShopStageStatus(shopId, updateStatusList);
|
shopStageInfoDAO.batchUpdateShopStageStatus(shopId, updateStatusList);
|
||||||
|
if (selectStatus.equals( ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_11)){
|
||||||
|
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("pointName",pointInfo.getPointName()) ;
|
||||||
|
map.put("pointAddress",pointInfo.getAddress());
|
||||||
|
commonService.sendQWMessage(Collections.singletonList(shopInfo.getInvestmentManager()),
|
||||||
|
MessageEnum.MESSAGE_13,
|
||||||
|
map);
|
||||||
|
}
|
||||||
return pointRecommendDAO.updateStatusByPointIdAndLineId(pointId, shopId);
|
return pointRecommendDAO.updateStatusByPointIdAndLineId(pointId, shopId);
|
||||||
} catch (ServiceException e) {
|
} catch (ServiceException e) {
|
||||||
throw e;
|
throw e;
|
||||||
@@ -831,7 +839,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
pointInfo.setLineId(lineId);
|
pointInfo.setLineId(lineId);
|
||||||
pointInfo.setShopId(shopInfo.getId());
|
pointInfo.setShopId(shopInfo.getId());
|
||||||
pointInfo.setSelectStatus(SelectStatusEnum.SELECT_STATUS_1.getCode());
|
pointInfo.setSelectStatus(SelectStatusEnum.SELECT_STATUS_1.getCode());
|
||||||
pointInfo.setDevelopmentManager(shopInfo.getDevelopmentManager());
|
pointInfo.setDevelopmentManager(shopInfo.getInvestmentManager());
|
||||||
pointInfo.setDevelopmentTime(new Date());
|
pointInfo.setDevelopmentTime(new Date());
|
||||||
pointInfo.setPointSource(PointSourceEnum.POINT_SOURCE_2.getCode());
|
pointInfo.setPointSource(PointSourceEnum.POINT_SOURCE_2.getCode());
|
||||||
pointInfo.setPointCode(generateCode());
|
pointInfo.setPointCode(generateCode());
|
||||||
@@ -844,7 +852,7 @@ public class PointServiceImpl implements PointService {
|
|||||||
PointRecommendDO pointRecommendDO = new PointRecommendDO();
|
PointRecommendDO pointRecommendDO = new PointRecommendDO();
|
||||||
pointRecommendDO.setLineId(lineId);
|
pointRecommendDO.setLineId(lineId);
|
||||||
pointRecommendDO.setShopId(request.getShopId());
|
pointRecommendDO.setShopId(request.getShopId());
|
||||||
pointRecommendDO.setDevelopmentManager(shopInfo.getDevelopmentManager());
|
pointRecommendDO.setDevelopmentManager(shopInfo.getInvestmentManager());
|
||||||
pointRecommendDO.setPointId(pointId);
|
pointRecommendDO.setPointId(pointId);
|
||||||
pointRecommendDO.setStatus(PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_2.getCode());
|
pointRecommendDO.setStatus(PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_2.getCode());
|
||||||
//推荐列表新增
|
//推荐列表新增
|
||||||
@@ -855,6 +863,13 @@ public class PointServiceImpl implements PointService {
|
|||||||
updatePoint.setId(pointId);
|
updatePoint.setId(pointId);
|
||||||
updatePoint.setShopId(shopInfo.getId());
|
updatePoint.setShopId(shopInfo.getId());
|
||||||
pointInfoDAO.updatePointInfo(updatePoint);
|
pointInfoDAO.updatePointInfo(updatePoint);
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("partnerUsername",lineInfo.getUsername());
|
||||||
|
map.put("partnerMobile",lineInfo.getMobile());
|
||||||
|
map.put("pointName",pointInfo.getPointName()) ;
|
||||||
|
commonService.sendQWMessage(Collections.singletonList(shopInfo.getInvestmentManager()),
|
||||||
|
MessageEnum.MESSAGE_51,
|
||||||
|
map);
|
||||||
return pointId;
|
return pointId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -892,11 +907,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -989,11 +1005,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,14 +118,29 @@ 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);
|
||||||
Map<String, String> requestMap = new HashMap<>();
|
Set<String> publishFranchiseFeeUsers = new HashSet<>();
|
||||||
// for (Long shopId : shopIds) {
|
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, lineInfo.getRegionId());
|
||||||
// requestMap.put("partnerName",lineInfo.getUsername());
|
if (Objects.nonNull(joinUser)) {
|
||||||
// requestMap.put("partnerMobile",lineInfo.getMobile());
|
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
// requestMap.put("lineId",String.valueOf(lineInfo.getId()));
|
publishFranchiseFeeUsers.addAll(joinUserIds);
|
||||||
// requestMap.put("shopId",String.valueOf(shopId));
|
}
|
||||||
// commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_23,requestMap);
|
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, lineInfo.getRegionId());
|
||||||
// }
|
if (Objects.nonNull(regionUser)) {
|
||||||
|
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
|
publishFranchiseFeeUsers.addAll(regionUserIds);
|
||||||
|
}
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("partnerUsername", lineInfo.getUsername());
|
||||||
|
map.put("partnerMobile", lineInfo.getMobile());
|
||||||
|
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||||
|
MessageEnum.MESSAGE_14,
|
||||||
|
map);
|
||||||
|
commonService.sendQWMessage(new ArrayList<>(publishFranchiseFeeUsers),
|
||||||
|
MessageEnum.MESSAGE_23,
|
||||||
|
map);
|
||||||
|
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||||
|
MessageEnum.MESSAGE_21,
|
||||||
|
map);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -263,13 +278,13 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
}
|
}
|
||||||
ShopInfoDO shopInfoDO = request.toDO(request, lineInfo);
|
ShopInfoDO shopInfoDO = request.toDO(request, lineInfo);
|
||||||
List<ShopInfoDO> shopList = shopInfoDAO.getShopList(lineInfo.getId());
|
List<ShopInfoDO> shopList = shopInfoDAO.getShopList(lineInfo.getId());
|
||||||
if(StringUtils.isBlank(request.getShopName())){
|
if (StringUtils.isBlank(request.getShopName())) {
|
||||||
if (CollectionUtils.isNotEmpty(shopList)) {
|
if (CollectionUtils.isNotEmpty(shopList)) {
|
||||||
shopInfoDO.setShopName("店铺"+NumberConverter.convertArabicToChinese(lineInfo.getWantShopNum() + 1));
|
shopInfoDO.setShopName("店铺" + NumberConverter.convertArabicToChinese(lineInfo.getWantShopNum() + 1));
|
||||||
}else{
|
} else {
|
||||||
shopInfoDO.setShopName("店铺"+NumberConverter.convertArabicToChinese(lineInfo.getWantShopNum()));
|
shopInfoDO.setShopName("店铺" + NumberConverter.convertArabicToChinese(lineInfo.getWantShopNum()));
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
shopInfoDO.setShopName(request.getShopName());
|
shopInfoDO.setShopName(request.getShopName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -281,9 +296,33 @@ 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());
|
||||||
|
Set<String> publishFranchiseFeeUsers = new HashSet<>();
|
||||||
|
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, request.getRegionId());
|
||||||
|
if (Objects.nonNull(joinUser)) {
|
||||||
|
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
|
publishFranchiseFeeUsers.addAll(joinUserIds);
|
||||||
|
}
|
||||||
|
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, request.getRegionId());
|
||||||
|
if (Objects.nonNull(regionUser)) {
|
||||||
|
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||||
|
publishFranchiseFeeUsers.addAll(regionUserIds);
|
||||||
|
}
|
||||||
|
commonService.sendQWMessage(Collections.singletonList(request.getInvestmentManagerUserId()),
|
||||||
|
MessageEnum.MESSAGE_14,
|
||||||
|
map);
|
||||||
|
commonService.sendQWMessage(new ArrayList<>(publishFranchiseFeeUsers),
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -395,7 +434,7 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
}
|
}
|
||||||
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
||||||
List<BranchShopResponse> responses = new ArrayList<>();
|
List<BranchShopResponse> responses = new ArrayList<>();
|
||||||
List<PreparationDTO> preparations = shopInfoDAO.ListByBranchShopRequest(request,userId);
|
List<PreparationDTO> preparations = shopInfoDAO.ListByBranchShopRequest(request, userId);
|
||||||
PageInfo pageInfo = new PageInfo<>(preparations);
|
PageInfo pageInfo = new PageInfo<>(preparations);
|
||||||
if (CollectionUtils.isEmpty(preparations)) {
|
if (CollectionUtils.isEmpty(preparations)) {
|
||||||
return new PageInfo<>();
|
return new PageInfo<>();
|
||||||
|
|||||||
@@ -20,11 +20,14 @@ 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;
|
||||||
import com.cool.store.utils.poi.StringUtils;
|
import com.cool.store.utils.poi.StringUtils;
|
||||||
import com.cool.store.utils.poi.constant.Constants;
|
import com.cool.store.utils.poi.constant.Constants;
|
||||||
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -32,6 +35,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 +44,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
SignFranchiseMapper signFranchiseMapper;
|
SignFranchiseMapper signFranchiseMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
CoolStoreStartFlowService coolStoreStartFlowService;
|
UserAuthMappingService userAuthMappingService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
FranchiseFeeMapper franchiseFeeMapper;
|
FranchiseFeeMapper franchiseFeeMapper;
|
||||||
@@ -149,7 +153,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
throw new ServiceException(ErrorCodeEnum.SHOP_ID_NOT_EXIST);
|
throw new ServiceException(ErrorCodeEnum.SHOP_ID_NOT_EXIST);
|
||||||
}
|
}
|
||||||
SignFranchiseDO isExist = signFranchiseMapper.selectByShopId(request.getShopId());
|
SignFranchiseDO isExist = signFranchiseMapper.selectByShopId(request.getShopId());
|
||||||
if (Objects.nonNull(isExist) && Objects.isNull(request.getId())){
|
if (Objects.nonNull(isExist) && Objects.isNull(request.getId())) {
|
||||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||||
}
|
}
|
||||||
String lockKey = "submitSignFranchise:" + request.getShopId();
|
String lockKey = "submitSignFranchise:" + request.getShopId();
|
||||||
@@ -173,7 +177,26 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_84);
|
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_84);
|
||||||
//初始化数据
|
//初始化数据
|
||||||
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 = new ArrayList<>();
|
||||||
|
if (Objects.nonNull(userDOList)) {
|
||||||
|
finances.addAll(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);
|
||||||
}
|
}
|
||||||
@@ -183,7 +206,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
shopInfoDO.setDetailAddress(request.getDetailAddress());
|
shopInfoDO.setDetailAddress(request.getDetailAddress());
|
||||||
shopInfoMapper.updateByPrimaryKeySelective(shopInfoDO);
|
shopInfoMapper.updateByPrimaryKeySelective(shopInfoDO);
|
||||||
|
|
||||||
return new ResponseResult(200000,"提交成功");
|
return new ResponseResult(200000, "提交成功");
|
||||||
} else {
|
} else {
|
||||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||||
}
|
}
|
||||||
@@ -200,7 +223,6 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AddSignFranchiseResponse getSignFranchise(Long shopId) {
|
public AddSignFranchiseResponse getSignFranchise(Long shopId) {
|
||||||
SignFranchiseDO signFranchiseDO = signFranchiseMapper.selectByShopId(shopId);
|
SignFranchiseDO signFranchiseDO = signFranchiseMapper.selectByShopId(shopId);
|
||||||
@@ -217,7 +239,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
response.setResult(shopAuditInfoDO.getRejectReason());
|
response.setResult(shopAuditInfoDO.getRejectReason());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (signFranchiseDO!=null){
|
if (signFranchiseDO != null) {
|
||||||
response.setResultTime(signFranchiseDO.getCreateTime());
|
response.setResultTime(signFranchiseDO.getCreateTime());
|
||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
@@ -264,19 +286,20 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
addSignFranchiseResponse.setResign(signFranchiseDO.getResign());
|
addSignFranchiseResponse.setResign(signFranchiseDO.getResign());
|
||||||
addSignFranchiseResponse.setMobile(signFranchiseDO.getMobile());
|
addSignFranchiseResponse.setMobile(signFranchiseDO.getMobile());
|
||||||
addSignFranchiseResponse.setContractCode(signFranchiseDO.getContractCode());
|
addSignFranchiseResponse.setContractCode(signFranchiseDO.getContractCode());
|
||||||
|
addSignFranchiseResponse.setContractAmount(signFranchiseDO.getContractAmount());
|
||||||
} else {
|
} else {
|
||||||
addSignFranchiseResponse.setMobile(lineInfoDO.getMobile());
|
addSignFranchiseResponse.setMobile(lineInfoDO.getMobile());
|
||||||
}
|
}
|
||||||
addSignFranchiseResponse.setStoreName(shopInfoDO.getShopName());
|
addSignFranchiseResponse.setStoreName(shopInfoDO.getShopName());
|
||||||
|
|
||||||
if (Objects.nonNull(regionInfo)){
|
if (Objects.nonNull(regionInfo)) {
|
||||||
addSignFranchiseResponse.setRegionId(shopInfoDO.getRegionId());
|
addSignFranchiseResponse.setRegionId(shopInfoDO.getRegionId());
|
||||||
addSignFranchiseResponse.setRegionName(regionInfo.getName());
|
addSignFranchiseResponse.setRegionName(regionInfo.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Objects.nonNull(pointInfoDO)) {
|
if (Objects.nonNull(pointInfoDO)) {
|
||||||
addSignFranchiseResponse.setStoreAddress(pointInfoDO.getAddress());
|
addSignFranchiseResponse.setStoreAddress(pointInfoDO.getAddress());
|
||||||
if (StringUtils.isNoneBlank(pointInfoDO.getLatitude(), pointInfoDO.getLongitude())){
|
if (StringUtils.isNoneBlank(pointInfoDO.getLatitude(), pointInfoDO.getLongitude())) {
|
||||||
GeoMapUtil.AddressInfo addressInfo = GeoMapUtil.reverseGeoCoding(pointInfoDO.getLatitude(), pointInfoDO.getLongitude());
|
GeoMapUtil.AddressInfo addressInfo = GeoMapUtil.reverseGeoCoding(pointInfoDO.getLatitude(), pointInfoDO.getLongitude());
|
||||||
addSignFranchiseResponse.setStoreProvinceCity(String.format("%s%s%s", addressInfo.getProvince(), addressInfo.getCity(), addressInfo.getDistrict()));
|
addSignFranchiseResponse.setStoreProvinceCity(String.format("%s%s%s", addressInfo.getProvince(), addressInfo.getCity(), addressInfo.getDistrict()));
|
||||||
}
|
}
|
||||||
@@ -286,14 +309,20 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
addSignFranchiseResponse.setBankCardNo(linePayDO.getPayAccount());
|
addSignFranchiseResponse.setBankCardNo(linePayDO.getPayAccount());
|
||||||
addSignFranchiseResponse.setBank(linePayDO.getBankName());
|
addSignFranchiseResponse.setBank(linePayDO.getBankName());
|
||||||
addSignFranchiseResponse.setSubBank(linePayDO.getBranchBankName());
|
addSignFranchiseResponse.setSubBank(linePayDO.getBranchBankName());
|
||||||
addSignFranchiseResponse.setPayDate(linePayDO.getPayTime());
|
if (Objects.nonNull(linePayDO.getPayTime())) {
|
||||||
|
addSignFranchiseResponse.setPayDate(linePayDO.getPayTime());
|
||||||
|
} else {
|
||||||
|
List<Date> payTimeList = JsonToDate(linePayDO.getCombinedField());
|
||||||
|
Collections.sort(payTimeList);
|
||||||
|
addSignFranchiseResponse.setPayDate(payTimeList.get(0));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(licenseTransactDO)) {
|
if (Objects.nonNull(licenseTransactDO)) {
|
||||||
addSignFranchiseResponse.setLicenseName(licenseTransactDO.getBusinessLicense());
|
addSignFranchiseResponse.setLicenseName(licenseTransactDO.getBusinessLicense());
|
||||||
addSignFranchiseResponse.setOpeAddress(licenseTransactDO.getLicenseAddress());
|
addSignFranchiseResponse.setOpeAddress(licenseTransactDO.getLicenseAddress());
|
||||||
addSignFranchiseResponse.setOperator(licenseTransactDO.getOperator());
|
addSignFranchiseResponse.setOperator(licenseTransactDO.getOperator());
|
||||||
addSignFranchiseResponse.setLicenseCode(licenseTransactDO.getCreditCode());
|
addSignFranchiseResponse.setLicenseCode(licenseTransactDO.getCreditCode());
|
||||||
if (licenseTransactDO.getLicenseType()!=null){
|
if (licenseTransactDO.getLicenseType() != null) {
|
||||||
addSignFranchiseResponse.setType(LicenseTypeEnum.match(licenseTransactDO.getLicenseType()).getMessage());
|
addSignFranchiseResponse.setType(LicenseTypeEnum.match(licenseTransactDO.getLicenseType()).getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -353,4 +382,24 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
private List<Date> JsonToDate(String json) {
|
||||||
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
// 解析JSON字符串为JsonNode对象
|
||||||
|
JsonNode jsonNode = null;
|
||||||
|
try {
|
||||||
|
jsonNode = mapper.readTree(json);
|
||||||
|
List<Date> payTimeList = new ArrayList<>();
|
||||||
|
// 遍历数组节点
|
||||||
|
for (JsonNode node : jsonNode) {
|
||||||
|
long payTime = node.get("payTime").asLong();
|
||||||
|
// 将时间戳转换为Date对象
|
||||||
|
Date date = new Date(payTime);
|
||||||
|
payTimeList.add(date);
|
||||||
|
}
|
||||||
|
return payTimeList;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.info("解析加盟费缴纳时间json失败");
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
|
|||||||
private LineInfoDAO lineInfoDAO;
|
private LineInfoDAO lineInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
HyOpenAreaInfoDAO hyOpenAreaInfoDAO;
|
HyOpenAreaInfoDAO hyOpenAreaInfoDAO;
|
||||||
|
@Resource
|
||||||
|
PartnerUserWechatBindDAO partnerUserWechatBindDAO;
|
||||||
@Value("${weixin.appId}")
|
@Value("${weixin.appId}")
|
||||||
private String wxAppId;
|
private String wxAppId;
|
||||||
@Value("${weixin.appSecret}")
|
@Value("${weixin.appSecret}")
|
||||||
@@ -72,78 +74,51 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
|
|||||||
}
|
}
|
||||||
CodeSessionDTO codeSession = wechatRest.miniProgramJsCodeSession(wxAppId, wxAppSecret, jsCode);
|
CodeSessionDTO codeSession = wechatRest.miniProgramJsCodeSession(wxAppId, wxAppSecret, jsCode);
|
||||||
String openid = codeSession.getOpenid();
|
String openid = codeSession.getOpenid();
|
||||||
String sessionCacheKey = MessageFormat.format(CommonConstants.MINI_PROGRAM_SESSION_KEY, wxAppId, openid);
|
|
||||||
redisUtilPool.setString(sessionCacheKey, codeSession.getSessionKey(), CommonConstants.THREE_DAY_SECONDS);
|
|
||||||
String unionId = codeSession.getUnionId();
|
String unionId = codeSession.getUnionId();
|
||||||
log.info("小程序登录:{}", unionId);
|
log.info("小程序登录:{}", unionId);
|
||||||
log.info("sessionKey {}", codeSession.getSessionKey());
|
log.info("sessionKey {}", codeSession.getSessionKey());
|
||||||
/* String decryptUser = AesUtil.decryptWechat(codeSession.getSessionKey(), param.getEncryptedData(), param.getIvStr());
|
|
||||||
log.info("解密用户信息:{}", decryptUser);
|
|
||||||
MiniProgramUserVO miniProgramUser = JSON.parseObject(decryptUser, MiniProgramUserVO.class);
|
|
||||||
if (Objects.isNull(miniProgramUser)) {
|
|
||||||
throw new ServiceException(ErrorCodeEnum.GET_WECHAT_USER_INFO_FAIL);
|
|
||||||
}*/
|
|
||||||
// 获取小程序token
|
// 获取小程序token
|
||||||
String accessToken = wechatRest.getAccessToken(wxAppId, wxAppSecret);
|
String accessToken = wechatRest.getAccessToken(wxAppId, wxAppSecret);
|
||||||
// 获取手机号码
|
// 获取手机号码
|
||||||
PhoneInfoDTO phoneInfoDTO = wechatRest.getUserPhoneNumber(param.getMobileCode(), accessToken);
|
PhoneInfoDTO phoneInfoDTO = wechatRest.getUserPhoneNumber(param.getMobileCode(), accessToken);
|
||||||
if(phoneInfoDTO != null && phoneInfoDTO.getPhoneInfo() != null && StringUtils.isNotBlank(phoneInfoDTO.getPhoneInfo().getPhoneNumber())){
|
if (Objects.isNull(phoneInfoDTO) || Objects.isNull(phoneInfoDTO.getPhoneInfo())){
|
||||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByOpenid(openid);
|
throw new ServiceException(ErrorCodeEnum.LOGIN_ERROR_MOBILE_ERROR);
|
||||||
if( hyPartnerUserInfoDO != null && !hyPartnerUserInfoDO.getMobile().equals(phoneInfoDTO.getPhoneInfo().getPhoneNumber())){
|
|
||||||
throw new ServiceException(ErrorCodeEnum.WECHAT_BIND_OTHER_MOBILE);
|
|
||||||
}
|
|
||||||
// 微信未授权过
|
|
||||||
if(hyPartnerUserInfoDO == null){
|
|
||||||
hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByMobile(phoneInfoDTO.getPhoneInfo().getPhoneNumber());
|
|
||||||
if(hyPartnerUserInfoDO != null && StringUtils.isNotBlank(hyPartnerUserInfoDO.getOpenid()) && !openid.equals(hyPartnerUserInfoDO.getOpenid())){
|
|
||||||
throw new ServiceException(ErrorCodeEnum.MOBILE_WECHAT_EXIST);
|
|
||||||
}
|
|
||||||
if(hyPartnerUserInfoDO == null){
|
|
||||||
hyPartnerUserInfoDO = new HyPartnerUserInfoDO();
|
|
||||||
hyPartnerUserInfoDO.setMobile(phoneInfoDTO.getPhoneInfo().getPhoneNumber());
|
|
||||||
hyPartnerUserInfoDO.setOpenid(openid);
|
|
||||||
hyPartnerUserInfoDO.setPartnerId(UUIDUtils.get32UUID());
|
|
||||||
Integer channelId = null;
|
|
||||||
String userChannel = param.getUserChannelEnum();
|
|
||||||
if(StringUtils.isNotEmpty(userChannel)){
|
|
||||||
if(UserChannelEnum.EXHIBITION.getCode().equals(userChannel)){
|
|
||||||
channelId = exhibition;
|
|
||||||
}else if(UserChannelEnum.RECOMMENDED.getCode().equals(userChannel)){
|
|
||||||
channelId = recommended;
|
|
||||||
}else {
|
|
||||||
if (StringUtils.isNumeric(userChannel)) {
|
|
||||||
channelId = Integer.valueOf(userChannel);
|
|
||||||
HyPartnerUserChannelDO hyPartnerUserChannelDO = hyPartnerUserChannelMapper.selectByChannelId(Long.valueOf(channelId));
|
|
||||||
if (Objects.isNull(hyPartnerUserChannelDO)|| hyPartnerUserChannelDO.getChannelId() == null ) {
|
|
||||||
//用户渠道不存在
|
|
||||||
throw new ServiceException(ErrorCodeEnum.USER_CHANNEL_NOT_EXISTS);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
hyPartnerUserInfoDO.setUserChannelId(channelId);
|
|
||||||
hyPartnerUserInfoDAO.insertSelective(hyPartnerUserInfoDO);
|
|
||||||
//授权的时候 新增线索 放到公海
|
|
||||||
LineInfoDO lineInfoDO = new LineInfoDO();
|
|
||||||
lineInfoDO.setLineStatus(LineStatusEnum.PUBLIC_SEAS.getCode());
|
|
||||||
lineInfoDO.setWorkflowSubStage(WorkflowSubStageEnum.INTEND.getCode());
|
|
||||||
lineInfoDO.setMobile(hyPartnerUserInfoDO.getMobile());
|
|
||||||
lineInfoDO.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
|
|
||||||
lineInfoDO.setFranchiseBrand(String.valueOf(FranchiseBrandEnum.ZXJP.getCode()));
|
|
||||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_0.getCode());
|
|
||||||
lineInfoDO.setPartnerId(hyPartnerUserInfoDO.getPartnerId());
|
|
||||||
lineInfoDAO.insertOrUpdate(lineInfoDO);
|
|
||||||
}else {
|
|
||||||
hyPartnerUserInfoDO.setOpenid(openid);
|
|
||||||
hyPartnerUserInfoDAO.updateByPrimaryKeySelective(hyPartnerUserInfoDO);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
BeanUtil.copyProperties(hyPartnerUserInfoDO, userInfoVO);
|
|
||||||
fillLineInfo(userInfoVO, hyPartnerUserInfoDO.getPartnerId());
|
|
||||||
}
|
}
|
||||||
userInfoVO.setOpenid(openid);
|
//通过手机号查询用户信
|
||||||
userInfoVO.setUnionId(unionId);
|
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByMobile(phoneInfoDTO.getPhoneInfo().getPhoneNumber());
|
||||||
|
if (hyPartnerUserInfoDO == null) {
|
||||||
|
//系统中没有改手机号 需要先注册该手机号
|
||||||
|
hyPartnerUserInfoDO = new HyPartnerUserInfoDO();
|
||||||
|
hyPartnerUserInfoDO.setMobile(phoneInfoDTO.getPhoneInfo().getPhoneNumber());
|
||||||
|
hyPartnerUserInfoDO.setOpenid(openid);
|
||||||
|
hyPartnerUserInfoDO.setPartnerId(UUIDUtils.get32UUID());
|
||||||
|
hyPartnerUserInfoDAO.insertSelective(hyPartnerUserInfoDO);
|
||||||
|
LineInfoDO lineInfoDO = new LineInfoDO();
|
||||||
|
lineInfoDO.setLineStatus(LineStatusEnum.PUBLIC_SEAS.getCode());
|
||||||
|
lineInfoDO.setWorkflowSubStage(WorkflowSubStageEnum.INTEND.getCode());
|
||||||
|
lineInfoDO.setMobile(hyPartnerUserInfoDO.getMobile());
|
||||||
|
lineInfoDO.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
|
||||||
|
lineInfoDO.setFranchiseBrand(String.valueOf(FranchiseBrandEnum.ZXJP.getCode()));
|
||||||
|
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_0.getCode());
|
||||||
|
lineInfoDO.setPartnerId(hyPartnerUserInfoDO.getPartnerId());
|
||||||
|
lineInfoDAO.insertOrUpdate(lineInfoDO);
|
||||||
|
}
|
||||||
|
//判断绑定表种是否绑定了手机号与微信openid
|
||||||
|
PartnerUserWechatBindDO zlPartnerUserBindDO = partnerUserWechatBindDAO.getByOpenIdAndPartnerId(hyPartnerUserInfoDO.getPartnerId(), openid);
|
||||||
|
if (zlPartnerUserBindDO == null) {
|
||||||
|
//绑定手机号与微信openid
|
||||||
|
PartnerUserWechatBindDO bindDO = new PartnerUserWechatBindDO();
|
||||||
|
bindDO.setBindTime(new Date());
|
||||||
|
bindDO.setOpenId(openid);
|
||||||
|
bindDO.setPartnerId(hyPartnerUserInfoDO.getPartnerId());
|
||||||
|
bindDO.setCreateTime(new Date());
|
||||||
|
partnerUserWechatBindDAO.insertSelective(bindDO);
|
||||||
|
}
|
||||||
|
BeanUtil.copyProperties(hyPartnerUserInfoDO, userInfoVO);
|
||||||
|
fillLineInfo(userInfoVO, hyPartnerUserInfoDO.getPartnerId());
|
||||||
|
//将数据存储到redis中
|
||||||
|
String key = MessageFormat.format(CommonConstants.ZXJP_MINI_PROGRAM_LOGIN_FLAG, openid);
|
||||||
|
redisUtilPool.setString(key,JSONObject.toJSONString(userInfoVO),CommonConstants.SEVEN_DAY_SECONDS);
|
||||||
return userInfoVO;
|
return userInfoVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,17 +132,28 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
|
|||||||
}
|
}
|
||||||
CodeSessionDTO codeSession = wechatRest.miniProgramJsCodeSession(wxAppId, wxAppSecret, jsCode);
|
CodeSessionDTO codeSession = wechatRest.miniProgramJsCodeSession(wxAppId, wxAppSecret, jsCode);
|
||||||
String openid = codeSession.getOpenid();
|
String openid = codeSession.getOpenid();
|
||||||
String sessionCacheKey = MessageFormat.format(CommonConstants.MINI_PROGRAM_SESSION_KEY, wxAppId, openid);
|
String key = MessageFormat.format(CommonConstants.ZXJP_MINI_PROGRAM_LOGIN_FLAG, openid);
|
||||||
redisUtilPool.setString(sessionCacheKey, codeSession.getSessionKey(), CommonConstants.THREE_DAY_SECONDS);
|
String value = redisUtilPool.getString(key);
|
||||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByOpenid(openid);
|
if (StringUtils.isNotEmpty(value)){
|
||||||
if(hyPartnerUserInfoDO != null){
|
//设置有效期
|
||||||
userInfoVO = new PartnerUserInfoVO();
|
Long expire = redisUtilPool.getExpire(key);
|
||||||
BeanUtil.copyProperties(hyPartnerUserInfoDO, userInfoVO);
|
if (expire < CommonConstants.THREE_DAY_SECONDS){
|
||||||
fillLineInfo(userInfoVO, hyPartnerUserInfoDO.getPartnerId());
|
//重置时间为7天
|
||||||
|
redisUtilPool.expire(key,CommonConstants.SEVEN_DAY_SECONDS);
|
||||||
|
}
|
||||||
|
userInfoVO = JSONObject.parseObject(value,PartnerUserInfoVO.class);
|
||||||
}
|
}
|
||||||
return userInfoVO;
|
return userInfoVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean cancellation(String openId) {
|
||||||
|
//删除登录态缓存
|
||||||
|
String key = MessageFormat.format(CommonConstants.ZXJP_MINI_PROGRAM_LOGIN_FLAG, openId);
|
||||||
|
redisUtilPool.delKey(key);
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUserPhoneNumber(String mobileCode) {
|
public String getUserPhoneNumber(String mobileCode) {
|
||||||
@@ -224,7 +210,7 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
|
|||||||
userInfoVO.setPartnerId("");
|
userInfoVO.setPartnerId("");
|
||||||
return userInfoVO;
|
return userInfoVO;
|
||||||
}
|
}
|
||||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByOpenid(openId);
|
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByMobile(mobile);
|
||||||
if(hyPartnerUserInfoDO != null){
|
if(hyPartnerUserInfoDO != null){
|
||||||
BeanUtil.copyProperties(hyPartnerUserInfoDO, userInfoVO);
|
BeanUtil.copyProperties(hyPartnerUserInfoDO, userInfoVO);
|
||||||
/*if(StringUtils.isNotBlank(hyPartnerUserInfoDO.getWantShopArea())){
|
/*if(StringUtils.isNotBlank(hyPartnerUserInfoDO.getWantShopArea())){
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.cool.store.constants.CommonConstants;
|
|||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.MessageEnum;
|
import com.cool.store.enums.MessageEnum;
|
||||||
|
import com.cool.store.enums.QWMessageEnum;
|
||||||
import com.cool.store.enums.SMSMsgEnum;
|
import com.cool.store.enums.SMSMsgEnum;
|
||||||
import com.cool.store.job.XxlJobHandler;
|
import com.cool.store.job.XxlJobHandler;
|
||||||
import com.cool.store.mq.util.HttpRestTemplateService;
|
import com.cool.store.mq.util.HttpRestTemplateService;
|
||||||
@@ -105,4 +106,17 @@ public class PCTestController {
|
|||||||
xxlJobHandler.partnerSyncLicense();
|
xxlJobHandler.partnerSyncLicense();
|
||||||
return ResponseResult.success(Boolean.TRUE);
|
return ResponseResult.success(Boolean.TRUE);
|
||||||
}
|
}
|
||||||
|
@GetMapping("/testQWMessage")
|
||||||
|
public ResponseResult<Boolean> testQWMessage(){
|
||||||
|
List<String> userIds = new ArrayList<>();
|
||||||
|
userIds.add("wpayJeDAAAhGIFgUJpJN-zg39JuNbYhg_woayJeDAAA52Wm6ZigyveSjniyimeqZQ");
|
||||||
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,12 @@ public class MiniProgramAppController {
|
|||||||
return ResponseResult.success(userInfoVO);
|
return ResponseResult.success(userInfoVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("小程序用户注销(下线)")
|
||||||
|
@GetMapping("/cancellation")
|
||||||
|
public ResponseResult<Boolean> cancellation(@RequestParam(value = "openId",required = true)String openId) {
|
||||||
|
return ResponseResult.success(wechatMiniAppService.cancellation(openId));
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation("获取手机号")
|
@ApiOperation("获取手机号")
|
||||||
@GetMapping("/getUserPhoneNumber")
|
@GetMapping("/getUserPhoneNumber")
|
||||||
public ResponseResult<String> getUserPhoneNumber(@RequestParam(value = "mobileCode",required = true)String mobileCode) {
|
public ResponseResult<String> getUserPhoneNumber(@RequestParam(value = "mobileCode",required = true)String mobileCode) {
|
||||||
|
|||||||
@@ -84,4 +84,6 @@ aliyun.sms.accessKeySecret=WIMjO4BjVg3YAHwmplq86yOyS2HMpa
|
|||||||
aliyun.sms.signName=酷店掌
|
aliyun.sms.signName=酷店掌
|
||||||
|
|
||||||
mybatis.configuration.variables.enterpriseId=5558ce7a3aa84e3590392fcaa8697ffb
|
mybatis.configuration.variables.enterpriseId=5558ce7a3aa84e3590392fcaa8697ffb
|
||||||
enterprise.dingCorpId=ding0006ae30cf81071ea1320dcb25e91351
|
enterprise.dingCorpId=ding0006ae30cf81071ea1320dcb25e91351
|
||||||
|
|
||||||
|
qywx.task.notice.url2=https://tstore-h5.coolstore.cn/?corpId=%s&appType=%s#/notice?target=%s¬iceType=zx&corpId=%s&appType=%s&eid=%s
|
||||||
|
|||||||
@@ -78,4 +78,6 @@ aliyun.sms.accessKeySecret=WIMjO4BjVg3YAHwmplq86yOyS2HMpa
|
|||||||
aliyun.sms.signName=酷店掌
|
aliyun.sms.signName=酷店掌
|
||||||
|
|
||||||
mybatis.configuration.variables.enterpriseId=214ac5a3a517472a87268e02a2e6410a
|
mybatis.configuration.variables.enterpriseId=214ac5a3a517472a87268e02a2e6410a
|
||||||
enterprise.dingCorpId=wpayJeDAAAklx_q1jGhyGUd4yEh8vV_g
|
enterprise.dingCorpId=wpayJeDAAAklx_q1jGhyGUd4yEh8vV_g
|
||||||
|
|
||||||
|
qywx.task.notice.url2=https://store-h5.coolstore.cn/?corpId=%s&appType=%s#/notice?target=%s¬iceType=zx&corpId=%s&appType=%s&eid=%s
|
||||||
|
|||||||
@@ -78,4 +78,7 @@ aliyun.sms.accessKeySecret=WIMjO4BjVg3YAHwmplq86yOyS2HMpa
|
|||||||
aliyun.sms.signName=酷店掌
|
aliyun.sms.signName=酷店掌
|
||||||
|
|
||||||
mybatis.configuration.variables.enterpriseId=5558ce7a3aa84e3590392fcaa8697ffb
|
mybatis.configuration.variables.enterpriseId=5558ce7a3aa84e3590392fcaa8697ffb
|
||||||
enterprise.dingCorpId=wpayJeDAAAhGIFgUJpJN-zg39JuNbYhg
|
enterprise.dingCorpId=wpayJeDAAAhGIFgUJpJN-zg39JuNbYhg
|
||||||
|
|
||||||
|
##qywx.task.notice.url1=https://tstore-api.coolstore.cn/notice?corpId=%s&appType=%s&target=%s
|
||||||
|
qywx.task.notice.url2=https://tstore-h5.coolstore.cn/?corpId=%s&appType=%s#/notice?target=%s¬iceType=zx&corpId=%s&appType=%s&eid=%s
|
||||||
|
|||||||
Reference in New Issue
Block a user