publish 2.0.0.rc10

This commit is contained in:
曾文豪
2024-07-29 09:53:44 +08:00
parent 19f4d0395e
commit 6127cd50a9
14 changed files with 46 additions and 48 deletions

22
pom.xml
View File

@@ -6,7 +6,7 @@
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>springboot-parent</name> <name>springboot-parent</name>
<description>杭州铁晟科技有限公司基础依赖</description> <description>杭州铁晟科技有限公司基础依赖</description>
@@ -58,61 +58,61 @@
<dependency> <dependency>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-database</artifactId> <artifactId>springboot-database</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-login</artifactId> <artifactId>springboot-login</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-web</artifactId> <artifactId>springboot-web</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-util</artifactId> <artifactId>springboot-util</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-platform</artifactId> <artifactId>springboot-platform</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-message</artifactId> <artifactId>springboot-message</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-encrypt</artifactId> <artifactId>springboot-encrypt</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-role</artifactId> <artifactId>springboot-role</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-annotation</artifactId> <artifactId>springboot-annotation</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-poi</artifactId> <artifactId>springboot-poi</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@@ -6,11 +6,11 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
</parent> </parent>
<artifactId>springboot-ademo</artifactId> <artifactId>springboot-ademo</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
<properties> <properties>
<maven.compiler.source>8</maven.compiler.source> <maven.compiler.source>8</maven.compiler.source>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
</parent> </parent>
<artifactId>springboot-annotation</artifactId> <artifactId>springboot-annotation</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
</parent> </parent>
<artifactId>springboot-database</artifactId> <artifactId>springboot-database</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
</parent> </parent>
<artifactId>springboot-encrypt</artifactId> <artifactId>springboot-encrypt</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
</parent> </parent>
<artifactId>springboot-login</artifactId> <artifactId>springboot-login</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
</parent> </parent>
<artifactId>springboot-message</artifactId> <artifactId>springboot-message</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
</parent> </parent>
<artifactId>springboot-platform</artifactId> <artifactId>springboot-platform</artifactId>

View File

@@ -79,10 +79,12 @@ public class PlatformDingConfig {
HttpResponse execute = request.execute(); HttpResponse execute = request.execute();
if (execute.isOk()) { 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()) { if (!bean.isOk()) {
LogFactory.get().info(bean.getErrmsg()); LogFactory.get().info(bean.getErrmsg());
} }
bean.setRawBody(rawBody);
return bean; return bean;
} }
@@ -137,7 +139,8 @@ public class PlatformDingConfig {
if (!respJson.isOk()) { if (!respJson.isOk()) {
throw new ApiException(respJson.getErrmsg()); throw new ApiException(respJson.getErrmsg());
} }
jsapiTicket = respJson.getTicket();
jsapiTicket = respJson.getRawValue("ticket", String.class);
TsCacheService.of().put(CACHE_JSAPI_TICKET + dingConfigBean.getAppKey(), TsCacheService.of().put(CACHE_JSAPI_TICKET + dingConfigBean.getAppKey(),
jsapiTicket, respJson.getExpiresIn()); jsapiTicket, respJson.getExpiresIn());
} }

View File

@@ -1,16 +1,16 @@
package com.tiesheng.platform.config.ding.bean; package com.tiesheng.platform.config.ding.bean;
import cn.hutool.json.JSONUtil;
import java.util.Objects; import java.util.Objects;
public class DingResponse<T> { public class DingResponse<T> {
private String errcode; private String errcode;
private String errmsg; private String errmsg;
private String ticket;
private String taskId;
private String requestId;
private Long expiresIn; private Long expiresIn;
private T result; private T result;
private String rawBody;
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// 逻辑方法 // 逻辑方法
@@ -20,6 +20,17 @@ public class DingResponse<T> {
return Objects.equals(errcode, "0"); 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 // setter\getter
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
@@ -48,14 +59,6 @@ public class DingResponse<T> {
this.result = result; this.result = result;
} }
public String getTicket() {
return ticket;
}
public void setTicket(String ticket) {
this.ticket = ticket;
}
public Long getExpiresIn() { public Long getExpiresIn() {
return expiresIn; return expiresIn;
} }
@@ -64,19 +67,11 @@ public class DingResponse<T> {
this.expiresIn = expiresIn; this.expiresIn = expiresIn;
} }
public String getTaskId() { public String getRawBody() {
return taskId; return rawBody;
} }
public void setTaskId(String taskId) { public void setRawBody(String rawBody) {
this.taskId = taskId; this.rawBody = rawBody;
}
public String getRequestId() {
return requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
} }
} }

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
</parent> </parent>
<artifactId>springboot-poi</artifactId> <artifactId>springboot-poi</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
</parent> </parent>
<artifactId>springboot-role</artifactId> <artifactId>springboot-role</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
</parent> </parent>
<artifactId>springboot-util</artifactId> <artifactId>springboot-util</artifactId>

View File

@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.tiesheng.springboot-parent</groupId> <groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId> <artifactId>springboot-parent</artifactId>
<version>2.0.0.rc9</version> <version>2.0.0.rc10</version>
</parent> </parent>
<artifactId>springboot-web</artifactId> <artifactId>springboot-web</artifactId>