mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 15:55:18 +08:00
完善第三方账号管理
This commit is contained in:
8
pom.xml
8
pom.xml
@@ -69,6 +69,14 @@
|
|||||||
<version>13.2.1</version>
|
<version>13.2.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- https://mvnrepository.com/artifact/io.github.openfeign/feign-jackson -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.github.openfeign</groupId>
|
||||||
|
<artifactId>feign-jackson</artifactId>
|
||||||
|
<version>13.2.1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.lionsoul</groupId>
|
<groupId>org.lionsoul</groupId>
|
||||||
<artifactId>ip2region</artifactId>
|
<artifactId>ip2region</artifactId>
|
||||||
|
|||||||
@@ -2,7 +2,11 @@ package cn.lihongjie.coal.emDevice;
|
|||||||
|
|
||||||
import cn.lihongjie.coal.emDevice.client.DustApi;
|
import cn.lihongjie.coal.emDevice.client.DustApi;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
import feign.Feign;
|
import feign.Feign;
|
||||||
|
import feign.jackson.JacksonDecoder;
|
||||||
|
import feign.jackson.JacksonEncoder;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
@@ -15,11 +19,16 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
DustConfig dustConfig;
|
DustConfig dustConfig;
|
||||||
|
@Autowired ObjectMapper objectMapper;
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
DustApi dustApi(){
|
DustApi dustApi(){
|
||||||
|
|
||||||
DustApi target = Feign.builder().target(DustApi.class, dustConfig.getUrl());
|
DustApi target = Feign.builder()
|
||||||
|
.encoder(new JacksonEncoder(objectMapper))
|
||||||
|
.decoder(new JacksonDecoder(objectMapper))
|
||||||
|
|
||||||
|
.target(DustApi.class, dustConfig.getUrl());
|
||||||
log.info("dust api url: {}", dustConfig.getUrl());
|
log.info("dust api url: {}", dustConfig.getUrl());
|
||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ import lombok.Data;
|
|||||||
import org.hibernate.annotations.Comment;
|
import org.hibernate.annotations.Comment;
|
||||||
import org.hibernate.annotations.Formula;
|
import org.hibernate.annotations.Formula;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class CreateThirdAccountDto extends OrgCommonDto {
|
public class CreateThirdAccountDto extends OrgCommonDto {
|
||||||
|
|
||||||
@@ -30,24 +28,10 @@ public class CreateThirdAccountDto extends OrgCommonDto {
|
|||||||
@Comment("密码")
|
@Comment("密码")
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
@Comment("token")
|
|
||||||
private String token;
|
|
||||||
|
|
||||||
@Comment("token过期时间(分钟)")
|
@Comment("token过期时间(分钟)")
|
||||||
private Long tokenExpireMinute;
|
private Long tokenExpireMinute;
|
||||||
|
|
||||||
@Comment("token过期时间")
|
|
||||||
private LocalDateTime tokenExpireTime;
|
|
||||||
|
|
||||||
@Comment("token下次刷新时间")
|
|
||||||
private LocalDateTime tokenNextRefreshTime;
|
|
||||||
|
|
||||||
@Comment("token刷新时间")
|
|
||||||
private LocalDateTime tokenRefreshTime;
|
|
||||||
|
|
||||||
@Comment("token刷新次数")
|
|
||||||
private Integer tokenRefreshCount;
|
|
||||||
|
|
||||||
@Comment("token刷新错误信息")
|
|
||||||
private String tokenRefreshError;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ import lombok.Data;
|
|||||||
import org.hibernate.annotations.Comment;
|
import org.hibernate.annotations.Comment;
|
||||||
import org.hibernate.annotations.Formula;
|
import org.hibernate.annotations.Formula;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class UpdateThirdAccountDto extends OrgCommonDto {
|
public class UpdateThirdAccountDto extends OrgCommonDto {
|
||||||
@Comment("账号类型")
|
@Comment("账号类型")
|
||||||
@@ -29,24 +27,9 @@ public class UpdateThirdAccountDto extends OrgCommonDto {
|
|||||||
@Comment("密码")
|
@Comment("密码")
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
@Comment("token")
|
|
||||||
private String token;
|
|
||||||
|
|
||||||
@Comment("token过期时间(分钟)")
|
@Comment("token过期时间(分钟)")
|
||||||
private Long tokenExpireMinute;
|
private Long tokenExpireMinute;
|
||||||
|
|
||||||
@Comment("token过期时间")
|
|
||||||
private LocalDateTime tokenExpireTime;
|
|
||||||
|
|
||||||
@Comment("token下次刷新时间")
|
|
||||||
private LocalDateTime tokenNextRefreshTime;
|
|
||||||
|
|
||||||
@Comment("token刷新时间")
|
|
||||||
private LocalDateTime tokenRefreshTime;
|
|
||||||
|
|
||||||
@Comment("token刷新次数")
|
|
||||||
private Integer tokenRefreshCount;
|
|
||||||
|
|
||||||
@Comment("token刷新错误信息")
|
|
||||||
private String tokenRefreshError;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -325,3 +325,6 @@ aliyun:
|
|||||||
code: oss-rg-china-mainland
|
code: oss-rg-china-mainland
|
||||||
endpoint : oss-rg-china-mainland.aliyuncs.com
|
endpoint : oss-rg-china-mainland.aliyuncs.com
|
||||||
internal-endpoint: 不支持
|
internal-endpoint: 不支持
|
||||||
|
dust:
|
||||||
|
url: "http://dust.0531yun.cn/"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user