Commit 34c1b902 authored by liuzicheng's avatar liuzicheng

初始化项目

parent 78b5a42a
...@@ -39,12 +39,12 @@ ...@@ -39,12 +39,12 @@
<dependency> <dependency>
<groupId>com.jqtx.infrastructure</groupId> <groupId>com.jqtx.infrastructure</groupId>
<artifactId>infrastructure-oss-starter</artifactId> <artifactId>infrastructure-oss-starter</artifactId>
<version>0.0.2-SNAPSHOT</version> <version>0.0.4-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.jqtx.infrastructure</groupId> <groupId>com.jqtx.infrastructure</groupId>
<artifactId>infrastructure-core</artifactId> <artifactId>infrastructure-core</artifactId>
<version>0.0.2-SNAPSHOT</version> <version>0.0.4-SNAPSHOT</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
...@@ -56,19 +56,19 @@ ...@@ -56,19 +56,19 @@
<dependency> <dependency>
<groupId>com.jqtx.infrastructure</groupId> <groupId>com.jqtx.infrastructure</groupId>
<artifactId>infrastructure-mybatis-starter</artifactId> <artifactId>infrastructure-mybatis-starter</artifactId>
<version>0.0.2-SNAPSHOT</version> <version>0.0.4-SNAPSHOT</version>
</dependency> </dependency>
<!-- 支持mq 基础包 --> <!-- 支持mq 基础包 -->
<dependency> <dependency>
<groupId>com.jqtx.infrastructure</groupId> <groupId>com.jqtx.infrastructure</groupId>
<artifactId>infrastructure-mq-starter</artifactId> <artifactId>infrastructure-mq-starter</artifactId>
<version>0.0.3-SNAPSHOT</version> <version>0.0.4-SNAPSHOT</version>
</dependency> </dependency>
<!-- 支持oss 基础包 --> <!-- 支持oss 基础包 -->
<dependency> <dependency>
<groupId>com.jqtx.infrastructure</groupId> <groupId>com.jqtx.infrastructure</groupId>
<artifactId>infrastructure-oss-starter</artifactId> <artifactId>infrastructure-oss-starter</artifactId>
<version>0.0.2-SNAPSHOT</version> <version>0.0.4-SNAPSHOT</version>
</dependency> </dependency>
<!--swagger--> <!--swagger-->
<dependency> <dependency>
......
...@@ -9,6 +9,7 @@ import com.jqtx.windows.utils.AbcRsaUtil; ...@@ -9,6 +9,7 @@ import com.jqtx.windows.utils.AbcRsaUtil;
import com.jqtx.windows.web.config.RouterConfig; import com.jqtx.windows.web.config.RouterConfig;
import com.jqtx.windows.web.response.JsonResult; import com.jqtx.windows.web.response.JsonResult;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -31,8 +32,9 @@ public class CommandProxy { ...@@ -31,8 +32,9 @@ public class CommandProxy {
} }
ChannelConfig channelConfig = new ChannelConfig(); ChannelConfig channelConfig = new ChannelConfig();
channelConfig.setAppId("9999999"); channelConfig.setAppId("9999999");
this.setLocalContext(request,channelConfig); String test = StringEscapeUtils.unescapeJava(request);
log.info("[浙农请求request:处理:{}------------>{}]",command.getClass().getSimpleName(),request); this.setLocalContext(test,channelConfig);
log.info("[浙农请求request:处理:{}------------>{}]",command.getClass().getSimpleName(),test);
JsonResult result = command.doAction(); JsonResult result = command.doAction();
log.info("[浙农请求response:处理:{}=============>{}]",command.getClass().getSimpleName(),JSON.toJSONString(result)); log.info("[浙农请求response:处理:{}=============>{}]",command.getClass().getSimpleName(),JSON.toJSONString(result));
return result; return result;
...@@ -47,7 +49,7 @@ public class CommandProxy { ...@@ -47,7 +49,7 @@ public class CommandProxy {
String requestBody = jsonObject.getString("content"); String requestBody = jsonObject.getString("content");
String sign = jsonObject.getString("sign"); String sign = jsonObject.getString("sign");
String appId = jsonObject.getString("appId"); 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)){ if(StringUtils.isBlank(decodeBody)){
return JsonResult.error(ExceptionCodeEnum.SYSTEM_AUTH_ERROR); return JsonResult.error(ExceptionCodeEnum.SYSTEM_AUTH_ERROR);
} }
......
package com.jqtx.windows.common.factory; package com.jqtx.windows.common.factory;
import com.alibaba.fastjson.JSON;
import lombok.Data; import lombok.Data;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
@Slf4j @Slf4j
@Data @Data
...@@ -12,11 +10,4 @@ public class RuntimeContext { ...@@ -12,11 +10,4 @@ public class RuntimeContext {
private String requestBody; private String requestBody;
private ChannelConfig channelConfig; private ChannelConfig channelConfig;
public String getRequestBody() {
if(StringUtils.isNotBlank(requestBody)) {
return JSON.parseObject(requestBody).toJSONString();
}
return null;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment