publish 2.0.0.rc10
This commit is contained in:
22
pom.xml
22
pom.xml
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>springboot-parent</name>
|
||||
<description>杭州铁晟科技有限公司基础依赖</description>
|
||||
@@ -58,61 +58,61 @@
|
||||
<dependency>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-database</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-login</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-web</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-util</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-platform</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-message</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-encrypt</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-role</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-annotation</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-poi</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
<parent>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-ademo</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-annotation</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-database</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-encrypt</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-login</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-message</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-platform</artifactId>
|
||||
|
||||
@@ -79,10 +79,12 @@ public class PlatformDingConfig {
|
||||
HttpResponse execute = request.execute();
|
||||
|
||||
if (execute.isOk()) {
|
||||
DingResponse<T> bean = JSONUtil.toBean(execute.body(), typeReference, true);
|
||||
String rawBody = execute.body();
|
||||
DingResponse<T> bean = JSONUtil.toBean(rawBody, typeReference, true);
|
||||
if (!bean.isOk()) {
|
||||
LogFactory.get().info(bean.getErrmsg());
|
||||
}
|
||||
bean.setRawBody(rawBody);
|
||||
return bean;
|
||||
}
|
||||
|
||||
@@ -137,7 +139,8 @@ public class PlatformDingConfig {
|
||||
if (!respJson.isOk()) {
|
||||
throw new ApiException(respJson.getErrmsg());
|
||||
}
|
||||
jsapiTicket = respJson.getTicket();
|
||||
|
||||
jsapiTicket = respJson.getRawValue("ticket", String.class);
|
||||
TsCacheService.of().put(CACHE_JSAPI_TICKET + dingConfigBean.getAppKey(),
|
||||
jsapiTicket, respJson.getExpiresIn());
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package com.tiesheng.platform.config.ding.bean;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class DingResponse<T> {
|
||||
|
||||
private String errcode;
|
||||
private String errmsg;
|
||||
private String ticket;
|
||||
private String taskId;
|
||||
private String requestId;
|
||||
private Long expiresIn;
|
||||
private T result;
|
||||
private String rawBody;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 逻辑方法
|
||||
@@ -20,6 +20,17 @@ public class DingResponse<T> {
|
||||
return Objects.equals(errcode, "0");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 从原始数据中获取值
|
||||
*
|
||||
* @param path
|
||||
* @return
|
||||
*/
|
||||
public T getRawValue(String path, Class<T> tClass) {
|
||||
return JSONUtil.parse(getRawBody()).getByPath(path, tClass);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// setter\getter
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -48,14 +59,6 @@ public class DingResponse<T> {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public String getTicket() {
|
||||
return ticket;
|
||||
}
|
||||
|
||||
public void setTicket(String ticket) {
|
||||
this.ticket = ticket;
|
||||
}
|
||||
|
||||
public Long getExpiresIn() {
|
||||
return expiresIn;
|
||||
}
|
||||
@@ -64,19 +67,11 @@ public class DingResponse<T> {
|
||||
this.expiresIn = expiresIn;
|
||||
}
|
||||
|
||||
public String getTaskId() {
|
||||
return taskId;
|
||||
public String getRawBody() {
|
||||
return rawBody;
|
||||
}
|
||||
|
||||
public void setTaskId(String taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getRequestId() {
|
||||
return requestId;
|
||||
}
|
||||
|
||||
public void setRequestId(String requestId) {
|
||||
this.requestId = requestId;
|
||||
public void setRawBody(String rawBody) {
|
||||
this.rawBody = rawBody;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-poi</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-role</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-util</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>2.0.0.rc9</version>
|
||||
<version>2.0.0.rc10</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-web</artifactId>
|
||||
|
||||
Reference in New Issue
Block a user