xieb
2023-09-05 bdd8c18b46cc31c0c381bec62fc9df7936337139
skjcmanager/skjcmanager-service/skjcmanager-user/src/main/java/cn/gistack/system/user/sync/controller/UserPushController.java
@@ -10,6 +10,7 @@
import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.tenant.annotation.NonDS;
import org.springframework.scheduling.annotation.Async;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -67,6 +68,17 @@
      String syncData = SecurityUtil.decryptAES(apiPushDTO.getSyncData(), MD5Util.getMD5String(appSecret));
      List<AccountBean> accountBeanList = JSONArray.parseArray(syncData, AccountBean.class);
      // 异步执行用户处理
      asyncUserGo(accountBeanList);
      ret.put("code", 1000);
      ret.put("msg", "成功");
      ret.put("data", apiPushDTO.getSign());
      return ret;
   }
   @Async
   public void asyncUserGo(List<AccountBean> accountBeanList) {
      //循环list
      accountBeanList.forEach(accountBean -> {
         //判断手机号是否在库中
@@ -106,10 +118,6 @@
         }
      });
      ret.put("code", 1000);
      ret.put("msg", "成功");
      ret.put("data", apiPushDTO.getSign());
      return ret;
   }
}