fix: 修复一个sql错误
This commit is contained in:
parent
e91d30d86f
commit
8a5c47a1f4
|
|
@ -393,24 +393,26 @@
|
|||
SELECT *,row_id as bomRowId
|
||||
FROM t_bom_new_ebom_parent
|
||||
<!-- WHERE (root_is=1 OR ((user_root_is=1 OR root_is_for_wait_review=1) AND created_by=#{userCode}))-->
|
||||
<if test="query.showMySelfOnly == 1">
|
||||
AND created_by = #{userCode}
|
||||
</if>
|
||||
<if test="userJob==0">
|
||||
WHERE status IN (1,3) AND (user_root_is=1 OR root_is_for_wait_review=1) AND created_by=#{userCode}
|
||||
</if>
|
||||
<if test="userJob==1 and query.dataType==0">
|
||||
WHERE root_is=1 AND status=2
|
||||
</if>
|
||||
<if test="userJob==1 and query.dataType==1">
|
||||
WHERE root_is=1 AND status=4
|
||||
</if>
|
||||
<if test="query.deviseName!=null and query.deviseName!=''">
|
||||
AND devise_name=#{query.deviseName}
|
||||
</if>
|
||||
<if test="query.startDate!=null and query.startDate!=''">
|
||||
AND created_time BETWEEN #{query.startDate} AND DATE_ADD(#{query.endDate}, INTERVAL 1 DAY)
|
||||
</if>
|
||||
<where>
|
||||
<if test="query.showMySelfOnly == 1">
|
||||
AND created_by = #{userCode}
|
||||
</if>
|
||||
<if test="userJob==0">
|
||||
AND status IN (1,3) AND (user_root_is=1 OR root_is_for_wait_review=1) AND created_by=#{userCode}
|
||||
</if>
|
||||
<if test="userJob==1 and query.dataType==0">
|
||||
AND root_is=1 AND status=2
|
||||
</if>
|
||||
<if test="userJob==1 and query.dataType==1">
|
||||
AND root_is=1 AND status=4
|
||||
</if>
|
||||
<if test="query.deviseName!=null and query.deviseName!=''">
|
||||
AND devise_name=#{query.deviseName}
|
||||
</if>
|
||||
<if test="query.startDate!=null and query.startDate!=''">
|
||||
AND created_time BETWEEN #{query.startDate} AND DATE_ADD(#{query.endDate}, INTERVAL 1 DAY)
|
||||
</if>
|
||||
</where>
|
||||
order by row_id desc
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue