Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
enterprise-service-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
enterprise-service-platform
Commits
93cb23e1
Commit
93cb23e1
authored
Mar 24, 2025
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改配置文件
parent
edc48c82
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
5 deletions
+31
-5
enterprise-service-manager/src/main/java/com/mortals/xhx/busiz/web/ProxyController.java
.../main/java/com/mortals/xhx/busiz/web/ProxyController.java
+31
-5
No files found.
enterprise-service-manager/src/main/java/com/mortals/xhx/busiz/web/ProxyController.java
View file @
93cb23e1
...
...
@@ -3,6 +3,7 @@ package com.mortals.xhx.busiz.web;
import
cn.hutool.core.codec.Base64
;
import
cn.hutool.http.HttpUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.common.Rest
;
...
...
@@ -173,6 +174,36 @@ public class ProxyController {
return
Rest
.
fail
(
response
.
code
(),
response
.
message
());
// return ResponseEntity.status(response.code()).body(response.message());
}
if
(
"/base/matter/channel/interlist"
.
equals
(
path
))
{
JSONObject
rspJson
=
JSON
.
parseObject
(
response
.
body
().
string
());
JSONObject
data
=
rspJson
.
getJSONObject
(
"data"
);
JSONArray
dataJSONArray
=
data
.
getJSONArray
(
"data"
);
for
(
int
i
=
0
;
i
<
dataJSONArray
.
size
();
i
++)
{
JSONObject
jsonObject
=
dataJSONArray
.
getJSONObject
(
i
);
String
icon
=
jsonObject
.
getString
(
"icon"
);
if
(!
ObjectUtils
.
isEmpty
(
icon
)
&&
icon
.
startsWith
(
"/file"
))
{
String
filePath
=
uploadService
.
getFilePath
(
icon
);
String
base64Str
=
Base64
.
encode
(
new
File
(
filePath
));
log
.
info
(
"base64Str:{}"
,
base64Str
);
jsonObject
.
put
(
"icon"
,
base64Str
);
}
String
qrCode
=
jsonObject
.
getString
(
"qrCode"
);
if
(!
ObjectUtils
.
isEmpty
(
qrCode
)
&&
qrCode
.
startsWith
(
"/file"
))
{
String
filePath
=
uploadService
.
getFilePath
(
qrCode
);
String
base64Str
=
Base64
.
encode
(
new
File
(
filePath
));
log
.
info
(
"base64Str:{}"
,
base64Str
);
jsonObject
.
put
(
"qrCode"
,
base64Str
);
}
}
return
Rest
.
ok
(
"透传请求成功!"
,
rspJson
.
toJSONString
());
}
return
Rest
.
ok
(
"透传请求成功!"
,
response
.
body
().
string
());
// return ResponseEntity.status(response.code()).body(response.body().string());
...
...
@@ -196,8 +227,6 @@ public class ProxyController {
JSONObject
rspJson
=
JSON
.
parseObject
(
resp
);
JSONObject
data
=
rspJson
.
getJSONObject
(
"data"
);
String
tid
=
data
.
getString
(
"tid"
);
if
(!
ObjectUtils
.
isEmpty
(
tid
)
&&
tid
.
startsWith
(
"/file"
))
{
...
...
@@ -211,11 +240,8 @@ public class ProxyController {
return
Rest
.
ok
(
"透传请求成功!"
,
rspJson
.
toJSONString
());
}
}
// rspJson.get
//String resp = HttpUtil.get(urlGet);
return
Rest
.
ok
(
"透传请求成功!"
,
resp
);
...
...
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