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