添加ec标签同步代码;优化excel中手机号重名情况;
This commit is contained in:
@@ -55,18 +55,23 @@
|
||||
</select>
|
||||
<select id="selectByHourDate" resultType="com.cool.store.entity.SyncEcCustomerDO" >
|
||||
SELECT
|
||||
a.id AS id,b.partner_id,
|
||||
a.username AS customername,
|
||||
a.mobile AS customermobile,
|
||||
a.id AS id,
|
||||
b.partner_id,
|
||||
b.username AS customername,
|
||||
b.mobile AS customermobile,
|
||||
d.`name` AS followname,
|
||||
d.mobile AS followmobile,b.line_status as lineStatus,
|
||||
c.channel_id AS channelId ,ifnull(tl_l.followCount,0) as followCount
|
||||
d.mobile AS followmobile,
|
||||
a.line_status AS lineStatus,
|
||||
c.channel_id AS channelId,
|
||||
ifnull( tl_l.followCount, 0 ) AS followCount
|
||||
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 hy_partner_user_channel c ON a.user_channel_id = c.channel_id
|
||||
LEFT JOIN enterprise_user d ON b.investment_manager = d.user_id and d.deleted=0
|
||||
LEFT JOIN (
|
||||
hy_partner_line_info a
|
||||
LEFT JOIN hy_partner_user_info b ON a.partner_id = b.partner_id
|
||||
AND a.deleted = 0
|
||||
LEFT JOIN hy_partner_user_channel c ON b.user_channel_id = c.channel_id
|
||||
LEFT JOIN enterprise_user d ON a.investment_manager = d.user_id
|
||||
AND d.deleted = 0
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
partner_id,
|
||||
IFNULL( COUNT( 1 ), 0 ) AS followCount
|
||||
@@ -76,31 +81,35 @@
|
||||
( deleted = 1 OR ( deleted = 0 AND line_status IN ( 0, 3 ) AND close_time IS NOT NULL ) )
|
||||
AND investment_manager IS NOT NULL
|
||||
GROUP BY
|
||||
partner_id ) tl_l on b.partner_id=tl_l.partner_id
|
||||
partner_id
|
||||
) tl_l ON b.partner_id = tl_l.partner_id
|
||||
WHERE ( b.update_time BETWEEN #{selectTime} and #{now} or
|
||||
a.update_time BETWEEN #{selectTime} and #{now} ) and a.username is not null order by a.id Limit #{limit1},#{limit2}
|
||||
a.update_time BETWEEN #{selectTime} and #{now} ) and b.partner_id is not null 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 and b.deleted=0
|
||||
LEFT JOIN hy_partner_user_channel c ON a.user_channel_id = c.channel_id
|
||||
LEFT JOIN enterprise_user d ON b.investment_manager = d.user_id and d.deleted=0
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
partner_id,
|
||||
IFNULL( COUNT( 1 ), 0 ) AS followCount
|
||||
FROM
|
||||
hy_partner_line_info
|
||||
WHERE
|
||||
( deleted = 1 OR ( deleted = 0 AND line_status IN ( 0, 3 ) AND close_time IS NOT NULL ) )
|
||||
AND investment_manager IS NOT NULL
|
||||
GROUP BY
|
||||
partner_id ) tl_l on b.partner_id=tl_l.partner_id
|
||||
hy_partner_line_info a
|
||||
LEFT JOIN hy_partner_user_info b ON a.partner_id = b.partner_id
|
||||
AND a.deleted = 0
|
||||
LEFT JOIN hy_partner_user_channel c ON b.user_channel_id = c.channel_id
|
||||
LEFT JOIN enterprise_user d ON a.investment_manager = d.user_id
|
||||
AND d.deleted = 0
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
partner_id,
|
||||
IFNULL( COUNT( 1 ), 0 ) AS followCount
|
||||
FROM
|
||||
hy_partner_line_info
|
||||
WHERE
|
||||
( deleted = 1 OR ( deleted = 0 AND line_status IN ( 0, 3 ) AND close_time IS NOT NULL ) )
|
||||
AND investment_manager IS NOT NULL
|
||||
GROUP BY
|
||||
partner_id
|
||||
) tl_l ON b.partner_id = tl_l.partner_id
|
||||
WHERE (b.update_time BETWEEN #{selectTime} and #{now} or
|
||||
a.update_time BETWEEN #{selectTime} and #{now} ) and a.username is not null
|
||||
a.update_time BETWEEN #{selectTime} and #{now} ) and b.partner_id is not null
|
||||
</select>
|
||||
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
||||
|
||||
Reference in New Issue
Block a user