Commit e2a27121 authored by hongguangwu's avatar hongguangwu

MVP1.7.9-20

parent d5e0d633
......@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialFreindPushAndGet;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialFreindPushAndGetService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialFriendPushService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialFriendService;
import com.yifu.cloud.plus.v1.yifu.social.util.DoJointFriendTask;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
......@@ -58,6 +59,7 @@ public class TSocialFriendController {
private final TSocialFriendService tSocialFriendService;
private final TSocialFriendPushService tSocialFriendPushService;
private final TSocialFreindPushAndGetService tSocialFreindPushAndGetService;
private final DoJointFriendTask doJointFriendTask;
@Operation(description = "1定时任务推送税友")
@PostMapping("/inner/doPushFriend")
......@@ -124,9 +126,9 @@ public class TSocialFriendController {
info.setCreateUserName(user.getNickname());
tSocialFreindPushAndGetService.save(info);
if (type == CommonConstants.ONE_INT) {
tSocialFriendPushService.pushFriendByAsync();
doJointFriendTask.pushFriendByAsync();
} else {
tSocialFriendService.getInfoByRequestIdByAsync();
doJointFriendTask.getInfoByRequestIdByAsync();
}
return R.ok();
}
......
......@@ -40,13 +40,5 @@ public interface TSocialFriendPushService extends IService<TSocialInfo> {
**/
R<String> pushFriend(List<String> dispatchIdList);
/**
* @Description: 主动推送税友-异步
* @Author: hgw
* @Date: 2025/3/18 10:45
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
void pushFriendByAsync();
R<String> doExportRoster(String socialId, String type, String unitCreditCode);
}
......@@ -37,12 +37,4 @@ public interface TSocialFriendService extends IService<TSocialInfo> {
**/
R<String> getInfoByRequestId();
/**
* @Description: 主动获取税友-异步
* @Author: hgw
* @Date: 2025/3/18 10:45
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
void getInfoByRequestIdByAsync();
}
......@@ -40,8 +40,6 @@ import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
......@@ -59,7 +57,6 @@ import java.util.concurrent.atomic.AtomicInteger;
@AllArgsConstructor
@Log4j2
@Service
@EnableAsync
public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMapper, TSocialInfo> implements TSocialFriendPushService {
private RestTemplate restTemplate;
......@@ -88,19 +85,6 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
@Autowired
private TDispatchInfoMapper dispatchInfoMapper;
/**
* @Description: 核心推送改为异步
* @Author: hgw
* @Date: 2025/3/18 10:52
* @return: void
**/
@Async
@Override
public void pushFriendByAsync() {
this.pushFriend(null);
}
/**
* @Description: 推送到税友
* @Author: hgw
......
......@@ -24,7 +24,6 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.social.config.SocialFriendConfig;
import com.yifu.cloud.plus.v1.yifu.social.entity.*;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialFriendMapper;
......@@ -32,14 +31,11 @@ import com.yifu.cloud.plus.v1.yifu.social.service.*;
import com.yifu.cloud.plus.v1.yifu.social.vo.FriendResult;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import java.time.LocalDateTime;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
......@@ -52,7 +48,6 @@ import java.util.concurrent.atomic.AtomicInteger;
@AllArgsConstructor
@Log4j2
@Service
@EnableAsync
public class TSocialFriendServiceImpl extends ServiceImpl<TSocialFriendMapper, TSocialInfo> implements TSocialFriendService {
private RestTemplate restTemplate = new RestTemplate();
......@@ -65,17 +60,6 @@ public class TSocialFriendServiceImpl extends ServiceImpl<TSocialFriendMapper, T
private final TSocialFriendBackLogService tSocialFriendBackLogService;
private final TSocialFreindSetService tSocialFreindSetService;
private final AtomicInteger atomicGetFriend = new AtomicInteger(0);
/**
* @Description: 核心推送改为异步
* @Author: hgw
* @Date: 2025/3/18 10:52
* @return: void
**/
@Async
@Override
public void getInfoByRequestIdByAsync() {
this.getInfoByRequestId();
}
/**
* @Description: 5 查看任务进度
......
package com.yifu.cloud.plus.v1.yifu.social.util;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialFriendPushService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialFriendService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
/**
* 执行税友异步
*
* @author hgw
* @Date 2022-07-08
* @Description 多线程的执行demo
*/
@Slf4j
@Component
public class DoJointFriendTask {
@Autowired
private TSocialFriendPushService tSocialFriendPushService;
@Autowired
private TSocialFriendService tSocialFriendService;
/**
* @Description: 异步推送税友
* @Author: hgw
* @Date: 2025/4/1 11:33
* @return: void
**/
@Async
public void pushFriendByAsync() {
tSocialFriendPushService.pushFriend(null);
}
/**
* @Description: 异步拉取税友
* @Author: hgw
* @Date: 2025/4/1 11:33
* @return: void
**/
@Async
public void getInfoByRequestIdByAsync() {
tSocialFriendService.getInfoByRequestId();
}
}
......@@ -11,9 +11,6 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.util.RedisUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.EkpDaprUtils;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpIncomeUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSocialUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamManage;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpIncomeParamRisk;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushFundParam;
......@@ -31,7 +28,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import java.util.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 主要执行人员档案的员工类型同步更新
......@@ -43,15 +43,6 @@ import java.util.*;
@Component
public class DoJointSocialTask {
@Autowired
private EkpIncomeUtil ekpIncomeUtil;
@Autowired
private EkpSocialUtil ekpSocialUtil;
@Autowired
private EkpFundUtil ekpFundUtil;
@Autowired
private TSendEkpErrorService tSendEkpErrorService;
......@@ -1593,4 +1584,5 @@ public class DoJointSocialTask {
sb.insert(4, "-");
return sb.toString();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment