From 085d0e9e62e524b7cf0e7b7d8ad3b51a5a7c1e81 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期三, 24 七月 2024 11:01:09 +0800
Subject: [PATCH] Merge branch '2.0' of http://120.76.84.145:10101/gitblit/r/java/IgoTravel into 2.0

---
 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/AdvertisementMapper.xml |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/AdvertisementMapper.xml b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/AdvertisementMapper.xml
index 1a661ff..d1b87e9 100644
--- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/AdvertisementMapper.xml
+++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/AdvertisementMapper.xml
@@ -8,6 +8,7 @@
         <result column="name" property="name"/>
         <result column="imgUrl" property="imgUrl"/>
         <result column="type" property="type"/>
+        <result column="cityId" property="cityId"/>
         <result column="isJump" property="isJump"/>
         <result column="jumpType" property="jumpType"/>
         <result column="jumpUrl" property="jumpUrl"/>
@@ -35,9 +36,24 @@
         content as content,
         state as state,
         provinceId as provinceId
-        from t_advertisement where flag != 3 and state = 1 and provinceId in (select id from t_region where code = #{code})
+        from t_advertisement where flag != 3 and state = 1
         <if test="null != type">
           and `type` = #{type}
         </if>
+        <if test="null != city">
+            and cityId in (select id from t_city where chineseName in
+            <foreach collection="city" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+            or englishName in
+            <foreach collection="city" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+            or frenchName in
+            <foreach collection="city" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+            )
+        </if>
     </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.7.1