getAffiliateList 添加返回用户名

This commit is contained in:
2024-12-23 14:31:48 +08:00
parent b15cc542e1
commit 7283ace072
6 changed files with 110 additions and 8 deletions

View File

@@ -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 &gt; #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND f.create_time &lt; #{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 &gt; #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND f.create_time &lt; #{endTime}
</if>
<if test="affiliateId != null">
AND f.id = #{affiliateId}
</if>
</where>
</select>
</mapper>