Merge remote-tracking branch 'hs/dev/feat/partner1.4_20231009' into dev/feat/partner1.4_20231009
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
/**
|
||||
* @Author: young.yu
|
||||
* @Date: 2023-09-14 14:27
|
||||
* @Description:
|
||||
*/
|
||||
public enum SMSMsgEnum {
|
||||
INTENTION_APPLY_PASS("意向申请通过","【沪上阿姨】恭喜您通过了加盟意向申请审核,请务必于{$var}前登录沪姨合伙人小程序完成面试预约时间申请,感谢您对沪上阿姨的关注与支持!点击转跳沪姨合伙人小程序:{$var}"),
|
||||
|
||||
INTERVIEW_APPOINTMENT_PASS("预约面试通过通知","【沪上阿姨】你已成功预约{$var}进行沪上阿姨加盟资格面试,届时请通过沪姨合伙人小程序进行面试,面试时间约40分钟,请提前仔细阅读面试准备材料以及观看加盟说明视频,做好面试相应准备。请务必提前安排好您的时间。点击转跳沪姨合伙人小程序:{$var}"),
|
||||
|
||||
INTERVIEW_PASS("面试通过通知","【沪上阿姨】恭喜您通过了加盟资格面试,接下来我们会为您安排专业的选址开发顾问协助您进行选址,请保持电话畅通,祝您早日选址成功!点击转跳沪姨合伙人小程序:{$var}");
|
||||
|
||||
private String title;
|
||||
private String content;
|
||||
|
||||
SMSMsgEnum(String title, String content) {
|
||||
this.title = title;
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.HyPartnerFraSourceDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface HyPartnerFraSourceMapper {
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(HyPartnerFraSourceDO record);
|
||||
|
||||
int insertSelective(HyPartnerFraSourceDO record);
|
||||
|
||||
HyPartnerFraSourceDO selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(HyPartnerFraSourceDO record);
|
||||
|
||||
int updateByPrimaryKey(HyPartnerFraSourceDO record);
|
||||
|
||||
List<HyPartnerFraSourceDO> selectAllFraSourceList();
|
||||
|
||||
int batchInsertSelective(@Param("insertList") List<HyPartnerFraSourceDO> collect);
|
||||
}
|
||||
@@ -0,0 +1,190 @@
|
||||
<?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.HyPartnerFraSourceMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerFraSourceDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||
<result column="dict_id" jdbcType="VARCHAR" property="dictId" />
|
||||
<result column="source_id" jdbcType="VARCHAR" property="sourceId" />
|
||||
<result column="enabled" jdbcType="BOOLEAN" property="enabled" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, `name`, code, dict_id, source_id, enabled, create_time, update_time, remark
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from hy_partner_fra_source
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<select id="selectAllFraSourceList" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from hy_partner_fra_source where enabled=1
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from hy_partner_fra_source
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.cool.store.entity.HyPartnerFraSourceDO" useGeneratedKeys="true">
|
||||
insert into hy_partner_fra_source (`name`, code, dict_id,
|
||||
source_id, enabled, create_time,
|
||||
update_time, remark)
|
||||
values (#{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{dictId,jdbcType=VARCHAR},
|
||||
#{sourceId,jdbcType=VARCHAR}, #{enabled,jdbcType=BOOLEAN}, #{createTime,jdbcType=TIMESTAMP},
|
||||
#{updateTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.cool.store.entity.HyPartnerFraSourceDO" useGeneratedKeys="true">
|
||||
insert into hy_partner_fra_source
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code,
|
||||
</if>
|
||||
<if test="dictId != null">
|
||||
dict_id,
|
||||
</if>
|
||||
<if test="sourceId != null">
|
||||
source_id,
|
||||
</if>
|
||||
<if test="enabled != null">
|
||||
enabled,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
#{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dictId != null">
|
||||
#{dictId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sourceId != null">
|
||||
#{sourceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="enabled != null">
|
||||
#{enabled,jdbcType=BOOLEAN},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
#{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="batchInsertSelective">
|
||||
<foreach collection="insertList" item="record" separator=";">
|
||||
insert into hy_partner_fra_source
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="record.name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="record.code != null">
|
||||
`code`,
|
||||
</if>
|
||||
<if test="record.dictId != null">
|
||||
dict_id,
|
||||
</if>
|
||||
<if test="record.sourceId != null">
|
||||
source_id,
|
||||
</if>
|
||||
<if test="record.enabled != null">
|
||||
enabled,
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="record.remark != null">
|
||||
remark,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="record.name != null">
|
||||
#{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.code != null">
|
||||
#{record.code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.dictId != null">
|
||||
#{record.dictId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.sourceId != null">
|
||||
#{record.sourceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.enabled != null">
|
||||
#{record.enabled,jdbcType=BOOLEAN},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
#{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.remark != null">
|
||||
#{record.remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
ON DUPLICATE KEY UPDATE update_time = now(), enabled = values(enabled), `name` = values(`name`), `code` = values(`code`), dict_id = values(dict_id)
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyPartnerFraSourceDO">
|
||||
update hy_partner_fra_source
|
||||
<set>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dictId != null">
|
||||
dict_id = #{dictId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sourceId != null">
|
||||
source_id = #{sourceId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="enabled != null">
|
||||
enabled = #{enabled,jdbcType=BOOLEAN},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.cool.store.entity.HyPartnerFraSourceDO">
|
||||
update hy_partner_fra_source
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
dict_id = #{dictId,jdbcType=VARCHAR},
|
||||
source_id = #{sourceId,jdbcType=VARCHAR},
|
||||
enabled = #{enabled,jdbcType=BOOLEAN},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
remark = #{remark,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -290,6 +290,7 @@
|
||||
hpuinfo.user_channel_id as userChannelId,
|
||||
hpuinfo.live_area as liveArea,
|
||||
hpuinfo.want_shop_area as wantShopArea,
|
||||
hpuinfo.ec_want_shop_area as ecWantShopArea,
|
||||
hpuinfo.accept_adjust_type as acceptAdjustType,
|
||||
cr.create_time as lastFollowTime,
|
||||
cr.call_status as callStatus
|
||||
|
||||
@@ -474,6 +474,7 @@
|
||||
b.user_channel_id as userChannelId,
|
||||
b.username as userName,
|
||||
b.want_shop_area as wantShopArea,
|
||||
b.ec_want_shop_area as EcWantShopArea,
|
||||
b.accept_adjust_type as acceptAdjustType,
|
||||
bi.user_portrait as userPortrait,
|
||||
hpl.phone_address as phoneAddress
|
||||
@@ -520,6 +521,7 @@
|
||||
hpli.update_time as updateTime,
|
||||
hpuinfo.user_channel_id as userChannelId,
|
||||
hpuinfo.want_shop_area as wantShopArea,
|
||||
hpuinfo.ec_want_shop_area as ecWantShopArea,
|
||||
hpuinfo.accept_adjust_type as acceptAdjustType,
|
||||
hpuinfo.username as partnerUserName,
|
||||
hpuinfo.mobile as partnerUserPhone,
|
||||
|
||||
@@ -166,6 +166,9 @@
|
||||
<if test="record.userChannelId!=null">
|
||||
user_channel_id,
|
||||
</if>
|
||||
<if test="record.ecWantShopArea!=null">
|
||||
ec_want_shop_area,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="record.partnerId != null">
|
||||
@@ -219,6 +222,9 @@
|
||||
<if test="record.userChannelId != null">
|
||||
#{record.userChannelId},
|
||||
</if>
|
||||
<if test="record.ecWantShopArea != null">
|
||||
#{record.ecWantShopArea},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
@@ -272,6 +278,9 @@
|
||||
<if test="record.recommendPartnerMobile != null">
|
||||
recommend_partner_mobile = #{record.recommendPartnerMobile},
|
||||
</if>
|
||||
<if test="record.ecWantShopArea != null">
|
||||
ec_want_shop_area = #{record.ecWantShopArea},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{record.id}
|
||||
</update>
|
||||
|
||||
@@ -61,4 +61,6 @@ public class PartnerIntentApplyInfoDTO {
|
||||
|
||||
private String userPortrait;
|
||||
|
||||
private String ecWantShopArea;
|
||||
|
||||
}
|
||||
|
||||
@@ -81,4 +81,6 @@ public class PrivateSeaLineDTO {
|
||||
|
||||
private String userPortrait;
|
||||
|
||||
private String ecWantShopArea;
|
||||
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@ public class PublicSeaLineDTO {
|
||||
|
||||
private String wantShopArea;
|
||||
|
||||
private String ecWantShopArea;
|
||||
|
||||
private String acceptAdjustType;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.cool.store.dto.response;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author HXD
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DictResultDTO {
|
||||
private String id;
|
||||
private String createdBy;
|
||||
private String createdTime;
|
||||
private String groupCode;
|
||||
private String code;
|
||||
private String name;
|
||||
private String type;
|
||||
private String enabled;
|
||||
private String remark;
|
||||
private List<Dict> configList;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public static class Dict{
|
||||
private String id;
|
||||
private String dictId;
|
||||
private String code;
|
||||
private String name;
|
||||
private String parentId;
|
||||
private Boolean enabled;
|
||||
private String remark;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.cool.store.dto.wx;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: young.yu
|
||||
* @Date: 2023-09-12 14:48
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
public class MiniAppUrlLinkDTO extends WXBaseResultDTO{
|
||||
@JSONField(name = "url_link")
|
||||
private String urlLink;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.cool.store.dto.wx;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: young.yu
|
||||
* @Date: 2023-09-12 14:48
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
public class MiniAppUrlLinkReqDTO{
|
||||
private String path;
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* hy_partner_fra_source
|
||||
* @author
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class HyPartnerFraSourceDO implements Serializable {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 来源名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 来源code
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 所属字典枚举组的id
|
||||
*/
|
||||
private String dictId;
|
||||
|
||||
/**
|
||||
* 数据的id
|
||||
*/
|
||||
private String sourceId;
|
||||
|
||||
/**
|
||||
* 启用标识
|
||||
*/
|
||||
private Boolean enabled;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -75,4 +75,9 @@ public class HyPartnerUserInfoDO implements Serializable {
|
||||
|
||||
@ApiModelProperty("hy_partner_user_channel.channel_id")
|
||||
private Integer userChannelId;
|
||||
|
||||
|
||||
@ApiModelProperty("ec意向区域")
|
||||
private String ecWantShopArea;
|
||||
|
||||
}
|
||||
@@ -38,6 +38,9 @@ public class CreateQualifyVerifyReq {
|
||||
@ApiModelProperty(value = "加盟商类型", required = true)
|
||||
private KeyText fraType;
|
||||
|
||||
@ApiModelProperty(value = "请求来源", required = true)
|
||||
private KeyText fraSource;
|
||||
|
||||
@ApiModelProperty(value = "合作关系", required = true)
|
||||
private KeyText partnership;
|
||||
|
||||
|
||||
@@ -23,4 +23,7 @@ public class CustomerInfoRequest {
|
||||
private Long lastFollowUserId;
|
||||
|
||||
private String followUserName;
|
||||
|
||||
|
||||
private String ecWantShopArea;
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: young.yu
|
||||
* @Date: 2023-06-21 11:17
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
public class IntentSmsReq {
|
||||
private String deadLine;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: young.yu
|
||||
* @Date: 2023-06-21 11:17
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
public class InterviewSmsReq {
|
||||
private String interviewStartTime;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author zw.yang
|
||||
* @date 2023-07-03
|
||||
* @Description:普通短信发送实体类
|
||||
*/
|
||||
@Data
|
||||
public class SmsSendRequest {
|
||||
/**
|
||||
* 用户账号,必填
|
||||
*/
|
||||
private String account;
|
||||
/**
|
||||
* 用户密码,必填
|
||||
*/
|
||||
private String password;
|
||||
/**
|
||||
* 短信内容。长度不能超过536个字符,必填
|
||||
*/
|
||||
private String msg;
|
||||
/**
|
||||
* 手机号码和变量参数,多组参数使用英文分号;区分,必填
|
||||
*/
|
||||
private String params;
|
||||
|
||||
/**
|
||||
* 定时发送短信时间。格式为yyyyMMddHHmm,值小于或等于当前时间则立即发送,默认立即发送,选填
|
||||
*/
|
||||
private String sendtime;
|
||||
/**
|
||||
* 是否需要状态报告(默认false),选填
|
||||
*/
|
||||
private String report;
|
||||
/**
|
||||
* 下发短信号码扩展码,纯数字,建议1-3位,选填
|
||||
*/
|
||||
private String extend;
|
||||
/**
|
||||
* 该条短信在您业务系统内的ID,如订单号或者短信发送记录流水号,选填
|
||||
*/
|
||||
private String uid;
|
||||
|
||||
public SmsSendRequest(String account, String password, String msg, String params) {
|
||||
this.account = account;
|
||||
this.password = password;
|
||||
this.msg = msg;
|
||||
this.params = params;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.cool.store.response;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author zw.yang
|
||||
* @date 2023-07-03
|
||||
* @Description:普通短信发送响应实体类
|
||||
*/
|
||||
@Data
|
||||
public class SmsSendResponse {
|
||||
/**
|
||||
* 响应时间
|
||||
*/
|
||||
private String time;
|
||||
/**
|
||||
* 消息id
|
||||
*/
|
||||
private String msgId;
|
||||
/**
|
||||
* 状态码说明(成功返回空)
|
||||
*/
|
||||
private String errorMsg;
|
||||
/**
|
||||
* 状态码(详细参考提交响应状态码)
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 失败的个数
|
||||
*/
|
||||
private String failNum;
|
||||
/**
|
||||
* 成功的个数
|
||||
*/
|
||||
private String successNum;
|
||||
}
|
||||
@@ -50,6 +50,9 @@ public class PartnerIntentApplyInfoVO {
|
||||
@ApiModelProperty("意向开店区域")
|
||||
private String wantShopArea;
|
||||
|
||||
@ApiModelProperty("EC意向开店区域")
|
||||
private String ecWantShopArea;
|
||||
|
||||
@ApiModelProperty("意向开店区域")
|
||||
private String wantShopAreaName;
|
||||
|
||||
@@ -92,6 +95,7 @@ public class PartnerIntentApplyInfoVO {
|
||||
partnerIntentApplyInfoVO.setAcceptAdjustType(partnerIntentApplyInfoDTO.getAcceptAdjustType());
|
||||
partnerIntentApplyInfoVO.setLiveArea(partnerIntentApplyInfoDTO.getLiveArea());
|
||||
partnerIntentApplyInfoVO.setWantShopArea(partnerIntentApplyInfoDTO.getWantShopArea());
|
||||
partnerIntentApplyInfoVO.setEcWantShopArea(partnerIntentApplyInfoDTO.getEcWantShopArea());
|
||||
String deadLine = DateUtil.format(partnerIntentApplyInfoDTO.getDeadline(), CoolDateUtils.DATE_FORMAT_SEC_2);
|
||||
partnerIntentApplyInfoVO.setDeadline(deadLine);
|
||||
partnerIntentApplyInfoVO.setPartnerUserName(partnerIntentApplyInfoDTO.getPartnerUserName());
|
||||
|
||||
@@ -66,6 +66,9 @@ public class PrivateSeaLineListVo {
|
||||
@ApiModelProperty("意向开店区域名称")
|
||||
private String wantShopAreaName;
|
||||
|
||||
@ApiModelProperty("EC意向开店区域")
|
||||
private String ecWantShopArea;
|
||||
|
||||
@ApiModelProperty("0不接受调剂、1全国调剂、2省内调剂、3市内调剂")
|
||||
private Integer acceptAdjustType;
|
||||
|
||||
@@ -126,6 +129,7 @@ public class PrivateSeaLineListVo {
|
||||
privateSeaLineListVo.setUpdateTime(updateTime);
|
||||
privateSeaLineListVo.setRecommendPartnerId(x.getRecommendPartnerId());
|
||||
privateSeaLineListVo.setRecommendPartnerMobile(x.getRecommendPartnerId());
|
||||
privateSeaLineListVo.setEcWantShopArea(x.getEcWantShopArea());
|
||||
privateSeaLineListVo.setWantShopArea(x.getWantShopArea());
|
||||
privateSeaLineListVo.setWantShopAreaName(wantShopAreaNameMap.get(x.getWantShopArea()));
|
||||
privateSeaLineListVo.setInvestmentManager(x.getInvestmentManager());
|
||||
|
||||
@@ -65,9 +65,12 @@ public class PublicSeaLineListVo {
|
||||
@ApiModelProperty("意向开店区域ID")
|
||||
private String wantShopArea;
|
||||
|
||||
@ApiModelProperty("意向开店区域ID")
|
||||
@ApiModelProperty("意向开店区域名称")
|
||||
private String wantShopAreaName;
|
||||
|
||||
@ApiModelProperty("EC意向开店区域")
|
||||
private String ecWantShopArea;
|
||||
|
||||
private String acceptAdjustType;
|
||||
|
||||
private String updateTime;
|
||||
|
||||
@@ -99,6 +99,16 @@
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -2,6 +2,8 @@ package com.cool.store.http;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.dto.wx.CodeSessionDTO;
|
||||
import com.cool.store.dto.wx.MiniAppUrlLinkDTO;
|
||||
import com.cool.store.dto.wx.MiniAppUrlLinkReqDTO;
|
||||
import com.cool.store.dto.wx.PhoneInfoDTO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
@@ -41,6 +43,8 @@ public class WechatRest {
|
||||
*/
|
||||
String GET_USERPHONENUMBER = "https://api.weixin.qq.com/wxa/business/getuserphonenumber?access_token=%s";
|
||||
|
||||
String GET_MINIAPP_URL_LINK = "https://api.weixin.qq.com/wxa/generate_urllink?access_token=%s";
|
||||
|
||||
|
||||
public CodeSessionDTO miniProgramJsCodeSession(String appId, String secret, String jsCode){
|
||||
log.info("WechatRest#miniProgramJsCodeSession, jsCode:{}", jsCode);
|
||||
@@ -90,4 +94,19 @@ public class WechatRest {
|
||||
return null;
|
||||
}
|
||||
|
||||
public MiniAppUrlLinkDTO getMiniAppUrlLink(String accessToken, MiniAppUrlLinkReqDTO miniAppUrlLinkReqDTO){
|
||||
String reqUrl = String.format(GET_MINIAPP_URL_LINK, accessToken);
|
||||
String responseStr = null;
|
||||
try {
|
||||
responseStr = httpRestTemplateService.postForObject(reqUrl, miniAppUrlLinkReqDTO, String.class);
|
||||
log.info("WechatRest#getUserPhoneNumber, reqUrl:{}, response:{}", reqUrl, responseStr);
|
||||
if(StringUtils.isNotBlank(responseStr)){
|
||||
return JSONObject.parseObject(responseStr, MiniAppUrlLinkDTO.class);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("获取手机号异常", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.cool.store.job;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.cool.store.dto.mdm.AccessTokenDTO;
|
||||
import com.cool.store.dto.response.DictResultDTO;
|
||||
import com.cool.store.dto.response.MDMResultDTO;
|
||||
import com.cool.store.entity.HyPartnerFraSourceDO;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.HyPartnerFraSourceMapper;
|
||||
import com.cool.store.request.RpcGetMdmTokenReq;
|
||||
import com.cool.store.utils.RestTemplateUtil;
|
||||
import com.xxl.job.core.context.XxlJobHelper;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author hxd
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class FraSourceSyncJob {
|
||||
|
||||
|
||||
@Value("${hs.mdm.baseUrl:null}")
|
||||
private String mdmBaseUrl;
|
||||
|
||||
@Value("${hs.mdm.appkey:null}")
|
||||
private String mdmAppKey;
|
||||
|
||||
@Value("${hs.mdm.appsec:null}")
|
||||
private String mdmAppSec;
|
||||
|
||||
@Resource
|
||||
private HyPartnerFraSourceMapper hyPartnerFraSourceMapper;
|
||||
|
||||
@XxlJob("FraSourceSyncJob")
|
||||
public void fraSourceSyncJob() {
|
||||
XxlJobHelper.log("-------------------------------定时同步800请求来源开始-------------------------------");
|
||||
execute();
|
||||
XxlJobHelper.log("-------------------------------定时同步800请求来源结束-------------------------------");
|
||||
XxlJobHelper.handleSuccess();
|
||||
}
|
||||
|
||||
private void execute() {
|
||||
DictResultDTO dictResultDTO = null;
|
||||
try {
|
||||
dictResultDTO = JSON.parseObject(getDictList(), new TypeReference<DictResultDTO>() {
|
||||
});
|
||||
} catch (ApiException e) {
|
||||
log.error("请求800获取字典报错:" + JSONObject.toJSONString(e));
|
||||
}
|
||||
if (ObjectUtil.isNull(dictResultDTO)) {
|
||||
return;
|
||||
}
|
||||
List<DictResultDTO.Dict> configList = dictResultDTO.getConfigList();
|
||||
List<HyPartnerFraSourceDO> collect = configList.stream().map(item -> {
|
||||
HyPartnerFraSourceDO hyPartnerFraSourceDO = new HyPartnerFraSourceDO();
|
||||
BeanUtil.copyProperties(item, hyPartnerFraSourceDO);
|
||||
hyPartnerFraSourceDO.setSourceId(item.getId());
|
||||
return hyPartnerFraSourceDO;
|
||||
}).collect(Collectors.toList());
|
||||
hyPartnerFraSourceMapper.batchInsertSelective(collect);
|
||||
}
|
||||
|
||||
public String getDictList() throws ApiException {
|
||||
String url = mdmBaseUrl + "/api/openapi/dict/api/dictListByCode?code=mdFraSource";
|
||||
ResponseEntity<MDMResultDTO> responseEntity = null;
|
||||
try {
|
||||
RpcGetMdmTokenReq rpcGetMDMTokenReq = new RpcGetMdmTokenReq();
|
||||
rpcGetMDMTokenReq.setAppKey(mdmAppKey);
|
||||
rpcGetMDMTokenReq.setAppSecret(mdmAppSec);
|
||||
Map<String, String> headers = new HashMap<>(1);
|
||||
headers.put("Authorization", getMdmAccessToken(rpcGetMDMTokenReq));
|
||||
responseEntity = RestTemplateUtil.get(url, headers, MDMResultDTO.class);
|
||||
log.info("url:{}, header:{}, response:{}", url, JSONObject.toJSONString(headers), JSONObject.toJSONString(responseEntity));
|
||||
if (Objects.nonNull(responseEntity.getBody()) && responseEntity.getBody().isSuccess()) {
|
||||
return JSONObject.toJSONString(responseEntity.getBody().getData());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.info("调用MDM接口出错 url{}, e{}", url, e);
|
||||
throw new ApiException(e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getMdmAccessToken(RpcGetMdmTokenReq rpcGetMDMTokenReq) throws ApiException {
|
||||
String url = mdmBaseUrl + "/api/oauth2/accessToken";
|
||||
ResponseEntity<MDMResultDTO> responseEntity = null;
|
||||
try {
|
||||
responseEntity = RestTemplateUtil.post(url, rpcGetMDMTokenReq, MDMResultDTO.class);
|
||||
log.info("url:{}, response:{}", url, JSONObject.toJSONString(responseEntity));
|
||||
if (Objects.nonNull(responseEntity.getBody()) && responseEntity.getBody().isSuccess()) {
|
||||
AccessTokenDTO accessTokenDTO = JSONObject.parseObject(JSONObject.toJSONString(responseEntity.getBody().getData()), AccessTokenDTO.class);
|
||||
if (accessTokenDTO == null || StringUtils.isBlank(accessTokenDTO.getAccessToken())) {
|
||||
throw new ServiceException("获取Mdm token失败!");
|
||||
}
|
||||
return accessTokenDTO.getAccessToken();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.info("获取MDM Token 出错 url:\t{}, e:\t{}", url, e);
|
||||
throw new ApiException(e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.entity.HyPartnerFraSourceDO;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.request.CreateQualifyVerifyReq;
|
||||
import com.cool.store.request.QualificationCallbackReq;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: young.yu
|
||||
@@ -15,4 +17,7 @@ public interface FlowService {
|
||||
void createQualifyVerify(CreateQualifyVerifyReq request) throws ApiException, IOException;
|
||||
|
||||
void qualificationCallback(QualificationCallbackReq request) throws ApiException;
|
||||
|
||||
List<HyPartnerFraSourceDO> getDictList();
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.aliyun.dysmsapi20170525.models.SendSmsResponse;
|
||||
import com.cool.store.enums.SMSMsgEnum;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.response.SmsSendResponse;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @Author: young.yu
|
||||
@@ -9,5 +13,8 @@ import com.cool.store.exception.ApiException;
|
||||
* @Description:
|
||||
*/
|
||||
public interface SmsService {
|
||||
public SendSmsResponse sendSms(String params, String templateCode, String mobile) throws ApiException;
|
||||
public SmsSendResponse sendSmsNormal(String phone, SMSMsgEnum smsMsgEnum, Object... objects);
|
||||
|
||||
public SmsSendResponse sendSmsVariable(String phone, SMSMsgEnum smsMsgEnum,String... objects);
|
||||
|
||||
}
|
||||
|
||||
@@ -19,4 +19,6 @@ public interface WechatMiniAppService {
|
||||
String updateUserPhoneNumber(MobileUpdateRequest request, PartnerUserInfoVO userInfoVO);
|
||||
|
||||
PartnerUserInfoVO getUserInfo(String mobile, String openId);
|
||||
|
||||
String getMiniAppUrl();
|
||||
}
|
||||
|
||||
@@ -86,8 +86,8 @@ public class EcSyncServiceImpl implements EcSyncService {
|
||||
try {
|
||||
insertSelectiveSync(customerInfoItem);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
sendFeiShuRobotMessage("推送:" + JSONObject.toJSONString(e), "27243d49-97ca-4981-8aec-7c3bf84eb660");
|
||||
log.error("ec同步至招商小程序报错"+JSONObject.toJSONString(e));
|
||||
sendFeiShuRobotMessage("推送:"+JSONObject.toJSONString(e),"27243d49-97ca-4981-8aec-7c3bf84eb660");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -158,8 +158,7 @@ public class EcSyncServiceImpl implements EcSyncService {
|
||||
}
|
||||
String newPartnerId = UUIDUtils.get32UUID();
|
||||
HyPartnerUserInfoDO resultUser = new HyPartnerUserInfoDO();
|
||||
resultUser.setUsername(customerInfoItem.getName()).setMobile(customerInfoItem.getMobile()).setUserChannelId(Convert.toInt(channelId));
|
||||
|
||||
resultUser.setUsername(customerInfoItem.getName()).setMobile(customerInfoItem.getMobile()).setUserChannelId(Convert.toInt(channelId)).setEcWantShopArea(customerInfoItem.getEcWantShopArea());
|
||||
HyPartnerLineInfoDO resultLine = new HyPartnerLineInfoDO();
|
||||
String followUserName = customerInfoItem.getFollowUserName();
|
||||
String followUserMobile = customerInfoItem.getFollowUserMobile();
|
||||
@@ -249,6 +248,9 @@ public class EcSyncServiceImpl implements EcSyncService {
|
||||
setCreateTime(new Date());
|
||||
hyPartnerBaseInfoDAO.insertSelective(resultBase);
|
||||
}
|
||||
newUserInfo.setEcWantShopArea(resultUser.getEcWantShopArea());
|
||||
//添加ec意向区域同步
|
||||
hyPartnerUserInfoDAO.updateByPrimaryKeySelective(newUserInfo);
|
||||
} else {
|
||||
resultUser.setPartnerId(newPartnerId).setCreateTime(new Date());
|
||||
hyPartnerUserInfoDAO.insertSelective(resultUser);
|
||||
|
||||
@@ -16,10 +16,7 @@ import com.cool.store.dto.log.LogBasicDTO;
|
||||
import com.cool.store.dto.mdm.AccessTokenDTO;
|
||||
import com.cool.store.dto.response.MDMResultDTO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.InspectionTyeEnum;
|
||||
import com.cool.store.enums.OperateTypeEnum;
|
||||
import com.cool.store.enums.WorkflowStatusEnum;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.*;
|
||||
@@ -27,10 +24,7 @@ import com.cool.store.oss.OSSServer;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.request.data.flow.KeyText;
|
||||
import com.cool.store.request.data.flow.SkrRelshipProve;
|
||||
import com.cool.store.service.FlowService;
|
||||
import com.cool.store.service.HyPartnerLineInfoService;
|
||||
import com.cool.store.service.LogService;
|
||||
import com.cool.store.service.SmsService;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.utils.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -103,9 +97,14 @@ public class FlowServiceImpl implements FlowService {
|
||||
|
||||
@Autowired
|
||||
private HyInspectionMapper inspectionMapper;
|
||||
@Autowired
|
||||
private WechatMiniAppService wechatMiniAppService;
|
||||
|
||||
@Autowired
|
||||
private HyPartnerFraSourceMapper hyPartnerFraSourceMapper;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void createQualifyVerify(CreateQualifyVerifyReq request) throws ApiException, IOException {
|
||||
//根据面试id获取面试信息
|
||||
HyPartnerInterviewDO hyPartnerInterviewDO = hyPartnerInterviewMapper.selectByPrimaryKeySelective(request.getInterviewId());
|
||||
@@ -119,10 +118,7 @@ public class FlowServiceImpl implements FlowService {
|
||||
//1.发起加盟商资质审核
|
||||
RpcCreateQualifyVerifyReq rpcRequest = new RpcCreateQualifyVerifyReq();
|
||||
RpcCreateQualifyVerifyReq.Data dataBody = new RpcCreateQualifyVerifyReq().new Data();
|
||||
KeyText fraSource = new KeyText();
|
||||
fraSource.setKey("HSAYPartner");
|
||||
fraSource.setText("沪上阿姨合伙人");
|
||||
dataBody.setFraSource(fraSource);
|
||||
dataBody.setFraSource(request.getFraSource());
|
||||
//copy properties
|
||||
BeanUtil.copyProperties(request, dataBody);
|
||||
//日期格式问题
|
||||
@@ -223,6 +219,24 @@ public class FlowServiceImpl implements FlowService {
|
||||
hyPartnerLineInfoDO.setDevelopmentDirector(request.getDevtDirectorId());
|
||||
hyPartnerLineInfoMapper.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
|
||||
}
|
||||
//3. 生成通过函并修改数据库相关信息
|
||||
String verifyCity = hyPartnerInterviewMapper.getVerifyCityByInterviewId(request.getInterviewId());
|
||||
String[] split = verifyCity.split("/");
|
||||
//根据长度来取市级行政区域
|
||||
if (split.length == 2) {
|
||||
verifyCity = split[1];
|
||||
} else if (split.length == 3) {
|
||||
verifyCity = split[1];
|
||||
} else if (split.length == 4) {
|
||||
verifyCity = split[2];
|
||||
} else {
|
||||
throw new ServiceException(ErrorCodeEnum.INTENT_INFO_NOT_EXIST);
|
||||
}
|
||||
// TODO pass_reason 暂无
|
||||
//将通过时间修改为本系统处理回调的时间,不以 request 的 modifiedTime 为准(有误)
|
||||
String partnerName = request.getIntentionSignerUsername();
|
||||
//TODO 问题:如果因为 pdf 生成失败或者其他原因导致异常,但是由于 MDM 只是做回调,不对回调是否成功负责,会导致流程信息缺失
|
||||
genPassLetterAndUpdateDB(partnerName, verifyCity, new Date(), request.getInterviewId());
|
||||
//记录日志
|
||||
CreateQualifyVerifyDTO log = CreateQualifyVerifyDTO.builder().mobile(operator.getMobile()).operateUserId(operator.getUserId()).operateUsername(operator.getName()).operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC))
|
||||
.summary(request.getSummary()).qualiVerifyContent(JSON.toJSONString(partnerCertificationInfoDO)).build();
|
||||
@@ -251,27 +265,10 @@ public class FlowServiceImpl implements FlowService {
|
||||
if ("FINISHED".equals(request.getInstanceStatus())) {
|
||||
//更新面试状态
|
||||
interviewDAO.updateInterviewWorkflowStatus(interviewPlanId, WorkflowStatusEnum.INTERVIEW_6);
|
||||
//2. 准备需要的信息
|
||||
String partnerName = request.getIntendedSigner();
|
||||
String verifyCity = hyPartnerInterviewMapper.getVerifyCityByInterviewId(interviewId);
|
||||
String[] split = verifyCity.split("/");
|
||||
//根据长度来取市级行政区域
|
||||
if (split.length == 2) {
|
||||
verifyCity = split[1];
|
||||
} else if (split.length == 3) {
|
||||
verifyCity = split[1];
|
||||
} else if (split.length == 4) {
|
||||
verifyCity = split[2];
|
||||
} else {
|
||||
throw new ServiceException(ErrorCodeEnum.INTENT_INFO_NOT_EXIST);
|
||||
}
|
||||
// TODO pass_reason 暂无
|
||||
//将通过时间修改为本系统处理回调的时间,不以 request 的 modifiedTime 为准(有误)
|
||||
Date passDate = new Date();
|
||||
//3. 生成通过函并修改数据库相关信息
|
||||
//TODO 问题:如果因为 pdf 生成失败或者其他原因导致异常,但是由于 MDM 只是做回调,不对回调是否成功负责,会导致流程信息缺失
|
||||
genPassLetterAndUpdateDB(partnerName, verifyCity, passDate, interviewId);
|
||||
//4. 向面试稽核表中新增一条信息
|
||||
//4. 向面试稽核表中新增一条信息
|
||||
HyInspectionDO hyInspectionDO = new HyInspectionDO();
|
||||
hyInspectionDO.setInterviewPlanId(Long.parseLong(interviewPlanId));
|
||||
hyInspectionDO.setCreateTime(DateUtil.formatDateTime(passDate));
|
||||
@@ -279,7 +276,7 @@ public class FlowServiceImpl implements FlowService {
|
||||
inspectionMapper.insertSelective(hyInspectionDO);
|
||||
//发送加盟商资质审核通过短信
|
||||
HyPartnerBaseInfoDO hyPartnerBaseInfoDO = hyPartnerBaseInfoDAO.getByPartnerLineId(partnerLineId);
|
||||
smsService.sendSms(null, CommonConstants.SMS_TEMPLATE_CODE_VERIFY, hyPartnerBaseInfoDO.getMobile());
|
||||
smsService.sendSmsVariable(hyPartnerBaseInfoDO.getMobile(), SMSMsgEnum.INTERVIEW_PASS,wechatMiniAppService.getMiniAppUrl());
|
||||
//记录日志
|
||||
//这里记录的日志时间为 passTime,而不是当前时间,否则 getTipsInfo 接口返回的时间是这里记录的当前时间,与 passTime 不符
|
||||
LogBasicDTO log = LogBasicDTO.builder().operateTime(DateUtil.format(passDate, CoolDateUtils.DATE_FORMAT_SEC))
|
||||
@@ -299,6 +296,11 @@ public class FlowServiceImpl implements FlowService {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HyPartnerFraSourceDO> getDictList() {
|
||||
return hyPartnerFraSourceMapper.selectAllFraSourceList();
|
||||
}
|
||||
|
||||
public List<SkrRelshipProve> OSSFileToMDMFile(List<String> fileUrlList) throws ApiException, IOException {
|
||||
String url = mdmBaseUrl + "/api/openapi/ext/upload/file";
|
||||
ResponseEntity<MDMResultDTO> responseEntity = null;
|
||||
|
||||
@@ -96,6 +96,8 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
@Resource
|
||||
private HyPartnerIntentInfoDAO hyPartnerIntentInfoDAO;
|
||||
|
||||
@Autowired
|
||||
private WechatMiniAppService wechatMiniAppService;
|
||||
@Override
|
||||
public StageCountVO selectStagePendingCount(String userId) {
|
||||
StageCountDTO stageCountDTO = hyPartnerLineInfoDAO.selectStagePendingCount(userId);
|
||||
@@ -476,9 +478,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
hy.setCertifyFile(JSONObject.toJSONString(closeFollowRequest.getCertifyFile()));
|
||||
}
|
||||
hyPartnerBaseInfoDAO.updateByPrimaryKeySelective(hy);
|
||||
IntentSmsReq intentSmsReq = new IntentSmsReq();
|
||||
intentSmsReq.setDeadLine(DateUtil.formatDateTime(hyPartnerLineInfoDO.getDeadline()));
|
||||
smsService.sendSms(JSON.toJSONString(intentSmsReq),CommonConstants.SMS_TEMPLATE_CODE_INTENT, hy.getMobile());
|
||||
smsService.sendSmsVariable(hy.getMobile(), SMSMsgEnum.INTENTION_APPLY_PASS,DateUtil.formatDateTime(hyPartnerLineInfoDO.getDeadline()),wechatMiniAppService.getMiniAppUrl());
|
||||
}
|
||||
|
||||
//拒绝
|
||||
@@ -595,6 +595,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
}
|
||||
publicSeaLineListVo.setPhoneAddress(phoneAddress);
|
||||
publicSeaLineListVo.setWantShopArea(x.getWantShopArea());
|
||||
publicSeaLineListVo.setEcWantShopArea(x.getEcWantShopArea());
|
||||
publicSeaLineListVo.setUpdateTime(DateUtil.format(x.getUpdateTime(),CoolDateUtils.DATE_FORMAT_SEC_2));
|
||||
publicSeaLineListVo.setId(x.getLineId());
|
||||
publicSeaLineListVo.setAcceptAdjustType(x.getAcceptAdjustType());
|
||||
|
||||
@@ -24,10 +24,7 @@ import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.http.ISVHttpRequest;
|
||||
import com.cool.store.mapper.*;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.service.EnterpriseUserService;
|
||||
import com.cool.store.service.InterviewService;
|
||||
import com.cool.store.service.LogService;
|
||||
import com.cool.store.service.SmsService;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.utils.CoolDateUtils;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import com.cool.store.utils.TRTCUtils;
|
||||
@@ -100,6 +97,9 @@ public class InterviewServiceImpl implements InterviewService {
|
||||
|
||||
@Autowired
|
||||
private EnterpriseUserDAO enterpriseUserDAO;
|
||||
|
||||
@Autowired
|
||||
private WechatMiniAppService wechatMiniAppService;
|
||||
@Override
|
||||
public List<InterviewVO> getInterviewList(GetInterviewListReq request) {
|
||||
List<InterviewVO> interviewList = hyPartnerInterviewPlanMapper.getInterviewList(request);
|
||||
@@ -571,10 +571,7 @@ public class InterviewServiceImpl implements InterviewService {
|
||||
hyPartnerLineDO.setUpdateTime(new Date());
|
||||
hyPartnerLineInfoMapper.updateByPrimaryKeySelective(hyPartnerLineDO);
|
||||
//异步发送短信给加盟商
|
||||
InterviewSmsReq interviewSmsReq = new InterviewSmsReq();
|
||||
interviewSmsReq.setInterviewStartTime(DateUtil.format(DateUtil.parse(interviewVO.getStartTime()), DatePattern.NORM_DATETIME_MINUTE_PATTERN));
|
||||
smsService.sendSms(JSON.toJSONString(interviewSmsReq),templateCode, partnerBaseInfo.getMobile());
|
||||
|
||||
smsService.sendSmsVariable(partnerBaseInfo.getMobile(), SMSMsgEnum.INTERVIEW_APPOINTMENT_PASS,DateUtil.format(DateUtil.parse(interviewVO.getStartTime()), DatePattern.NORM_DATETIME_MINUTE_PATTERN),wechatMiniAppService.getMiniAppUrl());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,55 +1,100 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.aliyun.dysmsapi20170525.Client;
|
||||
import com.aliyun.dysmsapi20170525.models.SendSmsRequest;
|
||||
import com.aliyun.dysmsapi20170525.models.SendSmsResponse;
|
||||
import com.aliyun.teaopenapi.models.Config;
|
||||
import com.cool.store.enums.SMSMsgEnum;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.mq.util.HttpRestTemplateService;
|
||||
import com.cool.store.request.SmsSendRequest;
|
||||
import com.cool.store.response.SmsSendResponse;
|
||||
import com.cool.store.service.SmsService;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.text.MessageFormat;
|
||||
|
||||
/**
|
||||
* @Author: young.yu
|
||||
* @Date: 2023-06-21 10:55
|
||||
* @Description:
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class SmsServiceImpl implements SmsService {
|
||||
|
||||
@Value("${hs.sms.accessKeyId:null}")
|
||||
private String accessKeyId ;
|
||||
|
||||
@Value("${hs.sms.accessKeySecret:null}")
|
||||
private String accessKeySecret;
|
||||
/**
|
||||
* 普通短信请求url
|
||||
*/
|
||||
private final static String NORMAL_SMS_URL = "https://smssh1.253.com/msg/v1/send/json";
|
||||
|
||||
/**
|
||||
* 发送短信
|
||||
* @param params Json格式的参数
|
||||
* @param mobile
|
||||
* 普通短信请求url
|
||||
*/
|
||||
private final static String VARIABLE_SMS_URL = "https://smssh1.253.com/msg/variable/json";
|
||||
|
||||
/**
|
||||
* 用户平台API账号
|
||||
*/
|
||||
private final static String ACCOUNT = "N7567896";
|
||||
/**
|
||||
* 用户平台API密码
|
||||
*/
|
||||
public final static String PASS_WORD = "MpGD8g15v2cea3";
|
||||
|
||||
@Autowired
|
||||
private HttpRestTemplateService httpRestTemplateService;
|
||||
|
||||
/**
|
||||
* 发送普通短信
|
||||
* @param phone 手机号码
|
||||
* @param smsMsgEnum 短信内容
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
@Override
|
||||
@Async
|
||||
public SendSmsResponse sendSms(String params,String templateCode, String mobile) throws ApiException {
|
||||
public SmsSendResponse sendSmsNormal(String phone, SMSMsgEnum smsMsgEnum,Object... objects) {
|
||||
try {
|
||||
Config config = new Config()
|
||||
// 您的AccessKey ID
|
||||
.setAccessKeyId(accessKeyId)
|
||||
// 您的AccessKey Secret
|
||||
.setAccessKeySecret(accessKeySecret);
|
||||
SendSmsRequest sendSmsRequest = new SendSmsRequest()
|
||||
.setPhoneNumbers(mobile)
|
||||
.setSignName("沪上阿姨")
|
||||
.setTemplateCode(templateCode)
|
||||
.setTemplateParam(params);
|
||||
Client client = new Client(config);
|
||||
return client.sendSms(sendSmsRequest);
|
||||
}catch (ApiException e){
|
||||
throw new ApiException(e.getMessage());
|
||||
} catch (Exception exception) {
|
||||
throw new ApiException(exception.getMessage());
|
||||
SmsSendRequest smsSingleRequest = new SmsSendRequest(ACCOUNT, PASS_WORD, MessageFormat.format(smsMsgEnum.getContent(), objects), phone);
|
||||
String requestJson = JSON.toJSONString(smsSingleRequest);
|
||||
String response = httpRestTemplateService.postForObject(NORMAL_SMS_URL, requestJson, String.class);
|
||||
SmsSendResponse smsSingleResponse = JSON.parseObject(response, SmsSendResponse.class);
|
||||
return smsSingleResponse;
|
||||
}catch (Exception e){
|
||||
log.error("短信发送异常:"+e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送变量短信
|
||||
* @param params 手机号,参数 多个使用;隔开 例: 手机号1,参数A,参数B;手机号2,参数C,参数D
|
||||
* @param msg 短信内容,变量使用{$var}标识
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
@Override
|
||||
@Async
|
||||
public SmsSendResponse sendSmsVariable(String phone, SMSMsgEnum smsMsgEnum,String... objects){
|
||||
//
|
||||
//params 手机号,参数 多个使用;隔开 例: 手机号1,参数A,参数B;手机号2,参数C,参数D
|
||||
StringBuffer params = new StringBuffer(phone);
|
||||
for (String object : objects) {
|
||||
params.append(",").append(object);
|
||||
}
|
||||
SmsSendRequest smsSingleRequest = new SmsSendRequest(ACCOUNT, PASS_WORD, smsMsgEnum.getContent(), params.toString());
|
||||
String requestJson = JSON.toJSONString(smsSingleRequest);
|
||||
String response = httpRestTemplateService.postForObject(VARIABLE_SMS_URL, requestJson,String.class);
|
||||
SmsSendResponse smsSingleResponse = JSON.parseObject(response, SmsSendResponse.class);
|
||||
return smsSingleResponse;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,9 @@ package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.dto.wx.CodeSessionDTO;
|
||||
import com.cool.store.dto.wx.MiniProgramLoginDTO;
|
||||
import com.cool.store.dto.wx.PhoneInfoDTO;
|
||||
import com.cool.store.dto.wx.*;
|
||||
import com.cool.store.entity.HyOpenAreaInfoDO;
|
||||
import com.cool.store.entity.HyPartnerLineInfoDO;
|
||||
import com.cool.store.entity.HyPartnerUserInfoDO;
|
||||
@@ -26,6 +23,7 @@ import com.cool.store.utils.UUIDUtils;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
import com.cool.store.vo.wx.MiniProgramUserVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -71,7 +69,6 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
|
||||
@Value("${recommended.channel.id}")
|
||||
private Integer recommended;
|
||||
|
||||
|
||||
@Override
|
||||
public PartnerUserInfoVO miniProgramLogin(MiniProgramLoginDTO param) {
|
||||
log.info("miniProgramLogin #param {}", JSONObject.toJSONString(param));
|
||||
@@ -217,4 +214,17 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
|
||||
return userInfoVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMiniAppUrl() {
|
||||
// 获取小程序token
|
||||
String accessToken = wechatRest.getAccessToken(wxAppId, wxAppSecret);
|
||||
MiniAppUrlLinkReqDTO miniAppUrlLinkReqDTO = new MiniAppUrlLinkReqDTO();
|
||||
// miniAppUrlLinkReqDTO.setPath(weixinIndexUrl);
|
||||
MiniAppUrlLinkDTO miniAppUrlLink = wechatRest.getMiniAppUrlLink(accessToken, miniAppUrlLinkReqDTO);
|
||||
if (miniAppUrlLink != null){
|
||||
return miniAppUrlLink.getUrlLink();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* @Author: young.yu
|
||||
* @Date: 2023-09-14 15:22
|
||||
* @Description:
|
||||
*/class SmsServiceTest {
|
||||
|
||||
@Test
|
||||
void sendSmsNormal() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -9,10 +9,7 @@ import com.cool.store.service.FlowService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -28,6 +25,8 @@ public class FlowController {
|
||||
|
||||
@Autowired
|
||||
private FlowService flowService;
|
||||
|
||||
|
||||
@PostMapping("/qualifyVerify/create")
|
||||
@ApiOperation("发起加盟商资质审核")
|
||||
public ResponseResult createQualifyVerify(@RequestBody CreateQualifyVerifyReq request) throws ApiException, IOException {
|
||||
@@ -42,4 +41,10 @@ public class FlowController {
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@GetMapping("/dictList")
|
||||
@ApiOperation("获取资质审核数据来源")
|
||||
public ResponseResult getDictList(){
|
||||
return ResponseResult.success(flowService.getDictList());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.cool.store.service.*;
|
||||
import com.cool.store.vo.cuser.IdentityCardInfoVO;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -63,6 +64,9 @@ public class TestController {
|
||||
@Resource
|
||||
private FollowTaskService followTaskService;
|
||||
|
||||
@Autowired
|
||||
private WechatMiniAppService wechatMiniAppService;
|
||||
|
||||
@PostMapping("/post")
|
||||
public ResponseResult<Boolean> get(@RequestBody List<TestRequest> testRequestList){
|
||||
log.info(JSONObject.toJSONString(testRequestList));
|
||||
@@ -285,4 +289,9 @@ public class TestController {
|
||||
public ResponseResult initOpenArea() {
|
||||
return ResponseResult.success(openAreaService.addOpenArea());
|
||||
}
|
||||
|
||||
@GetMapping("/getMiniAppUrl")
|
||||
public ResponseResult getMiniAppUrl(){
|
||||
return ResponseResult.success(wechatMiniAppService.getMiniAppUrl());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ public class SignValidateFilter implements Filter {
|
||||
|
||||
private static List<String> patternList =
|
||||
Lists.newArrayList("/web/check/ok","/check/ok",
|
||||
"/partner/mini/program/**",
|
||||
"/partner/mini/program/doc.html","/partner/mini/program/v2/api-docs","/**/test/**",
|
||||
"/partner/mini/program/oss/getUploadFileConfig",
|
||||
"/partner/mini/program/v1/partnerManage/partner/getIdentityCardInfo",
|
||||
|
||||
Reference in New Issue
Block a user