模糊查询优化
This commit is contained in:
parent
965bc59789
commit
9b9d64a8d6
|
|
@ -43,7 +43,7 @@ public class TbProDepartController extends BaseController {
|
||||||
* @return 查询结果
|
* @return 查询结果
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "分页查询项目部信息")
|
@ApiOperation(value = "分页查询项目部信息")
|
||||||
//@RequiresPermissions("base:depart:list")
|
@RequiresPermissions("base:depart:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@SysLog(title = "项目部管理", businessType = OperaType.QUERY, module = "基础管理->项目部管理")
|
@SysLog(title = "项目部管理", businessType = OperaType.QUERY, module = "基础管理->项目部管理")
|
||||||
public AjaxResult list(TbProDepart tbProDepart) {
|
public AjaxResult list(TbProDepart tbProDepart) {
|
||||||
|
|
|
||||||
|
|
@ -39,12 +39,15 @@
|
||||||
where del_flag = 0
|
where del_flag = 0
|
||||||
<if test="departName != null and departName != ''">
|
<if test="departName != null and departName != ''">
|
||||||
and tbr.depart_name like concat('%',#{departName},'%')
|
and tbr.depart_name like concat('%',#{departName},'%')
|
||||||
|
and tbr.depart_name NOT LIKE '%_%' ESCAPE '/'
|
||||||
</if>
|
</if>
|
||||||
<if test="proName != null and proName != ''">
|
<if test="proName != null and proName != ''">
|
||||||
and tbr.pro_name like concat('%',#{proName},'%')
|
and tbr.pro_name like concat('%',#{proName},'%')
|
||||||
|
and tbr.pro_name NOT LIKE '%_%' ESCAPE '/'
|
||||||
</if>
|
</if>
|
||||||
<if test="relUser != null and relUser != ''">
|
<if test="relUser != null and relUser != ''">
|
||||||
and tbr.rel_user like concat('%',#{relUser},'%')
|
and tbr.rel_user like concat('%',#{relUser},'%')
|
||||||
|
and tbr.rel_user NOT LIKE '%_%' ESCAPE '/'
|
||||||
</if>
|
</if>
|
||||||
<if test="applyTime != null and applyTime != ''">
|
<if test="applyTime != null and applyTime != ''">
|
||||||
and DATE_FORMAT(tbr.create_time, '%Y-%m-%d') = #{applyTime}
|
and DATE_FORMAT(tbr.create_time, '%Y-%m-%d') = #{applyTime}
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@
|
||||||
tddr.is_warn = '1'
|
tddr.is_warn = '1'
|
||||||
<if test="devName != null and devName != ''">
|
<if test="devName != null and devName != ''">
|
||||||
and tddr.dev_name like concat('%',#{devName},'%')
|
and tddr.dev_name like concat('%',#{devName},'%')
|
||||||
|
and tddr.dev_name NOT LIKE '%_%' ESCAPE '/'
|
||||||
</if>
|
</if>
|
||||||
<if test="devType != null and devType != ''">
|
<if test="devType != null and devType != ''">
|
||||||
and tddr.dev_type = #{devType}
|
and tddr.dev_type = #{devType}
|
||||||
|
|
|
||||||
|
|
@ -287,9 +287,11 @@
|
||||||
</if>
|
</if>
|
||||||
<if test="devName != null and devName != ''">
|
<if test="devName != null and devName != ''">
|
||||||
and td.dev_name like concat('%',#{devName},'%')
|
and td.dev_name like concat('%',#{devName},'%')
|
||||||
|
and td.dev_name NOT LIKE '%_%' ESCAPE '/'
|
||||||
</if>
|
</if>
|
||||||
<if test="devCode != null and devCode != ''">
|
<if test="devCode != null and devCode != ''">
|
||||||
and td.dev_code like concat('%',#{devCode},'%')
|
and td.dev_code like concat('%',#{devCode},'%')
|
||||||
|
and td.dev_code NOT LIKE '%_%' ESCAPE '/'
|
||||||
</if>
|
</if>
|
||||||
<if test="devStatus != null">
|
<if test="devStatus != null">
|
||||||
and td.dev_status = #{devStatus}
|
and td.dev_status = #{devStatus}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
</if>
|
</if>
|
||||||
<if test="relName != null and relName != ''">
|
<if test="relName != null and relName != ''">
|
||||||
and tp.rel_name like concat('%',#{relName},'%')
|
and tp.rel_name like concat('%',#{relName},'%')
|
||||||
|
and tp.rel_name NOT LIKE '%_%' ESCAPE '/'
|
||||||
</if>
|
</if>
|
||||||
<if test="sex != null">
|
<if test="sex != null">
|
||||||
and tp.sex = #{sex}
|
and tp.sex = #{sex}
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
</if>
|
</if>
|
||||||
<if test="gtName != null and gtName != ''">
|
<if test="gtName != null and gtName != ''">
|
||||||
and tb.gt_name like concat('%',#{gtName},'%')
|
and tb.gt_name like concat('%',#{gtName},'%')
|
||||||
|
and tb.gt_name NOT LIKE '%_%' ESCAPE '/'
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@
|
||||||
</if>
|
</if>
|
||||||
<if test="departName != null and departName != ''">
|
<if test="departName != null and departName != ''">
|
||||||
and tpd.depart_name like concat('%',#{departName},'%')
|
and tpd.depart_name like concat('%',#{departName},'%')
|
||||||
|
and tpd.depart_name NOT LIKE '%_%' ESCAPE '/'
|
||||||
</if>
|
</if>
|
||||||
<if test="departId != null">
|
<if test="departId != null">
|
||||||
and tb.depart_id = #{departId}
|
and tb.depart_id = #{departId}
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,12 @@
|
||||||
and id = #{id}
|
and id = #{id}
|
||||||
</if>
|
</if>
|
||||||
<if test="teamName != null and teamName != ''">
|
<if test="teamName != null and teamName != ''">
|
||||||
and team_name like concat('%',#{teamName},'%')
|
and tt.team_name like concat('%',#{teamName},'%')
|
||||||
|
and tt.team_name NOT LIKE '%_%' ESCAPE '/'
|
||||||
</if>
|
</if>
|
||||||
<if test="relName != null and relName != ''">
|
<if test="relName != null and relName != ''">
|
||||||
and tt.rel_name like concat('%',#{relName},'%')
|
and tt.rel_name like concat('%',#{relName},'%')
|
||||||
|
and tt.rel_name NOT LIKE '%_%' ESCAPE '/'
|
||||||
</if>
|
</if>
|
||||||
<if test="keyWord != null and keyWord != ''">
|
<if test="keyWord != null and keyWord != ''">
|
||||||
and (
|
and (
|
||||||
|
|
|
||||||
|
|
@ -411,6 +411,7 @@
|
||||||
</if>
|
</if>
|
||||||
<if test="configName != null and configName != ''">
|
<if test="configName != null and configName != ''">
|
||||||
and twc.config_name like concat('%',#{configName},'%')
|
and twc.config_name like concat('%',#{configName},'%')
|
||||||
|
and twc.config_name NOT LIKE '%_%' ESCAPE '/'
|
||||||
</if>
|
</if>
|
||||||
<if test="devId != null">
|
<if test="devId != null">
|
||||||
and td.id = #{devId}
|
and td.id = #{devId}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue