Merge branch 'master' into dev/feat/partner1.5.2_20231121

This commit is contained in:
feng.li
2023-11-08 14:28:16 +08:00
27 changed files with 1186 additions and 169 deletions

View File

@@ -147,7 +147,7 @@ public class EnterpriseUserDAO {
return userList.stream().filter(o->!StringUtils.isAnyBlank(o.getMobile(), o.getName())).collect(Collectors.toMap(k -> k.getUserId(), Function.identity()));
}
public String selectByMobile(String mobile) {
public EnterpriseUserDO selectByMobile(String mobile) {
return enterpriseUserMapper.selectByMobile(mobile);
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.dao;
import com.cool.store.dto.partner.MobileCheckDTO;
import com.cool.store.entity.HyPartnerUserInfoDO;
import com.cool.store.mapper.HyPartnerUserInfoMapper;
import com.google.common.collect.Lists;
@@ -83,4 +84,14 @@ public class HyPartnerUserInfoDAO {
}
public String selectLastCrmCreateTime() {
return hyPartnerUserInfoMapper.selectLastCrmCreateTime();
}
public MobileCheckDTO selectByCheckMobile(String mobile) {
if (StringUtils.isEmpty(mobile)){
return null;
}
return hyPartnerUserInfoMapper.selectByCheckMobile(mobile);
}
}

View File

@@ -101,7 +101,7 @@ public interface EnterpriseUserMapper {
*/
List<EnterpriseUserDO> getUserListByRegionIds(@Param("regionIds") List<String> regionIds);
String selectByMobile(@Param("mobile") String mobile);
EnterpriseUserDO selectByMobile(@Param("mobile") String mobile);
EnterpriseUserDO selectByInvestmentManager(@Param("investmentManager") String investmentManager);

View File

@@ -0,0 +1,31 @@
package com.cool.store.mapper;
import com.cool.store.entity.HyPartnerEcTrackLogDO;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author hxd
*/
@Mapper
public interface HyPartnerEcTrackLogMapper {
int deleteByPrimaryKey(Long id);
int insert(HyPartnerEcTrackLogDO record);
int insertSelective(HyPartnerEcTrackLogDO record);
HyPartnerEcTrackLogDO selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(HyPartnerEcTrackLogDO record);
int updateByPrimaryKey(HyPartnerEcTrackLogDO record);
int batchInsertOrUpdate(@Param("recordList") HyPartnerEcTrackLogDO resultTrajectoryList);
Page<HyPartnerEcTrackLogDO> getEcLogPageByPartnerId(@Param("partnerId") String partnerId);
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.mapper;
import com.cool.store.dto.partner.MobileCheckDTO;
import com.cool.store.entity.HyPartnerUserInfoDO;
import com.cool.store.entity.SyncEcCustomerDO;
import org.apache.ibatis.annotations.Param;
@@ -49,4 +50,8 @@ public interface HyPartnerUserInfoMapper {
int selectByHourDateCount(@Param("selectTime") String hourDayDate, @Param("now") String now);
int updateByPartnerId(@Param("record") HyPartnerUserInfoDO record);
String selectLastCrmCreateTime();
MobileCheckDTO selectByCheckMobile(@Param("mobile") String mobile);
}

View File

@@ -332,13 +332,13 @@
SUBSTR(jobnumber,1,1),
CAST(SUBSTR(jobnumber,2) AS UNSIGNED) ASC
</select>
<select id="selectByMobile" resultType="java.lang.String">
SELECT user_id FROM enterprise_user WHERE mobile =#{mobile} LIMIT 1
<select id="selectByMobile" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"/> FROM enterprise_user WHERE mobile =#{mobile} and deleted=0 LIMIT 1
</select>
<select id="selectByInvestmentManager" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM enterprise_user WHERE mobile like #{investmentManager} or `name` like #{investmentManager} LIMIT 1
FROM enterprise_user WHERE ( mobile = #{investmentManager} or `name` = #{investmentManager} ) and deleted=0 LIMIT 1
</select>
<select id="getFeishuUserIdsByUserIds" resultMap="BaseResultMap">

View File

@@ -0,0 +1,345 @@
<?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.HyPartnerEcTrackLogMapper">
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerEcTrackLogDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="trajectory_id" jdbcType="VARCHAR" property="trajectoryId" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="user_name" jdbcType="VARCHAR" property="userName" />
<result column="crm_id" jdbcType="VARCHAR" property="crmId" />
<result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
<result column="receive_user_ids" jdbcType="VARCHAR" property="receiveUserIds" />
<result column="receive_user" jdbcType="VARCHAR" property="receiveUser" />
<result column="trajectory_type" jdbcType="INTEGER" property="trajectoryType" />
<result column="trajectory_type_content" jdbcType="VARCHAR" property="trajectoryTypeContent" />
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="operate_time" jdbcType="TIMESTAMP" property="operateTime" />
<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, trajectory_id, user_id, user_name, crm_id,mobile, receive_user_ids, receive_user, trajectory_type,partner_id,
trajectory_type_content, content, operate_time, create_time, update_time, remark
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from hy_partner_ec_track_log
where id = #{id,jdbcType=BIGINT}
</select>
<select id="getEcLogPageByPartnerId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from hy_partner_ec_track_log
where partner_id = #{partnerId} order by operate_time desc
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from hy_partner_ec_track_log
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.cool.store.entity.HyPartnerEcTrackLogDO" useGeneratedKeys="true">
insert into hy_partner_ec_track_log (trajectory_id, user_id, user_name, mobile,
crm_id,partner_id, receive_user_ids, receive_user,
trajectory_type, trajectory_type_content,
content, operate_time, create_time,
update_time, remark)
values (#{trajectoryId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR},
#{crmId,jdbcType=VARCHAR},#{partnerId,jdbcType=VARCHAR}, #{receiveUserIds,jdbcType=VARCHAR}, #{receiveUser,jdbcType=VARCHAR},
#{trajectoryType,jdbcType=INTEGER}, #{trajectoryTypeContent,jdbcType=VARCHAR},
#{content,jdbcType=VARCHAR}, #{operateTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.cool.store.entity.HyPartnerEcTrackLogDO" useGeneratedKeys="true">
insert into hy_partner_ec_track_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="trajectoryId != null">
trajectory_id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="userName != null">
user_name,
</if>
<if test="mobile != null">
mobile,
</if>
<if test="crmId != null">
crm_id,
</if>
<if test="partnerId != null">
partner_id,
</if>
<if test="receiveUserIds != null">
receive_user_ids,
</if>
<if test="receiveUser != null">
receive_user,
</if>
<if test="trajectoryType != null">
trajectory_type,
</if>
<if test="trajectoryTypeContent != null">
trajectory_type_content,
</if>
<if test="content != null">
content,
</if>
<if test="operateTime != null">
operate_time,
</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="trajectoryId != null">
#{trajectoryId,jdbcType=VARCHAR},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
<if test="userName != null">
#{userName,jdbcType=VARCHAR},
</if>
<if test="mobile != null">
#{mobile,jdbcType=VARCHAR},
</if>
<if test="crmId != null">
#{crmId,jdbcType=VARCHAR},
</if>
<if test="partnerId != null">
#{partnerId,jdbcType=VARCHAR},
</if>
<if test="receiveUserIds != null">
#{receiveUserIds,jdbcType=VARCHAR},
</if>
<if test="receiveUser != null">
#{receiveUser,jdbcType=VARCHAR},
</if>
<if test="trajectoryType != null">
#{trajectoryType,jdbcType=INTEGER},
</if>
<if test="trajectoryTypeContent != null">
#{trajectoryTypeContent,jdbcType=VARCHAR},
</if>
<if test="content != null">
#{content,jdbcType=VARCHAR},
</if>
<if test="operateTime != null">
#{operateTime,jdbcType=TIMESTAMP},
</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>
ON DUPLICATE KEY UPDATE trajectory_id=values(trajectory_id)
,user_id=values(user_id)
,user_name=values(user_name)
,crm_id=values(crm_id)
,partner_id=values(partner_id)
,mobile=values(mobile)
,receive_user_ids=values(receive_user_ids)
,receive_user=values(receive_user)
,trajectory_type=values(trajectory_type)
,trajectory_type_content=values(trajectory_type_content)
,content=values(content)
,operate_time=values(operate_time)
,create_time=values(create_time)
,remark=values(remark)
</insert>
<insert id="batchInsertOrUpdate">
<foreach collection="recordList" item="record" separator=";">
insert into hy_partner_ec_track_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="trajectoryId != null">
trajectory_id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="userName != null">
user_name,
</if>
<if test="mobile != null">
mobile,
</if>
<if test="crmId != null">
crm_id,
</if>
<if test="partnerId != null">
partner_id,
</if>
<if test="receiveUserIds != null">
receive_user_ids,
</if>
<if test="receiveUser != null">
receive_user,
</if>
<if test="trajectoryType != null">
trajectory_type,
</if>
<if test="trajectoryTypeContent != null">
trajectory_type_content,
</if>
<if test="content != null">
content,
</if>
<if test="operateTime != null">
operate_time,
</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="record.trajectoryId != null">
#{record.trajectoryId,jdbcType=VARCHAR},
</if>
<if test="record.userId != null">
#{record.userId,jdbcType=VARCHAR},
</if>
<if test="record.userName != null">
#{record.userName,jdbcType=VARCHAR},
</if>
<if test="record.mobile != null">
#{record.mobile,jdbcType=VARCHAR},
</if>
<if test="record.crmId != null">
#{record.crmId,jdbcType=VARCHAR},
</if>
<if test="record.partnerId != null">
#{record.partnerId,jdbcType=VARCHAR},
</if>
<if test="record.receiveUserIds != null">
#{record.receiveUserIds,jdbcType=VARCHAR},
</if>
<if test="record.receiveUser != null">
#{record.receiveUser,jdbcType=VARCHAR},
</if>
<if test="record.trajectoryType != null">
#{record.trajectoryType,jdbcType=INTEGER},
</if>
<if test="record.trajectoryTypeContent != null">
#{record.trajectoryTypeContent,jdbcType=VARCHAR},
</if>
<if test="record.content != null">
#{record.content,jdbcType=VARCHAR},
</if>
<if test="record.operateTime != null">
#{record.operateTime,jdbcType=TIMESTAMP},
</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 trajectory_id=values(trajectory_id)
,user_id=values(user_id)
,user_name=values(user_name)
,crm_id=values(crm_id)
,partner_id=values(partner_id)
,mobile=values(mobile)
,receive_user_ids=values(receive_user_ids)
,receive_user=values(receive_user)
,trajectory_type=values(trajectory_type)
,trajectory_type_content=values(trajectory_type_content)
,content=values(content)
,operate_time=values(operate_time)
,create_time=values(create_time)
,remark=values(remark)
</foreach>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyPartnerEcTrackLogDO">
update hy_partner_ec_track_log
<set>
<if test="trajectoryId != null">
trajectory_id = #{trajectoryId,jdbcType=VARCHAR},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=VARCHAR},
</if>
<if test="mobile != null">
mobile = #{mobile,jdbcType=VARCHAR},
</if>
<if test="userName != null">
user_name = #{userName,jdbcType=VARCHAR},
</if>
<if test="crmId != null">
crm_id = #{crmId,jdbcType=VARCHAR},
</if>
<if test="partnerId != null">
partner_id = #{partnerId,jdbcType=VARCHAR},
</if>
<if test="receiveUserIds != null">
receive_user_ids = #{receiveUserIds,jdbcType=VARCHAR},
</if>
<if test="receiveUser != null">
receive_user = #{receiveUser,jdbcType=VARCHAR},
</if>
<if test="trajectoryType != null">
trajectory_type = #{trajectoryType,jdbcType=INTEGER},
</if>
<if test="trajectoryTypeContent != null">
trajectory_type_content = #{trajectoryTypeContent,jdbcType=VARCHAR},
</if>
<if test="content != null">
content = #{content,jdbcType=VARCHAR},
</if>
<if test="operateTime != null">
operate_time = #{operateTime,jdbcType=TIMESTAMP},
</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.HyPartnerEcTrackLogDO">
update hy_partner_ec_track_log
set trajectory_id = #{trajectoryId,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=VARCHAR},
user_name = #{userName,jdbcType=VARCHAR},
crm_id = #{crmId,jdbcType=VARCHAR},
partner_id = #{partnerId,jdbcType=VARCHAR},
mobile = #{mobile,jdbcType=VARCHAR},
receive_user_ids = #{receiveUserIds,jdbcType=VARCHAR},
receive_user = #{receiveUser,jdbcType=VARCHAR},
trajectory_type = #{trajectoryType,jdbcType=INTEGER},
trajectory_type_content = #{trajectoryTypeContent,jdbcType=VARCHAR},
content = #{content,jdbcType=VARCHAR},
operate_time = #{operateTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -20,6 +20,7 @@
<result column="recommend_partner_name" jdbcType="VARCHAR" property="recommendPartnerName" />
<result column="recommend_partner_mobile" jdbcType="VARCHAR" property="recommendPartnerMobile" />
<result column="user_channel_id" jdbcType="BIGINT" property="userChannelId" />
<result column="crm_create_time" jdbcType="TIMESTAMP" property="crmCreateTime" />
</resultMap>
<sql id="Base_Column_List">
id, partner_id, mobile, username, live_area, want_shop_area, accept_adjust_type,
@@ -111,6 +112,12 @@
WHERE (b.update_time BETWEEN #{selectTime} and #{now} or
a.update_time BETWEEN #{selectTime} and #{now} ) and b.partner_id is not null
</select>
<select id="selectLastCrmCreateTime" resultType="java.lang.String">
SELECT crm_create_time as crmCreateTime FROM hy_partner_user_info ORDER BY crm_create_time desc limit 1
</select>
<select id="selectByCheckMobile" resultType="com.cool.store.dto.partner.MobileCheckDTO">
select a.partner_id as partnerId,a.mobile,line_status as lineStatus ,c.`name`as investmentManager,c.mobile as investmentManagerMobile FROM hy_partner_user_info a left join hy_partner_line_info b on a.partner_id=b.partner_id and b.deleted=0 left join enterprise_user c on b.investment_manager=c.user_id and c.deleted=0 WHERE a.mobile=#{mobile}
</select>
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
insert into hy_partner_user_info
@@ -169,6 +176,9 @@
<if test="record.ecWantShopArea!=null">
ec_want_shop_area,
</if>
<if test="record.crmCreateTime!=null">
crm_create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="record.partnerId != null">
@@ -225,6 +235,9 @@
<if test="record.ecWantShopArea != null">
#{record.ecWantShopArea},
</if>
<if test="record.crmCreateTime != null">
#{record.crmCreateTime},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective">