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
909af001
Commit
909af001
authored
Dec 11, 2024
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP-1.7.3-shuiyou' into MVP-1.7.3-shuiyou
parents
c2437856
269022e9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
780 additions
and
166 deletions
+780
-166
daprConfig.properties
...yifu-common-dapr/src/main/resources/daprConfig.properties
+25
-63
SocialTask.java
...n/java/com/yifu/cloud/plus/v1/job/compont/SocialTask.java
+23
-0
FriendResult.java
...a/com/yifu/cloud/plus/v1/yifu/social/vo/FriendResult.java
+21
-0
SocialFriendConfig.java
.../cloud/plus/v1/yifu/social/config/SocialFriendConfig.java
+612
-96
SocialFriendSign.java
...fu/cloud/plus/v1/yifu/social/config/SocialFriendSign.java
+61
-0
TSocialFriendController.java
...us/v1/yifu/social/controller/TSocialFriendController.java
+18
-0
TSocialFriendPushService.java
...plus/v1/yifu/social/service/TSocialFriendPushService.java
+3
-0
TSocialFriendPushServiceImpl.java
...ifu/social/service/impl/TSocialFriendPushServiceImpl.java
+17
-7
No files found.
yifu-common/yifu-common-dapr/src/main/resources/daprConfig.properties
View file @
909af001
#\u6D4B\u8BD5\u73AF\u5883
#\u67E5\u8BE2\u5730\u5740\u6559\u7A0B\uFF1A cd home/data/nginx-mvp-image/mvp/
# vim Default.conf
# \u627E\u5230\u5BF9\u5E94\u7684\u670D\u52A1\u5730\u5740
#dapr.upms.appUrl=http://yifu-auth.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
#\u672C\u5730
dapr.upms.appUrl
=
http://localhost:4500/v1.0/invoke/
dapr.upms.appUrl
=
http://yifu-upms.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.upms.appId
=
yifu-upms
dapr.upms.appPort
=
4000
dapr.upms.httpPort
=
4500
dapr.upms.grpcPort
=
54000
dapr.upms.metricsPort
=
9490
#\u6D4B\u8BD5\u73AF\u5883
#dapr.check.appUrl=http://yifu-check.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
#\u6
72C\u5730
dapr.check.appUrl
=
http://
localhost:3522
/v1.0/invoke/
#\u6
D4B\u8BD5\u73AF\u5883
dapr.check.appUrl
=
http://
yifu-check.qas-mvp.svc.cluster.local:3500
/v1.0/invoke/
dapr.check.appId
=
yifu-check
dapr.check.appPort
=
5022
dapr.check.httpPort
=
3522
dapr.check.grpcPort
=
52022
dapr.check.metricsPort
=
9292
dapr.archives.appUrl
=
http://localhost:3501/v1.0/invoke/
dapr.archives.appId
=
yifu-archives
dapr.archives.appPort
=
5001
dapr.archives.httpPort
=
3501
dapr.archives.grpcPort
=
52001
dapr.archives.metricsPort
=
9091
dapr.social.appUrl
=
http://localhost:3502/v1.0/invoke/
dapr.social.appId
=
yifu-social
dapr.social.appPort
=
5002
dapr.social.httpPort
=
3502
dapr.social.grpcPort
=
52002
dapr.social.metricsPort
=
9092
#\u6D4B\u8BD5\u73AF\u5883
dapr.archives.appUrl
=
http://yifu-archives.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.archives.appId
=
yifu-archives
dapr.salary.appUrl
=
http://localhost:3503/v1.0/invoke/
#\u6D4B\u8BD5\u73AF\u5883
dapr.salary.appUrl
=
http://yifu-salary.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.salary.appId
=
yifu-salary
dapr.salary.appPort
=
5003
dapr.salary.httpPort
=
3503
dapr.salary.grpcPort
=
52003
dapr.salary.metricsPort
=
9093
dapr.job.appUrl
=
http://localhost:3504/v1.0/invoke/
dapr.job.appId
=
yifu-job
dapr.job.appPort
=
5004
dapr.job.httpPort
=
3504
dapr.job.grpcPort
=
52004
dapr.job.metricsPort
=
9094
dapr.insurances.appUrl
=
http://localhost:3505/v1.0/invoke/
#\u6D4B\u8BD5\u73AF\u5883
dapr.social.appUrl
=
http://yifu-social.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.social.appId
=
yifu-social
#\u6D4B\u8BD5\u73AF\u5883-\u5546\u9669\u670D\u52A1
dapr.insurances.appUrl
=
http://yifu-insurances.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.insurances.appId
=
yifu-insurances
dapr.insurances.appPort
=
5005
dapr.insurances.httpPort
=
3505
dapr.insurances.grpcPort
=
52005
dapr.insurances.metricsPort
=
9095
#\u6D4B\u8BD5\u73AF\u5883-B\u7AEF\u670D\u52A1
dapr.business.appUrl
=
http://yifu-business.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.business.appId
=
yifu-business
dapr.codegen.appUrl
=
http://localhost:5006/v1.0/invoke/
dapr.codegen.appId
=
yifu-codegen
dapr.codegen.appPort
=
8000
dapr.codegen.httpPort
=
5006
dapr.codegen.grpcPort
=
58000
dapr.codegen.metricsPort
=
9890
#\u6D4B\u8BD5\u73AF\u5883-\u6D88\u606F\u63D0\u9192\u670D\u52A1
dapr.msg.appUrl
=
http://yifu-msg.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.msg.appId
=
yifu-msg
dapr.permission.appUrl
=
http://localhost:3507/v1.0/invoke/
#\u6D4B\u8BD5\u73AF\u5883-EKP\u6743\u9650
dapr.permission.appUrl
=
http://yifu-permission.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.permission.appId
=
yifu-permission
dapr.permission.appPort
=
5027
dapr.permission.httpPort
=
3507
dapr.permission.grpcPort
=
52007
dapr.permission.metricsPort
=
9097
dapr.ekp.appUrl
=
http://localhost:3508/v1.0/invoke/
#\u6D4B\u8BD5\u73AF\u5883-EKP
dapr.ekp.appUrl
=
http://yifu-ekp.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.ekp.appId
=
yifu-ekp
dapr.ekp.appPort
=
5077
dapr.ekp.httpPort
=
3508
dapr.ekp.grpcPort
=
52008
dapr.ekp.metricsPort
=
9098
#\u6D4B\u8BD5\u73AF\u5883-\u85AA\u8D44\u670D\u52A1
#dapr.salary.appUrl=http://yifu-salary.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
#dapr.salary.appId=yifu-salary
...
...
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/SocialTask.java
View file @
909af001
...
...
@@ -194,6 +194,29 @@ public class SocialTask {
log
.
info
(
"------------2定时任务推送社保士兵-定时任务结束------------"
);
}
/**
* @Description: 1定时任务推送税友
* @Author: hgw
* @Date: 2024-12-9 17:00:02
**/
public
void
doPushFriend
()
{
log
.
info
(
"------------1定时任务推送税友-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tsocialfriend/inner/doPushFriend"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------1定时任务推送税友-定时任务结束------------"
);
}
/**
* @Description: 2定时任务获取税友
* @Author: hgw
* @Date: 2024-12-9 16:59:56
**/
public
void
doGetFriendByRequestId
()
{
log
.
info
(
"------------2定时任务获取税友-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprProperties
.
getAppUrl
(),
daprProperties
.
getAppId
(),
"/tsocialfriend/inner/doGetFriendByRequestId"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------2定时任务获取税友-定时任务结束------------"
);
}
/**
* @Description: 3每日定时任务推送社保士兵审核结果查询
* @Author: hgw
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/FriendResult.java
0 → 100644
View file @
909af001
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @Author fxj
* @Date 2024/5/10
* @Description
* @Version 1.0
*/
@Data
public
class
FriendResult
implements
Serializable
{
// 身份证
private
String
idCard
;
// 状态1-处理中,2-处理成功,3-处理失败,4-待办(提交成功,待网厅状态流转,上海特有)
private
String
zt
;
// 提示或者错误信息 SUCCESS
private
String
cwxx
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/config/SocialFriendConfig.java
View file @
909af001
This diff is collapsed.
Click to expand it.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/config/SocialFriendSign.java
0 → 100644
View file @
909af001
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
config
;
import
javax.crypto.Mac
;
import
javax.crypto.spec.SecretKeySpec
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLEncoder
;
import
java.nio.charset.StandardCharsets
;
import
java.security.InvalidKeyException
;
import
java.security.NoSuchAlgorithmException
;
import
java.security.SignatureException
;
import
java.util.Base64
;
import
java.util.Map
;
/**
* @author hgw2
* @description 税友签名接口
* @date 2024/12/9
*/
public
class
SocialFriendSign
{
public
static
String
qianMing
(
Map
<
String
,
String
>
treeMap
)
throws
SignatureException
{
// 1. 将以上 key=value 对的 value 进行合并,生成一下字符串 mergeStr
//System.out.println("header内的信息:"+treeMap.toString())
StringBuilder
mergeStr
=
new
StringBuilder
();
for
(
Map
.
Entry
<
String
,
String
>
stringStringEntry
:
treeMap
.
entrySet
())
{
mergeStr
.
append
(
stringStringEntry
.
getValue
());
}
//System.out.println("Key-Value 合并: " + mergeStr)
// 2. 将生成的 mergeStr 进行 Url 编码
String
encodedStr
=
null
;
try
{
encodedStr
=
URLEncoder
.
encode
(
mergeStr
.
toString
(),
"UTF-8"
);
}
catch
(
UnsupportedEncodingException
e
)
{
// URL 编码失败
throw
new
SignatureException
(
"【税友】URL 编码失败"
);
}
//System.out.println("encodeURL 编码:" + encodedStr)
// 3.利用 HmacSHA256 算法对 signStr 进行哈希运算生成消息摘要,摘要结果以 Base64 结果形式返回,signStr 即为请求参数中的 signature 字段
String
signatureResult
=
""
;
try
{
Mac
mac
=
Mac
.
getInstance
(
"HmacSHA256"
);
SecretKeySpec
signingKey
=
new
SecretKeySpec
(
treeMap
.
get
(
"appSecret"
).
getBytes
(),
"HmacSHA256"
);
mac
.
init
(
signingKey
);
byte
[]
signData
=
mac
.
doFinal
(
encodedStr
.
getBytes
());
byte
[]
resultBytes
=
Base64
.
getEncoder
().
encode
(
signData
);
signatureResult
=
new
String
(
resultBytes
,
StandardCharsets
.
UTF_8
);
}
catch
(
NoSuchAlgorithmException
e
)
{
throw
new
SignatureException
(
"【税友】平台不支持 HmacSHA 摘要方式"
);
}
catch
(
InvalidKeyException
e
)
{
throw
new
SignatureException
(
"【税友】指定的访问密钥无效"
);
}
//ystem.out.println("加密结果: " + signatureResult)
return
signatureResult
;
}
private
SocialFriendSign
()
{
throw
new
IllegalStateException
(
"SocialFriendSign class"
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TSocialFriendController.java
View file @
909af001
...
...
@@ -17,11 +17,13 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
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.vo.FriendResult
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
...
...
@@ -51,6 +53,22 @@ public class TSocialFriendController {
return
tSocialFriendPushService
.
pushFriendTest
(
dispatchIdList
);
}
@Operation
(
description
=
"1定时任务推送税友"
)
@PostMapping
(
"/inner/doPushFriend"
)
@SysLog
(
"1定时任务推送税友"
)
@Inner
public
R
<
String
>
doPushFriendTest
()
{
return
tSocialFriendPushService
.
pushFriendTest
(
null
);
}
@Operation
(
description
=
"2定时任务获取税友"
)
@PostMapping
(
"/inner/doGetFriendByRequestId"
)
@SysLog
(
"2定时任务获取税友"
)
@Inner
public
R
<
FriendResult
>
doGetFriendByRequestId
()
{
return
tSocialFriendPushService
.
getFriendByRequestIdTest
(
null
);
}
/**
* @param addId 任务id,可为空
* @Description: 1获取税友状态
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TSocialFriendPushService.java
View file @
909af001
...
...
@@ -17,9 +17,11 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSocialInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.FriendResult
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.List
;
...
...
@@ -50,6 +52,7 @@ public interface TSocialFriendPushService extends IService<TSocialInfo> {
R
<
String
>
pushSoldier
(
List
<
String
>
dispatchIdList
);
R
<
String
>
pushFriendTest
(
List
<
String
>
dispatchIdList
);
R
<
FriendResult
>
getFriendByRequestIdTest
(
List
<
String
>
dispatchIdList
);
/**
* @param
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialFriendPushServiceImpl.java
View file @
909af001
...
...
@@ -32,10 +32,7 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialSoldierLog;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TSocialSoldierShenBaoTask
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialFriendMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.*
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAddVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYgsAuditVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYsdAddVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.SocialSoldierYsdAuditVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.*
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.commons.compress.utils.IOUtils
;
...
...
@@ -172,12 +169,25 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
**/
@Override
public
R
<
String
>
pushFriendTest
(
List
<
String
>
dispatchIdList
)
{
// 获取时间限制配置(获取 当月启用 的配置)
String
id
=
socialFriendConfig
.
getFourAppAdd
(
restTemplate
);
String
thisTime
=
DateUtil
.
getThisTime
();
// type 1社保增 2社保减 3医保增 4医保减
int
type
=
1
;
String
id
=
socialFriendConfig
.
pushFriendByInfo
(
restTemplate
,
"3"
,
type
,
thisTime
);
return
R
.
ok
(
id
);
}
/**
* @Description: 推送到社保士兵
* @Author: hgw
* @Date: 2024/5/10 17:53
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Override
public
R
<
FriendResult
>
getFriendByRequestIdTest
(
List
<
String
>
dispatchIdList
)
{
R
<
FriendResult
>
info
=
socialFriendConfig
.
getFriendByRequestId
(
restTemplate
,
"15074c814b4240a19cdb4425a7ae502c"
);
return
info
;
}
/**
* @Description: 推送到社保士兵
* @Author: hgw
...
...
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