Commit 76f0da016ef418236e9c24bb5ad3a59bad9d457d
1 parent
0bc02249
feature(*): 优化查询活动资格
- 优化查询活动资格
Showing
1 changed file
with
2 additions
and
3 deletions
fw-valhalla-rpc/src/main/java/cn/fw/valhalla/rpc/mkt/MktRpcService.java
@@ -34,7 +34,7 @@ public class MktRpcService { | @@ -34,7 +34,7 @@ public class MktRpcService { | ||
34 | * @param dto | 34 | * @param dto |
35 | * @return | 35 | * @return |
36 | */ | 36 | */ |
37 | - @Cacheable(cacheNames = RedisKey.MKT_QUA, key = "#dto.getArchiveId()+':'+#dto.getActivityNo()", unless = "true != #result") | 37 | + @Cacheable(cacheNames = RedisKey.MKT_QUA, key = "#dto.getArchiveId()+':'+#dto.getActivityNo()", unless = "null != #result") |
38 | public Boolean queryQualifications(final QualificationDTO dto) { | 38 | public Boolean queryQualifications(final QualificationDTO dto) { |
39 | if (dto == null) { | 39 | if (dto == null) { |
40 | return Boolean.FALSE; | 40 | return Boolean.FALSE; |
@@ -43,12 +43,11 @@ public class MktRpcService { | @@ -43,12 +43,11 @@ public class MktRpcService { | ||
43 | AfterSaleArchivesDto archivesDto = new AfterSaleArchivesDto(); | 43 | AfterSaleArchivesDto archivesDto = new AfterSaleArchivesDto(); |
44 | BeanUtils.copyProperties(dto, archivesDto); | 44 | BeanUtils.copyProperties(dto, archivesDto); |
45 | final Message<Boolean> msg = activityApi.afterSaleSignUpJudge(archivesDto); | 45 | final Message<Boolean> msg = activityApi.afterSaleSignUpJudge(archivesDto); |
46 | - log.info("activityApi.queryQualifications: msg.code={}, msg.result={}, msg.data={}", msg.getCode(), msg.getResult(), msg.getData()); | ||
47 | boolean success = msg.isSuccess(); | 46 | boolean success = msg.isSuccess(); |
48 | BV.isTrue(success, () -> String.format("调用活动系统失败:%s", msg.getResult())); | 47 | BV.isTrue(success, () -> String.format("调用活动系统失败:%s", msg.getResult())); |
49 | return Boolean.TRUE.equals(msg.getData()); | 48 | return Boolean.TRUE.equals(msg.getData()); |
50 | } catch (Exception e) { | 49 | } catch (Exception e) { |
51 | - e.printStackTrace(); | 50 | + log.warn("查询活动资格失败: {}", e.getMessage()); |
52 | } | 51 | } |
53 | return null; | 52 | return null; |
54 | } | 53 | } |