魏超 5 年之前
父節點
當前提交
5fb26a678d
共有 1 個檔案被更改,包括 7 行新增1 行删除
  1. 7
    1
      src/main/java/com/huiju/estateagents/service/impl/ExtendContentServiceImpl.java

+ 7
- 1
src/main/java/com/huiju/estateagents/service/impl/ExtendContentServiceImpl.java 查看文件

@@ -175,7 +175,13 @@ public class ExtendContentServiceImpl extends ServiceImpl<ExtendContentMapper, E
175 175
         //一个城市只能有一个开屏广告
176 176
         if (extendContent.getStatus() == 1 && CommConstant.OPEN_SCREEN.equals(extendContent.getShowType())){
177 177
             QueryWrapper<ExtendContent> taExtendContentQueryWrapper = new QueryWrapper<>();
178
-            taExtendContentQueryWrapper.eq("city_id", extendContent.getCityId());
178
+            if (extendContent.getCityId() == null){
179
+                TaBuilding taBuilding = taBuildingMapper.selectBuilding(extendContent.getBuildingId());
180
+                taExtendContentQueryWrapper.eq("city_id", taBuilding.getCityId());
181
+            }else{
182
+                taExtendContentQueryWrapper.eq("city_id", extendContent.getCityId());
183
+            }
184
+
179 185
             taExtendContentQueryWrapper.eq("org_id", orgId);
180 186
             taExtendContentQueryWrapper.eq("status", 1);
181 187
             taExtendContentQueryWrapper.eq("show_type", extendContent.getShowType());