瀏覽代碼

优化查询条件

hubin 1 年之前
父節點
當前提交
577f229e5a
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      src/main/resources/mapper/FlowlongMapper.xml
  2. 1 1
      src/main/resources/mapper/SysUserMapper.xml

+ 1 - 1
src/main/resources/mapper/FlowlongMapper.xml

@@ -21,7 +21,7 @@
             AND p.process_name LIKE CONCAT(CONCAT('%',#{dto.processName}),'%')
         </if>
         <if test="dto.createBy != null and dto.createBy != '' ">
-            AND t.create_by LIKE CONCAT(CONCAT('%',#{dto.createBy}),'%')
+            AND p.create_by LIKE CONCAT(CONCAT('%',#{dto.createBy}),'%')
         </if>
         <if test="dto.instanceState != null">
             AND i.instance_state = #{dto.instanceState}

+ 1 - 1
src/main/resources/mapper/SysUserMapper.xml

@@ -16,7 +16,7 @@
         WHERE u.deleted = 0
         <if test="vo != null">
             <if test="vo.username != null">
-                AND u.username LIKE CONCAT(CONCAT('%',#{vo.username}),'%')
+                AND (u.username LIKE CONCAT(CONCAT('%',#{vo.username}),'%') OR u.real_name LIKE CONCAT(CONCAT('%',#{vo.username}),'%'))
             </if>
             <if test="vo.jobNum != null">
                 AND u.job_num LIKE CONCAT(CONCAT('%',#{vo.jobNum}),'%')