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
05ea10b7
Commit
05ea10b7
authored
May 16, 2025
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.7.10-税友临时版本-加点附件的日志
parent
609a1ec1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
SocialFriendConfig.java
.../cloud/plus/v1/yifu/social/config/SocialFriendConfig.java
+4
-1
TSocialFriendPushServiceImpl.java
...ifu/social/service/impl/TSocialFriendPushServiceImpl.java
+2
-0
ExcelToImage.java
...com/yifu/cloud/plus/v1/yifu/social/util/ExcelToImage.java
+3
-0
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/config/SocialFriendConfig.java
View file @
05ea10b7
...
@@ -248,12 +248,13 @@ public class SocialFriendConfig {
...
@@ -248,12 +248,13 @@ public class SocialFriendConfig {
// 行政区划代码 户里的缴纳地,精确到市 "340100"
// 行政区划代码 户里的缴纳地,精确到市 "340100"
HttpEntity
<
String
>
formEntity
=
new
HttpEntity
<>(
json
.
toString
(),
headers
);
HttpEntity
<
String
>
formEntity
=
new
HttpEntity
<>(
json
.
toString
(),
headers
);
backLog
.
setLogInfo
(
String
.
valueOf
(
formEntity
));
backLog
.
setCreateTime
(
LocalDateTime
.
now
());
String
dataResultList
=
restTemplate
.
postForObject
(
appAddUrl
,
formEntity
,
String
.
class
);
String
dataResultList
=
restTemplate
.
postForObject
(
appAddUrl
,
formEntity
,
String
.
class
);
// {"head":{"code":"00000000","description":"成功","msg":"成功","time":"2024-12-06 17:10:26","status":"Y"
// {"head":{"code":"00000000","description":"成功","msg":"成功","time":"2024-12-06 17:10:26","status":"Y"
// ,"body":{"requestId":"85440b327d71466abcd9c5c81d5bb172"
// ,"body":{"requestId":"85440b327d71466abcd9c5c81d5bb172"
if
(
Common
.
isNotNull
(
dataResultList
))
{
if
(
Common
.
isNotNull
(
dataResultList
))
{
backLog
.
setLogInfo
(
dataResultList
);
backLog
.
setLogInfo
(
dataResultList
);
backLog
.
setCreateTime
(
LocalDateTime
.
now
());
JSONObject
dataObject
=
JSON
.
parseObject
(
dataResultList
);
JSONObject
dataObject
=
JSON
.
parseObject
(
dataResultList
);
String
head
=
dataObject
.
getString
(
"head"
);
String
head
=
dataObject
.
getString
(
"head"
);
if
(
Common
.
isNotNull
(
head
))
{
if
(
Common
.
isNotNull
(
head
))
{
...
@@ -265,6 +266,8 @@ public class SocialFriendConfig {
...
@@ -265,6 +266,8 @@ public class SocialFriendConfig {
urlStr
=
bodyObject
.
getString
(
"wjlj"
);
urlStr
=
bodyObject
.
getString
(
"wjlj"
);
}
}
}
}
}
else
{
backLog
.
setSocialId
(
appAddUrl
+
"返回dataResultList为空"
);
}
}
return
urlStr
;
return
urlStr
;
}
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialFriendPushServiceImpl.java
View file @
05ea10b7
...
@@ -46,6 +46,7 @@ import org.springframework.web.client.RestTemplate;
...
@@ -46,6 +46,7 @@ import org.springframework.web.client.RestTemplate;
import
java.io.*
;
import
java.io.*
;
import
java.net.URL
;
import
java.net.URL
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.concurrent.atomic.AtomicInteger
;
...
@@ -1106,6 +1107,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
...
@@ -1106,6 +1107,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
TSocialFriendBackLog
backLog
=
new
TSocialFriendBackLog
();
TSocialFriendBackLog
backLog
=
new
TSocialFriendBackLog
();
backLog
.
setSocialId
(
searchVo
.
getSocialId
());
backLog
.
setSocialId
(
searchVo
.
getSocialId
());
backLog
.
setType
(
CommonConstants
.
SIX_INT
);
backLog
.
setType
(
CommonConstants
.
SIX_INT
);
backLog
.
setCreateTime
(
LocalDateTime
.
now
());
R
<
String
>
ulrR
=
excelToImage
.
excelToImg
(
inputStreamOut
,
socialFriendConfig
,
restTemplate
,
backLog
);
R
<
String
>
ulrR
=
excelToImage
.
excelToImg
(
inputStreamOut
,
socialFriendConfig
,
restTemplate
,
backLog
);
tSocialFriendBackLogService
.
save
(
backLog
);
tSocialFriendBackLogService
.
save
(
backLog
);
return
ulrR
;
return
ulrR
;
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/ExcelToImage.java
View file @
05ea10b7
...
@@ -43,6 +43,7 @@ public class ExcelToImage {
...
@@ -43,6 +43,7 @@ public class ExcelToImage {
public
R
<
String
>
excelToImg
(
InputStream
inputStream
,
SocialFriendConfig
socialFriendConfig
public
R
<
String
>
excelToImg
(
InputStream
inputStream
,
SocialFriendConfig
socialFriendConfig
,
RestTemplate
restTemplate
,
TSocialFriendBackLog
backLog
){
,
RestTemplate
restTemplate
,
TSocialFriendBackLog
backLog
){
backLog
.
setLogInfo
(
"开始转换excel为图片"
);
if
(
null
==
inputStream
||
null
==
socialFriendConfig
){
if
(
null
==
inputStream
||
null
==
socialFriendConfig
){
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
+
toImagParamError
);
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
+
toImagParamError
);
}
}
...
@@ -61,10 +62,12 @@ public class ExcelToImage {
...
@@ -61,10 +62,12 @@ public class ExcelToImage {
file
=
new
File
(
projectRoot
+
toImag
);
file
=
new
File
(
projectRoot
+
toImag
);
if
(
file
.
exists
()){
if
(
file
.
exists
()){
// file 压缩到1M以内
// file 压缩到1M以内
backLog
.
setLogInfo
(
"压缩大小前"
);
file
=
compressImage
(
projectRoot
,
toImag
,
1024
*
1024
);
file
=
compressImage
(
projectRoot
,
toImag
,
1024
*
1024
);
String
key
=
System
.
currentTimeMillis
()
+
file
.
getName
();
String
key
=
System
.
currentTimeMillis
()
+
file
.
getName
();
byte
[]
fileContent
=
Files
.
readAllBytes
(
file
.
toPath
());
byte
[]
fileContent
=
Files
.
readAllBytes
(
file
.
toPath
());
String
base64String
=
Base64
.
getEncoder
().
encodeToString
(
fileContent
);
String
base64String
=
Base64
.
getEncoder
().
encodeToString
(
fileContent
);
backLog
.
setLogInfo
(
"转化为base64String"
);
String
url
=
socialFriendConfig
.
uploadPng
(
restTemplate
,
key
,
base64String
,
backLog
);
String
url
=
socialFriendConfig
.
uploadPng
(
restTemplate
,
key
,
base64String
,
backLog
);
if
(
Common
.
isEmpty
(
url
)){
if
(
Common
.
isEmpty
(
url
)){
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
+
toImagOSSError
);
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
+
toImagOSSError
);
...
...
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