修改逻辑

上级 e2ba4da9
流水线 #8018 已通过 于阶段
in 2 分 59 秒
...@@ -77,24 +77,32 @@ ...@@ -77,24 +77,32 @@
LEFT JOIN service_flow sf ON ri.service_flow_id = sf.id LEFT JOIN service_flow sf ON ri.service_flow_id = sf.id
WHERE WHERE
ri.publish =1 ri.publish =1
<bind name="isPilotUserIdListEmpty" value="pilotUserIdList != null and !pilotUserIdList.isEmpty()"/> <choose>
<if test="isPilotUserIdListEmpty"> <when test="pilotUserIdList != null and !pilotUserIdList.isEmpty()">
and <!-- 当 pilotUserIdList 不为空时 说明不是后台用户不是admin 是其他后台用户啊查看飞手接单或者货单就只能看到自己团队飞手的接单发单-->
<choose> and (
<when test="isPilotOrder == 0"> <choose>
ri.father_require_id = 0 <when test="isPilotOrder == 0">
and -- 当时发单的时候要是看到的是总订单
ri.user_account_id IN ri.father_require_id = 0
</when> and ri.user_account_id IN
<when test="isPilotOrder == 1"> </when>
rs.pilot_certification_user_id IN <when test="isPilotOrder == 1">
</when> -- 接单接的是子订单就只能看到子订单
</choose> rs.pilot_certification_user_id IN
<foreach item="item" collection="pilotUserIdList" open="(" separator="," close=")"> </when>
#{item} </choose>
</foreach> <foreach item="item" collection="pilotUserIdList" open="(" separator="," close=")">
</if> #{item}
<if test="orderStatus != null and orderStatus!='' "> </foreach>
)
</when>
<otherwise>
<!-- 剩下就是admin用户就是要查出所用接单发单就行 只要主订单-->
and ri.father_require_id = 0
</otherwise>
</choose>
<if test="orderStatus != null and orderStatus!='' ">
and sf.order_status = #{orderStatus} and sf.order_status = #{orderStatus}
</if> </if>
<if test=" publishPhone != null and publishPhone!='' "> <if test=" publishPhone != null and publishPhone!='' ">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论