TASK: 1.affiliate 新增referral新增、查询、修改以及其他相关的自动结算佣金的功能;2.删除affiliate_income表及相关mapper
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user