TASK: 1.affiliate 新增referral新增、查询、修改以及其他相关的自动结算佣金的功能;2.删除affiliate_income表及相关mapper

This commit is contained in:
2025-08-19 17:44:34 +08:00
parent 552ec828ab
commit caa9985d11
23 changed files with 499 additions and 105 deletions

View File

@@ -38,12 +38,24 @@
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>
<choose>
<when test="sortField != null and sortField != ''">
ORDER BY
<choose>
<when test="sortField == 'id'">f.id</when>
<when test="sortField == 'totalEarnings'">f.total_earnings</when>
<when test="sortField == 'createTime'">f.create_time</when>
<otherwise>f.create_time</otherwise>
</choose>
<choose>
<when test="order != null and order.toUpperCase() == 'DESC'">DESC</when>
<otherwise>ASC</otherwise>
</choose>
</when>
<otherwise>
ORDER BY f.create_time ASC
</otherwise>
</choose>
LIMIT ${size} OFFSET ${offset}
</select>