getAffiliateList 添加返回用户名
This commit is contained in:
@@ -13,4 +13,63 @@
|
||||
AND status = 'Active'
|
||||
</select>
|
||||
|
||||
<select id="getAffiliateList" resultType="com.ai.da.model.vo.AffiliateVO">
|
||||
SELECT
|
||||
f.*,
|
||||
c.user_name
|
||||
FROM
|
||||
t_affiliate f
|
||||
LEFT JOIN
|
||||
t_account c
|
||||
ON
|
||||
f.account_id = c.id
|
||||
<where>
|
||||
1 = 1
|
||||
<if test="status != null and status != ''">
|
||||
AND f.status = #{status}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND f.create_time > #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND f.create_time < #{endTime}
|
||||
</if>
|
||||
<if test="affiliateId != null">
|
||||
AND f.id = #{affiliateId}
|
||||
</if>
|
||||
</where>
|
||||
<if test="order != null and order.toUpperCase() == 'DESC'">
|
||||
ORDER BY f.create_time DESC
|
||||
</if>
|
||||
<if test="order == null or order.toUpperCase() != 'DESC'">
|
||||
ORDER BY f.create_time ASC
|
||||
</if>
|
||||
LIMIT ${size} OFFSET ${offset}
|
||||
</select>
|
||||
|
||||
<select id="queryAffiliateTotalCount" resultType="int">
|
||||
SELECT
|
||||
count(f.id)
|
||||
FROM
|
||||
t_affiliate f
|
||||
LEFT JOIN
|
||||
t_account c
|
||||
ON
|
||||
f.account_id = c.id
|
||||
<where>
|
||||
1 = 1
|
||||
<if test="status != null and status != ''">
|
||||
AND f.status = #{status}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND f.create_time > #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND f.create_time < #{endTime}
|
||||
</if>
|
||||
<if test="affiliateId != null">
|
||||
AND f.id = #{affiliateId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user