ソースを参照

Merge remote-tracking branch 'origin/dev' into dev

顾绍勇 5 年 前
コミット
94289d6d87

+ 3
- 0
src/main/java/com/huiju/estateagents/interceptor/AccessInterceptor.java ファイルの表示

@@ -17,6 +17,7 @@ import com.huiju.estateagents.service.ISysButtonInMenuService;
17 17
 import com.huiju.estateagents.service.ITaRoleButtonService;
18 18
 import com.huiju.estateagents.third.service.ITaThirdPartyMiniappConfigService;
19 19
 import io.jsonwebtoken.*;
20
+import lombok.extern.slf4j.Slf4j;
20 21
 import org.springframework.beans.factory.annotation.Autowired;
21 22
 import org.springframework.stereotype.Component;
22 23
 import org.springframework.web.servlet.HandlerInterceptor;
@@ -27,6 +28,7 @@ import javax.servlet.http.HttpServletResponse;
27 28
 import java.util.List;
28 29
 import java.util.Map;
29 30
 
31
+@Slf4j
30 32
 @Component
31 33
 public class AccessInterceptor implements HandlerInterceptor {
32 34
     
@@ -95,6 +97,7 @@ public class AccessInterceptor implements HandlerInterceptor {
95 97
 
96 98
     @Override
97 99
     public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object obj) throws Exception {
100
+        log.info("接口请求路径是{}",request.getRequestURI());
98 101
         //第三方权限校验
99 102
         String tokenHeader = request.getHeader("x-token");
100 103
         if (!StringUtils.isEmpty(tokenHeader)){

+ 2
- 1
src/main/java/com/huiju/estateagents/service/impl/ExtendContentServiceImpl.java ファイルの表示

@@ -191,7 +191,8 @@ public class ExtendContentServiceImpl extends ServiceImpl<ExtendContentMapper, E
191 191
             if (null != extendContent.getContentId()){
192 192
                 taExtendContentQueryWrapper.ne("content_id", extendContent.getContentId());
193 193
             }
194
-            if (extendContent.getIsHaveActive() != null ){
194
+//            taExtendContentQueryWrapper.eq(StringUtils.isNotBlank(String.valueOf(extendContent.getIsHaveActive())), "is_have_active", extendContent.getIsHaveActive());
195
+            if (null != extendContent.getIsHaveActive() && CommConstant.BANNER_BUILDING.equals(extendContent.getShowPosition())){
195 196
                 taExtendContentQueryWrapper.eq(StringUtils.isNotBlank(extendContent.getBuildingId()), "building_id", extendContent.getBuildingId());
196 197
             }
197 198
             List<ExtendContent> extContentInfo = extendContentMapper.selectList(taExtendContentQueryWrapper);

+ 28
- 4
src/main/resources/mapper/TaChannelMapper.xml ファイルの表示

@@ -175,7 +175,13 @@
175 175
             and t.target_id = #{targetId}
176 176
         </if>
177 177
         <if test="targetType != null and targetType != ''">
178
-            and t.event_type = #{targetType}
178
+            and (case when #{targetType} = 'activity' then t.target_type = 'dynamic'
179
+                        when #{targetType} = 'h5' then t.event_type = 'h5'
180
+                        when #{targetType} = 'news' then t.event_type = 'news'
181
+                        when #{targetType} = 'building' then t.event_type = 'building'
182
+                        when #{targetType} = 'house' then t.event_type = 'house'
183
+            else t.target_type = #{targetType}
184
+            end)
179 185
         </if>
180 186
         <if test="channelId != null and channelId != ''">
181 187
             and t.channel_id = #{channelId}
@@ -234,7 +240,13 @@
234 240
             and t.target_id = #{targetId}
235 241
         </if>
236 242
         <if test="targetType != null and targetType != ''">
237
-            and t.event_type = #{targetType}
243
+            and (case when #{targetType} = 'activity' then t.target_type = 'dynamic'
244
+            when #{targetType} = 'h5' then t.event_type = 'h5'
245
+            when #{targetType} = 'news' then t.event_type = 'news'
246
+            when #{targetType} = 'building' then t.event_type = 'building'
247
+            when #{targetType} = 'house' then t.event_type = 'house'
248
+            else t.target_type = #{targetType}
249
+            end)
238 250
         </if>
239 251
         <if test="buildingId != null and buildingId != ''">
240 252
             and t.building_id = #{buildingId}
@@ -359,7 +371,13 @@
359 371
             and t.target_id = #{targetId}
360 372
         </if>
361 373
         <if test="targetType != null and targetType != ''">
362
-            and t.event_type = #{targetType}
374
+            and (case when #{targetType} = 'activity' then t.target_type = 'dynamic'
375
+            when #{targetType} = 'h5' then t.event_type = 'h5'
376
+            when #{targetType} = 'news' then t.event_type = 'news'
377
+            when #{targetType} = 'building' then t.event_type = 'building'
378
+            when #{targetType} = 'house' then t.event_type = 'house'
379
+            else t.target_type = #{targetType}
380
+            end)
363 381
         </if>
364 382
         <if test="channelId != null and channelId != ''">
365 383
             and t.channel_id = #{channelId}
@@ -418,7 +436,13 @@
418 436
             and t.target_id = #{targetId}
419 437
         </if>
420 438
         <if test="targetType != null and targetType != ''">
421
-            and t.event_type = #{targetType}
439
+            and (case when #{targetType} = 'activity' then t.target_type = 'dynamic'
440
+            when #{targetType} = 'h5' then t.event_type = 'h5'
441
+            when #{targetType} = 'news' then t.event_type = 'news'
442
+            when #{targetType} = 'building' then t.event_type = 'building'
443
+            when #{targetType} = 'house' then t.event_type = 'house'
444
+            else t.target_type = #{targetType}
445
+            end)
422 446
         </if>
423 447
         <if test="buildingId != null and buildingId != ''">
424 448
             and t.building_id = #{buildingId}