Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
e2a27121
Commit
e2a27121
authored
Apr 01, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.9-20
parent
d5e0d633
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
56 additions
and
63 deletions
+56
-63
TSocialFriendController.java
...us/v1/yifu/social/controller/TSocialFriendController.java
+4
-2
TSocialFriendPushService.java
...plus/v1/yifu/social/service/TSocialFriendPushService.java
+0
-8
TSocialFriendService.java
...oud/plus/v1/yifu/social/service/TSocialFriendService.java
+0
-8
TSocialFriendPushServiceImpl.java
...ifu/social/service/impl/TSocialFriendPushServiceImpl.java
+0
-16
TSocialFriendServiceImpl.java
...v1/yifu/social/service/impl/TSocialFriendServiceImpl.java
+0
-16
DoJointFriendTask.java
...ifu/cloud/plus/v1/yifu/social/util/DoJointFriendTask.java
+47
-0
DoJointSocialTask.java
...ifu/cloud/plus/v1/yifu/social/util/DoJointSocialTask.java
+5
-13
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TSocialFriendController.java
View file @
e2a27121
...
...
@@ -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
();
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TSocialFriendPushService.java
View file @
e2a27121
...
...
@@ -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
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TSocialFriendService.java
View file @
e2a27121
...
...
@@ -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
();
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialFriendPushServiceImpl.java
View file @
e2a27121
...
...
@@ -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
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialFriendServiceImpl.java
View file @
e2a27121
...
...
@@ -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 查看任务进度
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/DoJointFriendTask.java
0 → 100644
View file @
e2a27121
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
();
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/DoJointSocialTask.java
View file @
e2a27121
...
...
@@ -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
();
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment