日期和sql优化
This commit is contained in:
@@ -6,13 +6,15 @@
|
||||
FROM jsh_in_out_item
|
||||
where 1=1
|
||||
<if test="name != null">
|
||||
and name like '%${name}%'
|
||||
<bind name="bindName" value="'%'+name+'%'"/>
|
||||
and name like #{bindName}
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type='${type}'
|
||||
and type=#{type}
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
and remark like '%${remark}%'
|
||||
<bind name="bindRemark" value="'%'+remark+'%'"/>
|
||||
and remark like #{bindRemark}
|
||||
</if>
|
||||
and ifnull(delete_flag,'0') !='1'
|
||||
<if test="offset != null and rows != null">
|
||||
@@ -25,13 +27,15 @@
|
||||
FROM jsh_in_out_item
|
||||
WHERE 1=1
|
||||
<if test="name != null">
|
||||
and name like '%${name}%'
|
||||
<bind name="bindName" value="'%'+name+'%'"/>
|
||||
and name like #{bindName}
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and type='${type}'
|
||||
and type=#{type}
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
and remark like '%${remark}%'
|
||||
<bind name="bindRemark" value="'%'+remark+'%'"/>
|
||||
and remark like #{bindRemark}
|
||||
</if>
|
||||
and ifnull(delete_flag,'0') !='1'
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user