提成明细需要加上替换的订单
This commit is contained in:
@ -437,8 +437,14 @@
|
||||
<if test="reviewStatus != null and reviewStatus != ''">
|
||||
and review_status = #{reviewStatus}
|
||||
</if>
|
||||
<if test="userId != null"><!-- 限于营养师、售后不可能同一个的情况下 -->
|
||||
and (su_sale.user_id = #{userId} or su_nutritionist.user_id = #{userId})
|
||||
<if test="userId != null">
|
||||
and (
|
||||
su_sale.user_id = #{userId} or su_nutritionist.user_id = #{userId}
|
||||
<!-- 是否查询根据用户ID查询对应替换订单 -->
|
||||
<if test="replaceOrderFlag != null">
|
||||
or o.order_id in (select r.order_id from sys_order_nutritionist_replace_record r where r.del_flag = 0 and (r.after_sale_id = #{userId} or r.nutritionist_id = #{userId}) )
|
||||
</if>
|
||||
)
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND DATE_FORMAT(o.order_time,'%Y-%m-%d') <= #{endTime}
|
||||
|
@ -114,4 +114,11 @@
|
||||
order by id asc
|
||||
</select>
|
||||
|
||||
<select id="getSysOrderReplaceRecordByUserId" parameterType="Long"
|
||||
resultMap="SysOrderNutritionistReplaceRecordResult">
|
||||
select id, order_id, nutritionist_id, after_sale_id, nutri_assis_id, start_time, create_time, create_by from
|
||||
sys_order_nutritionist_replace_record
|
||||
where del_flag = 0 and after_sale_id = #{userId} or nutritionist_id = #{userId} order by id asc
|
||||
</select>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user