Sfoglia il codice sorgente

抽奖联调bug 修复

wanghao 3 mesi fa
parent
commit
27c2ecee0d

+ 7 - 4
tenant/organization/src/main/java/com/jzg/organization/service/impl/SignInServiceImpl.java

@@ -60,6 +60,8 @@ public class SignInServiceImpl implements SignInService {
 
     //本地生活在一账通的固定平台ID
     private static final String CLIENT_ID = "jzg-7kP9xL2mN5vQ8zR1jW";
+    // 本地生活平台id
+    private static final String BDSH_CLIENT_ID = "bdsh-X9yZ1wV3uT5sR7qP9o";
 
     private static final Integer ACTIVITY_TYPE = 7;
     @Autowired
@@ -94,7 +96,7 @@ public class SignInServiceImpl implements SignInService {
         } catch (Exception e) {
             log.error("签到抽奖,远程调抽奖次数增加接口异常", e);
         }
-        if (lotteryCountVOHttpResult != null && lotteryCountVOHttpResult.getData().getSuccess()) {
+        if (lotteryCountVOHttpResult != null && lotteryCountVOHttpResult.getCode() == 200) {
             UpdateWrapper<SysUserActivityCompleteInRule> updateWrapper = new UpdateWrapper<>();
             updateWrapper.eq(StrUtil.isNotBlank(dto.getSystemCode()), "system_code", dto.getSystemCode());
             updateWrapper.eq(StrUtil.isNotBlank(dto.getUserId()), "user_id", dto.getUserId());
@@ -259,9 +261,9 @@ public class SignInServiceImpl implements SignInService {
                                     .stream()
                                     .collect(Collectors.groupingBy(UnifiedUserClientVO::getClientId));
                             // 首先查业务员是否在一账通绑定过本地生活  【已绑定过 远程调抽奖次数增加接口 标记已同步
-                            if (userClientGroupMap.containsKey(CLIENT_ID)) {
+                            if (userClientGroupMap.containsKey(BDSH_CLIENT_ID)) {
                                 LotteryCounDTO lotteryCounDTO = new LotteryCounDTO();
-                                lotteryCounDTO.setAppUserId(getUserId(userClientGroupMap.get(CLIENT_ID), CLIENT_ID));
+                                lotteryCounDTO.setAppUserId(getUserId(userClientGroupMap.get(BDSH_CLIENT_ID), BDSH_CLIENT_ID));
                                 lotteryCounDTO.setActivityId(activity.getId());
                                 lotteryCounDTO.setCount(Integer.parseInt(rule.getSignLotteryNum()));
                                 HttpResult<LotteryCountVO> lotteryCountVOHttpResult = null;
@@ -271,7 +273,8 @@ public class SignInServiceImpl implements SignInService {
                                     log.error("签到抽奖,远程调抽奖次数增加接口异常,userId:{},clientId:{},tenantId:{}", userId, CLIENT_ID, tenantId);
                                     log.error("签到抽奖,远程调抽奖次数增加接口异常", e);
                                 }
-                                if (lotteryCountVOHttpResult != null && lotteryCountVOHttpResult.getData().getSuccess()) {
+
+                                if (lotteryCountVOHttpResult != null && lotteryCountVOHttpResult.getCode() == 200) {
                                     // 记录规则完成  标记已同步
                                     completeSignRule(tenantId, userId, activity.getId(),
                                             table.getId(), rule, YesNoEnum.YES.getCode(), ACTIVITY_TYPE);