Procházet zdrojové kódy

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

顾绍勇 před 5 roky
rodič
revize
94289d6d87

+ 3
- 0
src/main/java/com/huiju/estateagents/interceptor/AccessInterceptor.java Zobrazit soubor

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

+ 2
- 1
src/main/java/com/huiju/estateagents/service/impl/ExtendContentServiceImpl.java Zobrazit soubor

191
             if (null != extendContent.getContentId()){
191
             if (null != extendContent.getContentId()){
192
                 taExtendContentQueryWrapper.ne("content_id", extendContent.getContentId());
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
                 taExtendContentQueryWrapper.eq(StringUtils.isNotBlank(extendContent.getBuildingId()), "building_id", extendContent.getBuildingId());
196
                 taExtendContentQueryWrapper.eq(StringUtils.isNotBlank(extendContent.getBuildingId()), "building_id", extendContent.getBuildingId());
196
             }
197
             }
197
             List<ExtendContent> extContentInfo = extendContentMapper.selectList(taExtendContentQueryWrapper);
198
             List<ExtendContent> extContentInfo = extendContentMapper.selectList(taExtendContentQueryWrapper);

+ 28
- 4
src/main/resources/mapper/TaChannelMapper.xml Zobrazit soubor

175
             and t.target_id = #{targetId}
175
             and t.target_id = #{targetId}
176
         </if>
176
         </if>
177
         <if test="targetType != null and targetType != ''">
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
         </if>
185
         </if>
180
         <if test="channelId != null and channelId != ''">
186
         <if test="channelId != null and channelId != ''">
181
             and t.channel_id = #{channelId}
187
             and t.channel_id = #{channelId}
234
             and t.target_id = #{targetId}
240
             and t.target_id = #{targetId}
235
         </if>
241
         </if>
236
         <if test="targetType != null and targetType != ''">
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
         </if>
250
         </if>
239
         <if test="buildingId != null and buildingId != ''">
251
         <if test="buildingId != null and buildingId != ''">
240
             and t.building_id = #{buildingId}
252
             and t.building_id = #{buildingId}
359
             and t.target_id = #{targetId}
371
             and t.target_id = #{targetId}
360
         </if>
372
         </if>
361
         <if test="targetType != null and targetType != ''">
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
         </if>
381
         </if>
364
         <if test="channelId != null and channelId != ''">
382
         <if test="channelId != null and channelId != ''">
365
             and t.channel_id = #{channelId}
383
             and t.channel_id = #{channelId}
418
             and t.target_id = #{targetId}
436
             and t.target_id = #{targetId}
419
         </if>
437
         </if>
420
         <if test="targetType != null and targetType != ''">
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
         </if>
446
         </if>
423
         <if test="buildingId != null and buildingId != ''">
447
         <if test="buildingId != null and buildingId != ''">
424
             and t.building_id = #{buildingId}
448
             and t.building_id = #{buildingId}