|
@@ -9,37 +9,36 @@
|
|
IFNULL(t1.project_name, '')as 'projectName',
|
|
IFNULL(t1.project_name, '')as 'projectName',
|
|
IFNULL(t1.account_id, '')as 'accountId',
|
|
IFNULL(t1.account_id, '')as 'accountId',
|
|
IFNULL(t1.project_id, '')as 'projectId',
|
|
IFNULL(t1.project_id, '')as 'projectId',
|
|
- IFNULL(t2.realname, '')as 'realname',
|
|
|
|
MAX(t1.state_date) as 'stateDate',
|
|
MAX(t1.state_date) as 'stateDate',
|
|
IFNULL(t1.create_type, '') as 'createType',
|
|
IFNULL(t1.create_type, '') as 'createType',
|
|
IFNULL(t1.state,0) as 'state',
|
|
IFNULL(t1.state,0) as 'state',
|
|
usage_level as 'usageLevel',
|
|
usage_level as 'usageLevel',
|
|
- (select auth_name from ctop_user_allocation where account_id = t1.account_id) as 'authName',
|
|
|
|
|
|
+ t2.auth_name as 'authName',
|
|
t1.create_time
|
|
t1.create_time
|
|
FROM ctop_kuaishou_channel t1
|
|
FROM ctop_kuaishou_channel t1
|
|
- LEFT JOIN sys_user t2 ON t1.user_id = t2.id
|
|
|
|
|
|
+ LEFT JOIN ctop_user_allocation t2 ON t1.account_id = t2.account_id
|
|
<where>
|
|
<where>
|
|
<if test="rids != null">
|
|
<if test="rids != null">
|
|
- and t1.user_id IN
|
|
|
|
|
|
+ AND t2.user_id IN
|
|
<foreach collection="rids" item="id" separator=","
|
|
<foreach collection="rids" item="id" separator=","
|
|
open="(" close=")">
|
|
open="(" close=")">
|
|
#{id}
|
|
#{id}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
<if test="projectId != null">
|
|
<if test="projectId != null">
|
|
- and project_id = #{projectId}
|
|
|
|
|
|
+ and t1.project_id = #{projectId}
|
|
</if>
|
|
</if>
|
|
<if test="productId != null">
|
|
<if test="productId != null">
|
|
- and product_id = #{productId}
|
|
|
|
|
|
+ and t1.product_id = #{productId}
|
|
</if>
|
|
</if>
|
|
<if test="accountId != null">
|
|
<if test="accountId != null">
|
|
- and account_id= #{accountId}
|
|
|
|
|
|
+ and t1.account_id= #{accountId}
|
|
</if>
|
|
</if>
|
|
<if test="state != null">
|
|
<if test="state != null">
|
|
- and state= #{state}
|
|
|
|
|
|
+ and t1.state= #{state}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
- GROUP BY account_id
|
|
|
|
|
|
+ GROUP BY t1.account_id
|
|
ORDER BY create_time DESC
|
|
ORDER BY create_time DESC
|
|
</select>
|
|
</select>
|
|
|
|
|