收藏+订阅-搜索%修改
This commit is contained in:
+22
-4
@@ -24,12 +24,30 @@
|
|||||||
onl_cgform_collection occ
|
onl_cgform_collection occ
|
||||||
left join buss_document_library bdl on occ.document_id = bdl.id
|
left join buss_document_library bdl on occ.document_id = bdl.id
|
||||||
where occ.create_by = #{params.createBy}
|
where occ.create_by = #{params.createBy}
|
||||||
<if test="params.serialNumber != null and params.serialNumber != '' ">
|
<if test="params.serialNumber != null and params.serialNumber != ''">
|
||||||
and bdl.serial_number like concat(concat('%',#{params.serialNumber}),'%')
|
<!--搜索条件:编号;包含%,单独搜索-->
|
||||||
|
<choose>
|
||||||
|
<when test='params.serialNumber != null and params.serialNumber != "" and params.serialNumber.contains("%")'>
|
||||||
|
and bdl.serial_number like '%1%%' escape '1'
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
and bdl.serial_number like concat(concat('%',#{params.serialNumber}),'%')
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
</if>
|
</if>
|
||||||
<if test="params.title != null and params.title != '' ">
|
|
||||||
and bdl.title like concat(concat('%',#{params.title}),'%')
|
<if test="params.title != null and params.title != ''">
|
||||||
|
<!--搜索条件:标题;包含%,单独搜索-->
|
||||||
|
<choose>
|
||||||
|
<when test='params.title != null and params.title != "" and params.title.contains("%")'>
|
||||||
|
and bdl.title like '%1%%' escape '1'
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
and bdl.title like concat(concat('%',#{params.title}),'%')
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="params.state != null and params.state != '' ">
|
<if test="params.state != null and params.state != '' ">
|
||||||
and bdl.state in
|
and bdl.state in
|
||||||
<foreach collection="params.state.split(',')" index="index" item="item" open="(" separator="," close=")">
|
<foreach collection="params.state.split(',')" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
|||||||
+22
-4
@@ -25,12 +25,30 @@
|
|||||||
left join
|
left join
|
||||||
buss_document_library bdl on ocs.document_id = bdl.id
|
buss_document_library bdl on ocs.document_id = bdl.id
|
||||||
where ocs.create_by = #{params.createBy}
|
where ocs.create_by = #{params.createBy}
|
||||||
<if test="params.serialNumber != null and params.serialNumber != '' ">
|
<if test="params.serialNumber != null and params.serialNumber != ''">
|
||||||
and bdl.serial_number like concat(concat('%',#{params.serialNumber}),'%')
|
<!--搜索条件:编号;包含%,单独搜索-->
|
||||||
|
<choose>
|
||||||
|
<when test='params.serialNumber != null and params.serialNumber != "" and params.serialNumber.contains("%")'>
|
||||||
|
and bdl.serial_number like '%1%%' escape '1'
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
and bdl.serial_number like concat(concat('%',#{params.serialNumber}),'%')
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
</if>
|
</if>
|
||||||
<if test="params.title != null and params.title != '' ">
|
|
||||||
and bdl.title like concat(concat('%',#{params.title}),'%')
|
<if test="params.title != null and params.title != ''">
|
||||||
|
<!--搜索条件:标题;包含%,单独搜索-->
|
||||||
|
<choose>
|
||||||
|
<when test='params.title != null and params.title != "" and params.title.contains("%")'>
|
||||||
|
and bdl.title like '%1%%' escape '1'
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
and bdl.title like concat(concat('%',#{params.title}),'%')
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="params.state != null and params.state != '' ">
|
<if test="params.state != null and params.state != '' ">
|
||||||
and bdl.state in
|
and bdl.state in
|
||||||
<foreach collection="params.state.split(',')" index="index" item="item" open="(" separator="," close=")">
|
<foreach collection="params.state.split(',')" index="index" item="item" open="(" separator="," close=")">
|
||||||
|
|||||||
Reference in New Issue
Block a user