浏览代码

bug fixes

plf 4 年之前
父节点
当前提交
79ebf5761b
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/main/resources/mapper/SellerMapper.xml

+ 3 - 1
src/main/resources/mapper/SellerMapper.xml

@@ -52,7 +52,9 @@
           club_temporary
         WHERE
           userId = #{userId}
-          AND (name LIKE CONCAT('%',#{searchName},'%') OR linkMan LIKE CONCAT('%',#{searchName},'%'))
+          <if test="searchName != null and searchName != ''">
+              AND (name LIKE CONCAT('%',#{searchName},'%') OR linkMan LIKE CONCAT('%',#{searchName},'%'))
+          </if>
         ORDER BY
           id DESC
     </select>