|
@@ -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());
|