Commit 34c1b902 authored by liuzicheng's avatar liuzicheng

初始化项目

parent 78b5a42a
......@@ -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>
......
......@@ -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);
}
......
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;
}
}
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