Compare commits

...

1 Commits

Author SHA1 Message Date
曾文豪
6127cd50a9 publish 2.0.0.rc10 2024-07-29 09:53:44 +08:00
14 changed files with 46 additions and 48 deletions

22
pom.xml
View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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());
}

View File

@@ -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;
}
}

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>