Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
windows
Project
Project
Details
Activity
Releases
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
zhanhai
windows
Commits
34c1b902
Commit
34c1b902
authored
Oct 19, 2023
by
liuzicheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初始化项目
parent
78b5a42a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
17 deletions
+10
-17
pom.xml
pom.xml
+5
-5
CommandProxy.java
...in/java/com/jqtx/windows/common/factory/CommandProxy.java
+5
-3
RuntimeContext.java
.../java/com/jqtx/windows/common/factory/RuntimeContext.java
+0
-9
No files found.
pom.xml
View file @
34c1b902
...
...
@@ -39,12 +39,12 @@
<dependency>
<groupId>
com.jqtx.infrastructure
</groupId>
<artifactId>
infrastructure-oss-starter
</artifactId>
<version>
0.0.
2
-SNAPSHOT
</version>
<version>
0.0.
4
-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.jqtx.infrastructure
</groupId>
<artifactId>
infrastructure-core
</artifactId>
<version>
0.0.
2
-SNAPSHOT
</version>
<version>
0.0.
4
-SNAPSHOT
</version>
<exclusions>
<exclusion>
<groupId>
org.springframework.cloud
</groupId>
...
...
@@ -56,19 +56,19 @@
<dependency>
<groupId>
com.jqtx.infrastructure
</groupId>
<artifactId>
infrastructure-mybatis-starter
</artifactId>
<version>
0.0.
2
-SNAPSHOT
</version>
<version>
0.0.
4
-SNAPSHOT
</version>
</dependency>
<!-- 支持mq 基础包 -->
<dependency>
<groupId>
com.jqtx.infrastructure
</groupId>
<artifactId>
infrastructure-mq-starter
</artifactId>
<version>
0.0.
3
-SNAPSHOT
</version>
<version>
0.0.
4
-SNAPSHOT
</version>
</dependency>
<!-- 支持oss 基础包 -->
<dependency>
<groupId>
com.jqtx.infrastructure
</groupId>
<artifactId>
infrastructure-oss-starter
</artifactId>
<version>
0.0.
2
-SNAPSHOT
</version>
<version>
0.0.
4
-SNAPSHOT
</version>
</dependency>
<!--swagger-->
<dependency>
...
...
src/main/java/com/jqtx/windows/common/factory/CommandProxy.java
View file @
34c1b902
...
...
@@ -9,6 +9,7 @@ import com.jqtx.windows.utils.AbcRsaUtil;
import
com.jqtx.windows.web.config.RouterConfig
;
import
com.jqtx.windows.web.response.JsonResult
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringEscapeUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
...
...
@@ -31,8 +32,9 @@ public class CommandProxy {
}
ChannelConfig
channelConfig
=
new
ChannelConfig
();
channelConfig
.
setAppId
(
"9999999"
);
this
.
setLocalContext
(
request
,
channelConfig
);
log
.
info
(
"[浙农请求request:处理:{}------------>{}]"
,
command
.
getClass
().
getSimpleName
(),
request
);
String
test
=
StringEscapeUtils
.
unescapeJava
(
request
);
this
.
setLocalContext
(
test
,
channelConfig
);
log
.
info
(
"[浙农请求request:处理:{}------------>{}]"
,
command
.
getClass
().
getSimpleName
(),
test
);
JsonResult
result
=
command
.
doAction
();
log
.
info
(
"[浙农请求response:处理:{}=============>{}]"
,
command
.
getClass
().
getSimpleName
(),
JSON
.
toJSONString
(
result
));
return
result
;
...
...
@@ -47,7 +49,7 @@ public class CommandProxy {
String
requestBody
=
jsonObject
.
getString
(
"content"
);
String
sign
=
jsonObject
.
getString
(
"sign"
);
String
appId
=
jsonObject
.
getString
(
"appId"
);
String
decodeBody
=
AbcRsaUtil
.
decodeParam
(
requestBody
,
sign
,
YyPpivateKey
,
publicKey
);
String
decodeBody
=
StringEscapeUtils
.
unescapeJava
(
AbcRsaUtil
.
decodeParam
(
requestBody
,
sign
,
YyPpivateKey
,
publicKey
)
);
if
(
StringUtils
.
isBlank
(
decodeBody
)){
return
JsonResult
.
error
(
ExceptionCodeEnum
.
SYSTEM_AUTH_ERROR
);
}
...
...
src/main/java/com/jqtx/windows/common/factory/RuntimeContext.java
View file @
34c1b902
package
com
.
jqtx
.
windows
.
common
.
factory
;
import
com.alibaba.fastjson.JSON
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
@Slf4j
@Data
...
...
@@ -12,11 +10,4 @@ public class RuntimeContext {
private
String
requestBody
;
private
ChannelConfig
channelConfig
;
public
String
getRequestBody
()
{
if
(
StringUtils
.
isNotBlank
(
requestBody
))
{
return
JSON
.
parseObject
(
requestBody
).
toJSONString
();
}
return
null
;
}
}
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