智慧保安后台管理-外网
Administrator
2022-06-10 ffa70a1adfcbc62f1d2f34d4e6e0003cd92186dd
src/main/java/org/springblade/modules/system/service/MyAsyncService.java
@@ -1,10 +1,13 @@
package org.springblade.modules.system.service;
import com.alibaba.fastjson.JSON;
import net.sf.json.JSONObject;
import org.springblade.common.utils.HttpClientUtils;
import org.springblade.modules.FTP.FtpUtil;
import org.springblade.modules.FTP.Result;
import org.springblade.modules.system.dto.UserDTO;
import org.springblade.modules.system.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@@ -13,6 +16,7 @@
import java.util.Map;
import static org.springblade.common.config.FtpConfig.qfqkBaseApiUrl;
import static org.springblade.modules.FTP.DataHandler.handlerUserInfo;
@Service
public class MyAsyncService {
@@ -40,6 +44,7 @@
      JSONObject jsonObject = JSONObject.fromObject(userDTO);
      //发送请求
      try {
         System.out.println("发起异步推送qfqk----用户新增");
         HttpClientUtils.httpPostWithjson(requestUrl,jsonObject.toString());
         System.out.println("用户新增请求已发送....");
      } catch (IOException e) {
@@ -68,6 +73,7 @@
      JSONObject jsonObject = JSONObject.fromObject(userDTO);
      //发送请求
      try {
         System.out.println("发起异步推送qfqk----用户更新");
         HttpClientUtils.httpPostWithjson(requestUrl,jsonObject.toString());
      } catch (IOException e) {
         e.printStackTrace();