添加ec同步数据到小程序
This commit is contained in:
@@ -306,4 +306,7 @@
|
||||
where
|
||||
deleted = 0 and <foreach collection="regionIds" separator="or" open="(" close=")" item="regionId"> user_region_ids like concat("%", #{regionId}, "%") </foreach>
|
||||
</select>
|
||||
<select id="selectByMobile" resultType="java.lang.String">
|
||||
SELECT user_id FROM enterprise_user WHERE mobile =#{mobile} LIMIT 1
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -20,12 +20,13 @@
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="close_time" jdbcType="TIMESTAMP" property="closeTime" />
|
||||
<result column="close_user_id" jdbcType="VARCHAR" property="closeUserId" />
|
||||
<result column="user_channel_id" jdbcType="BIGINT" property="userChannelId" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, partner_id, workflow_stage, workflow_status, line_status, investment_manager,
|
||||
development_director, development_manager, deadline, pass_reason, reject_public_reason,
|
||||
reject_real_reason, certify_file, deleted, create_time, update_time, close_time,
|
||||
close_user_id
|
||||
close_user_id,user_channel_id
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKeySelective" resultMap="BaseResultMap">
|
||||
@@ -124,6 +125,9 @@
|
||||
<if test="record.closeUserId != null">
|
||||
close_user_id,
|
||||
</if>
|
||||
<if test="record.userChannelId != null">
|
||||
user_channel_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="record.partnerId != null">
|
||||
@@ -177,6 +181,9 @@
|
||||
<if test="record.closeUserId != null">
|
||||
#{record.closeUserId},
|
||||
</if>
|
||||
<if test="record.userChannelId != null">
|
||||
#{record.userChannelId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
@@ -239,6 +246,9 @@
|
||||
<if test="record.removeBlackReason != null">
|
||||
remove_black_reason = #{record.removeBlackReason},
|
||||
</if>
|
||||
<if test="record.userChannelId != null">
|
||||
user_channel_id = #{record.userChannelId},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{record.id}
|
||||
</update>
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
<?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.HyPartnerUserChannelMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerUserChannelDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="channel_id" jdbcType="BIGINT" property="channelId" />
|
||||
<result column="channel_name" jdbcType="VARCHAR" property="channelName" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, channel_id, channel_name, create_time, update_time
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from hy_partner_user_channel
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<select id="selectByChannelId" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from hy_partner_user_channel
|
||||
where channel_id = #{channelId} limit 1
|
||||
</select>
|
||||
<select id="selectByChannelName" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from hy_partner_user_channel
|
||||
where channel_name = #{channelName} limit 1
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from hy_partner_user_channel
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.cool.store.entity.HyPartnerUserChannelDO" useGeneratedKeys="true">
|
||||
insert into hy_partner_user_channel (channel_id, channel_name, create_time,
|
||||
update_time)
|
||||
values (#{channelId,jdbcType=BIGINT}, #{channelName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
||||
#{updateTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.cool.store.entity.HyPartnerUserChannelDO" useGeneratedKeys="true">
|
||||
insert into hy_partner_user_channel
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="channelId != null">
|
||||
channel_id,
|
||||
</if>
|
||||
<if test="channelName != null">
|
||||
channel_name,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="channelId != null">
|
||||
#{channelId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="channelName != null">
|
||||
#{channelName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyPartnerUserChannelDO">
|
||||
update hy_partner_user_channel
|
||||
<set>
|
||||
<if test="channelId != null">
|
||||
channel_id = #{channelId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="channelName != null">
|
||||
channel_name = #{channelName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.cool.store.entity.HyPartnerUserChannelDO">
|
||||
update hy_partner_user_channel
|
||||
set channel_id = #{channelId,jdbcType=BIGINT},
|
||||
channel_name = #{channelName,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -49,6 +49,18 @@
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByHourDate" resultType="com.cool.store.entity.SyncEcCustomerDO" >
|
||||
SELECT a.id as id, a.username as customername,a.mobile as customermobile,c.`name` as followname,c.mobile as followmobile FROM hy_partner_user_info a LEFT join hy_partner_line_info b on
|
||||
a.partner_id=b.partner_id left join enterprise_user c on b.investment_manager=c.user_id
|
||||
WHERE a.create_time BETWEEN #{selectTime} and #{now} or
|
||||
a.update_time BETWEEN #{selectTime} and #{now} order by a.id Limit #{limit1},#{limit2}
|
||||
</select>
|
||||
<select id="selectByHourDateCount" resultType="java.lang.Integer">
|
||||
SELECT count(*) FROM hy_partner_user_info a LEFT join hy_partner_line_info b on
|
||||
a.partner_id=b.partner_id left join enterprise_user c on b.investment_manager=c.user_id
|
||||
WHERE a.create_time BETWEEN #{selectTime} and #{now} or
|
||||
a.update_time BETWEEN #{selectTime} and #{now}
|
||||
</select>
|
||||
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
||||
insert into hy_partner_user_info
|
||||
|
||||
Reference in New Issue
Block a user