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>