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
4694fb69
Commit
4694fb69
authored
Jun 24, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.12-保存档案
parent
a68aad20
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
17 deletions
+25
-17
TGzController.java
...cloud/plus/v1/yifu/archives/controller/TGzController.java
+2
-16
TGzEmpInfoServiceImpl.java
.../v1/yifu/archives/service/impl/TGzEmpInfoServiceImpl.java
+22
-0
ExcelUtil.java
...m/yifu/cloud/plus/v1/yifu/common/core/util/ExcelUtil.java
+1
-1
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TGzController.java
View file @
4694fb69
...
...
@@ -17,25 +17,19 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.yifu.cloud.plus.v1.yifu.archives.config.GzConfig
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TGzOfferInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TGzOfferInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.utils.GZSign
;
import
com.yifu.cloud.plus.v1.yifu.archives.utils.ReturnGz
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.client.RestTemplate
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
...
...
@@ -76,35 +70,27 @@ public class TGzController {
params
.
put
(
"requestId"
,
requestId
);
params
.
put
(
"appkey"
,
appkey
);
params
.
put
(
"nonce"
,
nonce
);
// TODO - 真实使用时,请去除error日志
log
.
error
(
"瓜子推送offer信息,gzOfferInfo="
+
JSON
.
toJSONString
(
gzOfferInfo
));
log
.
error
(
"瓜子推送offer信息,params="
+
JSON
.
toJSONString
(
params
));
// 2. 计算期望的签名
String
expectedSignature
=
GZSign
.
getSignature
(
params
,
gzConfig
.
getAppsecret
());
log
.
error
(
"瓜子推送offer信息,expectedSignature="
+
expectedSignature
);
// 3. 比较签名是否一致
if
(!
params
.
get
(
"signature"
).
equals
(
expectedSignature
))
{
return
ReturnGz
.
failed
(
"签名验证失败"
);
}
log
.
error
(
"签名验证通过,expectedSignature="
+
expectedSignature
);
// 5. 签名验证通过,处理业务逻辑
return
this
.
saveData
(
gzOfferInfo
);
}
/**
* 处理推送的业务数据
*
* @return 处理结果
*/
private
ReturnGz
<
String
>
saveData
(
TGzOfferInfo
tGzOfferInfo
)
{
//TGzOfferInfo tGzOfferInfo = new TGzOfferInfo();
// 这里实现你的业务逻辑
// 例如:解析参数、保存数据、触发后续处理等
tGzOfferInfo
.
setCreateBy
(
"3"
);
tGzOfferInfo
.
setCreateName
(
"瓜子推送"
);
tGzOfferInfo
.
setCreateTime
(
LocalDateTime
.
now
());
/*tGzOfferInfo.setBizId(String.valueOf(params.get("bizId")));
tGzOfferInfo.setNationalId(String.valueOf(params.get("nationalId")));
tGzOfferInfo.setName(String.valueOf(params.get("name")));*/
tGzOfferInfoService
.
save
(
tGzOfferInfo
);
return
ReturnGz
.
ok
();
}
...
...
@@ -128,7 +114,7 @@ public class TGzController {
params
.
remove
(
"startTime"
,
startTime
);
params
.
remove
(
"endTime"
,
endTime
);
String
sortedParams
=
GZSign
.
getEncodeString
(
params
);
sortedParams
+=
"&startTime="
+
startTime
+
"&endTime="
+
endTime
;
sortedParams
+=
"&startTime="
+
startTime
+
"&endTime="
+
endTime
;
return
gzConfig
.
getGzBankInfo
(
restTemplate
,
sortedParams
);
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TGzEmpInfoServiceImpl.java
View file @
4694fb69
...
...
@@ -805,6 +805,28 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
}
tEmpContactInfoService
.
saveOrUpdate
(
info
);
}
// 附件
List
<
TAttaInfo
>
attaList
=
attaInfoService
.
getTAttaInfoListByDoMainId
(
gzEmpId
);
if
(
attaList
!=
null
)
{
// 先删除其他信息
attaInfoService
.
deleteByDomainIdAndOther
(
empId
);
TAttaInfo
attaEmp
;
List
<
TAttaInfo
>
attaEmpList
=
new
ArrayList
<>();
String
idStr
=
"id"
;
for
(
TAttaInfo
atta
:
attaList
)
{
attaEmp
=
new
TAttaInfo
();
BeanUtil
.
copyProperties
(
atta
,
attaEmp
,
idStr
);
if
(
Common
.
isEmpty
(
attaEmp
.
getAttaName
()))
{
attaEmp
.
setAttaName
(
CommonConstants
.
CENTER_SPLIT_LINE_STRING
);
}
attaEmp
.
setDomainId
(
empId
);
attaEmp
.
setCreateBy
(
user
.
getId
());
attaEmp
.
setCreateName
(
user
.
getNickname
());
attaEmp
.
setCreateTime
(
LocalDateTime
.
now
());
attaEmpList
.
add
(
attaEmp
);
}
attaInfoService
.
saveBatch
(
attaEmpList
);
}
return
R
.
ok
();
}
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/util/ExcelUtil.java
View file @
4694fb69
...
...
@@ -1147,7 +1147,7 @@ public class ExcelUtil <T> implements Serializable {
/**
* @param clazz 类
* @param nameDicMap 需要翻译的属性
* @param nameDic
t
Map 需要翻译的属性
* @param redisLabelMap 字典MAP,这里传进来,额外加上固定需要翻译的值
* @Description: 组装需要翻译的map,并且组装固定的值的map
* @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