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