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>