提成明细加上服务时间范围查询、优化订单营养师助理售后绑定关系逻辑
This commit is contained in:
@ -260,6 +260,16 @@
|
||||
<if test="userId != null and userId != ''">and su.user_id = #{userId}</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询售后和营养师数量 -->
|
||||
<select id="getAfterSaleAndNutriCount" parameterType="SysCommision" resultType="int">
|
||||
SELECT count(su.user_id) FROM sys_user su
|
||||
LEFT JOIN sys_user_post sup ON sup.user_id = su.user_id
|
||||
LEFT JOIN sys_post sp ON sp.post_id = sup.post_id
|
||||
WHERE su.del_flag = 0 AND su.status = 0 AND sp.remark = 'sale_post' AND (sp.post_code = 'after_sale' OR sp.post_code = 'nutri')
|
||||
<if test="postId != null and postId != ''">and sp.post_id = #{postId}</if>
|
||||
<if test="userId != null and userId != ''">and su.user_id = #{userId}</if>
|
||||
</select>
|
||||
|
||||
<select id="getAfterSaleId" parameterType="SysCommision" resultType="Long">
|
||||
SELECT su.user_id FROM sys_user su
|
||||
LEFT JOIN sys_user_post sup ON sup.user_id = su.user_id
|
||||
|
Reference in New Issue
Block a user