Pārlūkot izejas kodu

fix: 首页搜索框增加猜你想要功能

周玉环 2 dienas atpakaļ
vecāks
revīzija
7cb2d0230f

+ 8 - 2
xinkeaboard-server/b2b2c-web/src/main/resources/mapper/read/seller/StoreReadMapper.xml

@@ -358,7 +358,10 @@
       <if test="example.storeNameLike != null">
         and store_name.store_name like concat('%',#{example.storeNameLike},'%')
       </if>
-      <if test="example.businessState != null">
+      <if test="example.businessState != null and example.businessState==2">
+        and (store_site_info.business_state = #{example.businessState} or store_site_info.business_state is null)
+      </if>
+      <if test="example.businessState != null and example.businessState!=2">
         and store_site_info.business_state = #{example.businessState}
       </if>
       <if test="example.storeGradeId != null">
@@ -404,7 +407,10 @@
       <if test="example.storeNameLike != null">
         and store_name.store_name like concat('%',#{example.storeNameLike},'%')
       </if>
-      <if test="example.businessState != null">
+      <if test="example.businessState != null and example.businessState==2">
+        and (store_site_info.business_state = #{example.businessState} or store_site_info.business_state is null)
+      </if>
+      <if test="example.businessState != null and example.businessState!=2">
         and store_site_info.business_state = #{example.businessState}
       </if>
       <if test="example.storeGradeId != null">