Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
4b003875
提交
4b003875
authored
2月 26, 2019
作者:
YunaiV
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
去除全局的数据格式化,统一后续使用 CommonResult
ps:全局的格式化,也会格式化掉 swagger 的返回,会导致 swagger 无法使用的问题的。
上级
6cbce274
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
218 行增加
和
103 行删除
+218
-103
GlobalResponseBodyAdvice.java
...der/common/framework/config/GlobalResponseBodyAdvice.java
+0
-32
MVCConfiguration.java
...n/java/cn/iocoder/mall/order/config/MVCConfiguration.java
+37
-0
SwaggerConfiguration.java
...va/cn/iocoder/mall/order/config/SwaggerConfiguration.java
+37
-0
MVCConfiguration.java
...java/cn/iocoder/mall/product/config/MVCConfiguration.java
+10
-4
ProductCategoryController.java
...ll/product/controller/user/ProductCategoryController.java
+1
-1
application.yaml
...t/product-application/src/main/resources/application.yaml
+1
-1
pom.xml
user/user-application/pom.xml
+1
-1
UserApplication.java
...n/src/main/java/cn/iocoder/mall/user/UserApplication.java
+1
-1
MVCConfiguration.java
...in/java/cn/iocoder/mall/user/config/MVCConfiguration.java
+11
-3
SwaggerConfiguration.java
...ava/cn/iocoder/mall/user/config/SwaggerConfiguration.java
+37
-0
PassportController.java
...a/cn/iocoder/mall/user/controller/PassportController.java
+16
-60
PassportConvert.java
...in/java/cn/iocoder/mall/user/convert/PassportConvert.java
+22
-0
MobileRegisterVO.java
...c/main/java/cn/iocoder/mall/user/vo/MobileRegisterVO.java
+44
-0
没有找到文件。
common/common-framework/src/main/java/cn/iocoder/common/framework/config/GlobalResponseBodyAdvice.java
deleted
100644 → 0
浏览文件 @
6cbce274
package
cn
.
iocoder
.
common
.
framework
.
config
;
import
cn.iocoder.common.framework.vo.CommonResult
;
import
cn.iocoder.common.framework.vo.RestResult
;
import
org.springframework.core.MethodParameter
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.server.ServerHttpRequest
;
import
org.springframework.http.server.ServerHttpResponse
;
import
org.springframework.web.bind.annotation.ControllerAdvice
;
import
org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice
;
@ControllerAdvice
public
class
GlobalResponseBodyAdvice
implements
ResponseBodyAdvice
{
@Override
public
boolean
supports
(
MethodParameter
returnType
,
Class
converterType
)
{
return
true
;
// TODO 芋艿,未来,这里可以剔除掉一些,需要特殊返回的接口
}
@Override
public
Object
beforeBodyWrite
(
Object
body
,
MethodParameter
returnType
,
MediaType
selectedContentType
,
Class
selectedConverterType
,
ServerHttpRequest
request
,
ServerHttpResponse
response
)
{
if
(
body
instanceof
RestResult
)
{
return
body
;
}
if
(
body
instanceof
CommonResult
)
{
// TODO 芋艿,后续要改下
return
body
;
}
return
RestResult
.
ok
(
body
);
}
}
\ No newline at end of file
order/order-application/src/main/java/cn/iocoder/mall/order/config/MVCConfiguration.java
0 → 100644
浏览文件 @
4b003875
package
cn
.
iocoder
.
mall
.
order
.
config
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.servlet.config.annotation.*
;
@EnableWebMvc
@Configuration
public
class
MVCConfiguration
implements
WebMvcConfigurer
{
// @Autowired
// private SecurityInterceptor securityInterceptor;
// @Reference
// private OAuth2Service oauth2Service;
@Override
public
void
addInterceptors
(
InterceptorRegistry
registry
)
{
// registry.addInterceptor(securityInterceptor);
}
// @Override
// public void addViewControllers(ViewControllerRegistry registry) {
// registry.addRedirectViewController("/api/v2/api-docs", "/v2/api-docs");
// registry.addRedirectViewController("/api/swagger-resources/configuration/ui", "/swagger-resources/configuration/ui");
// registry.addRedirectViewController("/api/swagger-resources/configuration/security", "/swagger-resources/configuration/security");
// registry.addRedirectViewController("/api/swagger-resources", "/swagger-resources");
// }
@Override
public
void
addResourceHandlers
(
ResourceHandlerRegistry
registry
)
{
// 解决 swagger-ui.html 的访问,参考自 https://stackoverflow.com/questions/43545540/swagger-ui-no-mapping-found-for-http-request 解决
registry
.
addResourceHandler
(
"swagger-ui.html**"
).
addResourceLocations
(
"classpath:/META-INF/resources/swagger-ui.html"
);
registry
.
addResourceHandler
(
"webjars/**"
).
addResourceLocations
(
"classpath:/META-INF/resources/webjars/"
);
}
}
\ No newline at end of file
order/order-application/src/main/java/cn/iocoder/mall/order/config/SwaggerConfiguration.java
0 → 100644
浏览文件 @
4b003875
package
cn
.
iocoder
.
mall
.
order
.
config
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
springfox.documentation.builders.ApiInfoBuilder
;
import
springfox.documentation.builders.PathSelectors
;
import
springfox.documentation.builders.RequestHandlerSelectors
;
import
springfox.documentation.service.ApiInfo
;
import
springfox.documentation.spi.DocumentationType
;
import
springfox.documentation.spring.web.plugins.Docket
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
@Configuration
@EnableSwagger2
public
class
SwaggerConfiguration
{
@Bean
public
Docket
createRestApi
()
{
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
.
apiInfo
(
apiInfo
())
.
select
()
.
apis
(
RequestHandlerSelectors
.
basePackage
(
"cn.iocoder.mall.order.controller"
))
.
paths
(
PathSelectors
.
any
())
.
build
();
}
private
ApiInfo
apiInfo
()
{
return
new
ApiInfoBuilder
()
.
title
(
"订单子系统"
)
.
description
(
"订单子系统"
)
.
termsOfServiceUrl
(
"http://www.iocoder.cn"
)
.
version
(
"1.0.0"
)
.
build
();
}
}
\ No newline at end of file
product/product-application/src/main/java/cn/iocoder/mall/product/config/MVCConfiguration.java
浏览文件 @
4b003875
package
cn
.
iocoder
.
mall
.
product
.
config
;
package
cn
.
iocoder
.
mall
.
product
.
config
;
import
cn.iocoder.common.framework.config.GlobalExceptionHandler
;
import
cn.iocoder.common.framework.config.GlobalResponseBodyAdvice
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Import
;
import
org.springframework.web.servlet.config.annotation.EnableWebMvc
;
import
org.springframework.web.servlet.config.annotation.EnableWebMvc
;
import
org.springframework.web.servlet.config.annotation.InterceptorRegistry
;
import
org.springframework.web.servlet.config.annotation.InterceptorRegistry
;
import
org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
@EnableWebMvc
@EnableWebMvc
@Configuration
@Configuration
@Import
(
value
=
{
GlobalResponseBodyAdvice
.
class
,
GlobalExceptionHandler
.
class
})
// 统一全局返回
//@Import(value = {
GlobalExceptionHandler.class}) // 统一全局返回
public
class
MVCConfiguration
implements
WebMvcConfigurer
{
public
class
MVCConfiguration
implements
WebMvcConfigurer
{
// @Autowired
// @Autowired
...
@@ -24,4 +22,11 @@ public class MVCConfiguration implements WebMvcConfigurer {
...
@@ -24,4 +22,11 @@ public class MVCConfiguration implements WebMvcConfigurer {
// registry.addInterceptor(securityInterceptor);
// registry.addInterceptor(securityInterceptor);
}
}
@Override
public
void
addResourceHandlers
(
ResourceHandlerRegistry
registry
)
{
// 解决 swagger-ui.html 的访问,参考自 https://stackoverflow.com/questions/43545540/swagger-ui-no-mapping-found-for-http-request 解决
registry
.
addResourceHandler
(
"swagger-ui.html**"
).
addResourceLocations
(
"classpath:/META-INF/resources/swagger-ui.html"
);
registry
.
addResourceHandler
(
"webjars/**"
).
addResourceLocations
(
"classpath:/META-INF/resources/webjars/"
);
}
}
}
\ No newline at end of file
product/product-application/src/main/java/cn/iocoder/mall/product/controller/user/ProductCategoryController.java
浏览文件 @
4b003875
...
@@ -24,7 +24,7 @@ public class ProductCategoryController {
...
@@ -24,7 +24,7 @@ public class ProductCategoryController {
@GetMapping
@GetMapping
@ApiOperation
(
"获得指定编号下的子分类的数组"
)
@ApiOperation
(
"获得指定编号下的子分类的数组"
)
@ApiImplicitParam
(
name
=
"pid"
,
value
=
"指定分类编号"
,
required
=
true
)
@ApiImplicitParam
(
name
=
"pid"
,
value
=
"指定分类编号"
,
required
=
true
,
example
=
"0"
)
public
List
<
ProductCategoryVO
>
list
(
@RequestParam
(
"pid"
)
Integer
pid
)
{
public
List
<
ProductCategoryVO
>
list
(
@RequestParam
(
"pid"
)
Integer
pid
)
{
return
ProductCategoryConvert
.
INSTANCE
.
convertToVO
(
return
ProductCategoryConvert
.
INSTANCE
.
convertToVO
(
productCategoryService
.
getListByPid
(
pid
)
productCategoryService
.
getListByPid
(
pid
)
...
...
product/product-application/src/main/resources/application.yaml
浏览文件 @
4b003875
...
@@ -10,7 +10,7 @@ spring:
...
@@ -10,7 +10,7 @@ spring:
# server
# server
server
:
server
:
port
:
808
0
port
:
808
1
# mybatis
# mybatis
mybatis
:
mybatis
:
...
...
user/user-application/pom.xml
浏览文件 @
4b003875
...
@@ -68,7 +68,6 @@
...
@@ -68,7 +68,6 @@
<version>
${org.mapstruct.version}
</version>
<version>
${org.mapstruct.version}
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
<artifactId>
springfox-swagger2
</artifactId>
...
@@ -79,6 +78,7 @@
...
@@ -79,6 +78,7 @@
<artifactId>
springfox-swagger-ui
</artifactId>
<artifactId>
springfox-swagger-ui
</artifactId>
<version>
2.9.2
</version>
<version>
2.9.2
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
cn.iocoder.mall
</groupId>
<groupId>
cn.iocoder.mall
</groupId>
<artifactId>
user-service-api
</artifactId>
<artifactId>
user-service-api
</artifactId>
...
...
user/user-application/src/main/java/cn/iocoder/mall/user/UserApplication.java
浏览文件 @
4b003875
...
@@ -3,7 +3,7 @@ package cn.iocoder.mall.user;
...
@@ -3,7 +3,7 @@ package cn.iocoder.mall.user;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
@SpringBootApplication
(
scanBasePackages
=
"cn.iocoder.mall.user"
)
@SpringBootApplication
(
scanBasePackages
=
{
"cn.iocoder.mall.user"
}
)
public
class
UserApplication
{
public
class
UserApplication
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
...
...
user/user-application/src/main/java/cn/iocoder/mall/user/config/MVCConfiguration.java
浏览文件 @
4b003875
package
cn
.
iocoder
.
mall
.
user
.
config
;
package
cn
.
iocoder
.
mall
.
user
.
config
;
import
cn.iocoder.common.framework.config.GlobalExceptionHandler
;
import
cn.iocoder.common.framework.config.GlobalExceptionHandler
;
import
cn.iocoder.common.framework.config.GlobalResponseBodyAdvice
;
import
cn.iocoder.mall.user.sdk.interceptor.SecurityInterceptor
;
import
cn.iocoder.mall.user.sdk.interceptor.SecurityInterceptor
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Import
;
import
org.springframework.context.annotation.Import
;
import
org.springframework.web.servlet.config.annotation.EnableWebMvc
;
import
org.springframework.web.servlet.config.annotation.EnableWebMvc
;
import
org.springframework.web.servlet.config.annotation.InterceptorRegistry
;
import
org.springframework.web.servlet.config.annotation.InterceptorRegistry
;
import
org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
@EnableWebMvc
@EnableWebMvc
@Configuration
@Configuration
@Import
(
value
=
{
Global
ResponseBodyAdvice
.
class
,
Global
ExceptionHandler
.
class
,
// 统一全局返回
@Import
(
value
=
{
GlobalExceptionHandler
.
class
,
// 统一全局返回
SecurityInterceptor
.
class
})
// 安全拦截器,实现认证和授权功能。
SecurityInterceptor
.
class
})
// 安全拦截器,实现认证和授权功能。
public
class
MVCConfiguration
implements
WebMvcConfigurer
{
public
class
MVCConfiguration
implements
WebMvcConfigurer
{
...
@@ -21,7 +21,14 @@ public class MVCConfiguration implements WebMvcConfigurer {
...
@@ -21,7 +21,14 @@ public class MVCConfiguration implements WebMvcConfigurer {
@Override
@Override
public
void
addInterceptors
(
InterceptorRegistry
registry
)
{
public
void
addInterceptors
(
InterceptorRegistry
registry
)
{
registry
.
addInterceptor
(
securityInterceptor
);
// registry.addInterceptor(securityInterceptor).addPathPatterns("/user/**", "/admin/**"); // 只拦截我们定义的接口
}
@Override
public
void
addResourceHandlers
(
ResourceHandlerRegistry
registry
)
{
// 解决 swagger-ui.html 的访问,参考自 https://stackoverflow.com/questions/43545540/swagger-ui-no-mapping-found-for-http-request 解决
registry
.
addResourceHandler
(
"swagger-ui.html**"
).
addResourceLocations
(
"classpath:/META-INF/resources/swagger-ui.html"
);
registry
.
addResourceHandler
(
"webjars/**"
).
addResourceLocations
(
"classpath:/META-INF/resources/webjars/"
);
}
}
}
}
\ No newline at end of file
user/user-application/src/main/java/cn/iocoder/mall/user/config/SwaggerConfiguration.java
0 → 100644
浏览文件 @
4b003875
package
cn
.
iocoder
.
mall
.
user
.
config
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
springfox.documentation.builders.ApiInfoBuilder
;
import
springfox.documentation.builders.PathSelectors
;
import
springfox.documentation.builders.RequestHandlerSelectors
;
import
springfox.documentation.service.ApiInfo
;
import
springfox.documentation.spi.DocumentationType
;
import
springfox.documentation.spring.web.plugins.Docket
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
@Configuration
@EnableSwagger2
public
class
SwaggerConfiguration
{
@Bean
public
Docket
createRestApi
()
{
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
.
apiInfo
(
apiInfo
())
.
select
()
.
apis
(
RequestHandlerSelectors
.
basePackage
(
"cn.iocoder.mall.user.controller"
))
.
paths
(
PathSelectors
.
any
())
.
build
();
}
private
ApiInfo
apiInfo
()
{
return
new
ApiInfoBuilder
()
.
title
(
"用户子系统"
)
.
description
(
"用户子系统"
)
.
termsOfServiceUrl
(
"http://www.iocoder.cn"
)
.
version
(
"1.0.0"
)
.
build
();
}
}
\ No newline at end of file
user/user-application/src/main/java/cn/iocoder/mall/user/controller/PassportController.java
浏览文件 @
4b003875
package
cn
.
iocoder
.
mall
.
user
.
controller
;
package
cn
.
iocoder
.
mall
.
user
.
controller
;
import
cn.iocoder.common.framework.exception.ServiceException
;
import
cn.iocoder.common.framework.util.ExceptionUtil
;
import
cn.iocoder.common.framework.vo.CommonResult
;
import
cn.iocoder.common.framework.vo.CommonResult
;
import
cn.iocoder.mall.user.convert.PassportConvert
;
import
cn.iocoder.mall.user.sdk.annotation.PermitAll
;
import
cn.iocoder.mall.user.sdk.annotation.PermitAll
;
import
cn.iocoder.mall.user.service.api.MobileCodeService
;
import
cn.iocoder.mall.user.service.api.MobileCodeService
;
import
cn.iocoder.mall.user.service.api.OAuth2Service
;
import
cn.iocoder.mall.user.service.api.OAuth2Service
;
import
cn.iocoder.mall.user.service.api.UserService
;
import
cn.iocoder.mall.user.service.api.UserService
;
import
cn.iocoder.mall.user.service.api.bo.OAuth2AccessTokenBO
;
import
cn.iocoder.mall.user.service.api.bo.OAuth2AccessTokenBO
;
import
cn.iocoder.mall.user.
service.api.constant.UserErrorCodeEnum
;
import
cn.iocoder.mall.user.
vo.MobileRegisterVO
;
import
com.alibaba.dubbo.config.annotation.Reference
;
import
com.alibaba.dubbo.config.annotation.Reference
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RestController
@RequestMapping
(
"/passport"
)
@RequestMapping
(
"
user
/passport"
)
public
class
PassportController
{
public
class
PassportController
{
@Reference
@Reference
...
@@ -33,63 +35,17 @@ public class PassportController {
...
@@ -33,63 +35,17 @@ public class PassportController {
// return oauth2Service.getAccessToken(clientId, clientSecret, mobile, password);
// return oauth2Service.getAccessToken(clientId, clientSecret, mobile, password);
// }
// }
/**
* 手机号 + 验证码登陆
*
* @see #mobileRegister2(String, String) 使用替代
*
* @param mobile 手机号
* @param code 验证码
* @return 授权信息
*/
@Deprecated
@PermitAll
@PostMapping
(
"/mobile/login"
)
public
OAuth2AccessTokenBO
mobileRegister
(
@RequestParam
(
"mobile"
)
String
mobile
,
@RequestParam
(
"code"
)
String
code
)
{
// 尝试直接授权
OAuth2AccessTokenBO
accessTokenDTO
;
try
{
accessTokenDTO
=
oauth2Service
.
getAccessToken
(
mobile
,
code
);
return
accessTokenDTO
;
}
catch
(
Exception
ex
)
{
ServiceException
serviceException
=
ExceptionUtil
.
getServiceException
(
ex
);
if
(
serviceException
==
null
)
{
throw
ex
;
}
if
(!
serviceException
.
getCode
().
equals
(
UserErrorCodeEnum
.
USER_MOBILE_NOT_REGISTERED
.
getCode
()))
{
// 如果是未注册异常,忽略。下面发起自动注册逻辑。
throw
serviceException
;
}
}
// 上面尝试授权失败,说明用户未注册,发起自动注册。
try
{
userService
.
createUser
(
mobile
,
code
);
}
catch
(
Exception
ex
)
{
ServiceException
serviceException
=
ExceptionUtil
.
getServiceException
(
ex
);
if
(
serviceException
==
null
)
{
throw
ex
;
}
if
(!
serviceException
.
getCode
().
equals
(
UserErrorCodeEnum
.
USER_MOBILE_ALREADY_REGISTERED
.
getCode
()))
{
// 如果是已注册异常,忽略。下面再次发起授权
throw
serviceException
;
}
}
// 再次发起授权
accessTokenDTO
=
oauth2Service
.
getAccessToken
(
mobile
,
code
);
return
accessTokenDTO
;
}
/**
* 手机号 + 验证码登陆
*
* @param mobile 手机号
* @param code 验证码
* @return 授权信息
*/
@PermitAll
@PermitAll
@PostMapping
(
"/mobile/login2"
)
@PostMapping
(
"/mobile/register"
)
public
CommonResult
<
OAuth2AccessTokenBO
>
mobileRegister2
(
@RequestParam
(
"mobile"
)
String
mobile
,
@ApiOperation
(
value
=
"手机号 + 验证码登陆(注册)"
,
notes
=
"如果手机对应的账号不存在,则会自动创建"
)
@RequestParam
(
"code"
)
String
code
)
{
@ApiImplicitParams
({
return
oauth2Service
.
getAccessToken2
(
mobile
,
code
);
@ApiImplicitParam
(
name
=
"mobile"
,
value
=
"手机号"
,
required
=
true
,
example
=
"15601691300"
),
@ApiImplicitParam
(
name
=
"code"
,
value
=
"验证码"
,
required
=
true
,
example
=
"9999"
)
})
public
CommonResult
<
MobileRegisterVO
>
mobileRegister
(
@RequestParam
(
"mobile"
)
String
mobile
,
@RequestParam
(
"code"
)
String
code
)
{
CommonResult
<
OAuth2AccessTokenBO
>
result
=
oauth2Service
.
getAccessToken2
(
mobile
,
code
);
return
PassportConvert
.
INSTANCE
.
convert
(
result
);
}
}
/**
/**
...
...
user/user-application/src/main/java/cn/iocoder/mall/user/convert/PassportConvert.java
0 → 100644
浏览文件 @
4b003875
package
cn
.
iocoder
.
mall
.
user
.
convert
;
import
cn.iocoder.common.framework.vo.CommonResult
;
import
cn.iocoder.mall.user.service.api.bo.OAuth2AccessTokenBO
;
import
cn.iocoder.mall.user.vo.MobileRegisterVO
;
import
org.mapstruct.Mapper
;
import
org.mapstruct.Mappings
;
import
org.mapstruct.factory.Mappers
;
@Mapper
public
interface
PassportConvert
{
PassportConvert
INSTANCE
=
Mappers
.
getMapper
(
PassportConvert
.
class
);
@Mappings
({})
MobileRegisterVO
convert
(
OAuth2AccessTokenBO
oauth2AccessTokenBO
);
@Mappings
({})
CommonResult
<
MobileRegisterVO
>
convert
(
CommonResult
<
OAuth2AccessTokenBO
>
oauth2AccessTokenBO
);
}
\ No newline at end of file
user/user-application/src/main/java/cn/iocoder/mall/user/vo/MobileRegisterVO.java
0 → 100644
浏览文件 @
4b003875
package
cn
.
iocoder
.
mall
.
user
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
@ApiModel
(
"手机注册结果VO"
)
public
class
MobileRegisterVO
{
@ApiModelProperty
(
value
=
"访问令牌"
,
required
=
true
,
example
=
"2e3d7635c15e47e997611707a237859f"
)
private
String
accessToken
;
@ApiModelProperty
(
value
=
"刷新令牌"
,
required
=
true
,
example
=
"d091e7c35bbb4313b0f557a6ef23d033"
)
private
String
refreshToken
;
@ApiModelProperty
(
value
=
"过期时间,单位:秒"
,
required
=
true
,
example
=
"2879"
)
private
Integer
expiresIn
;
public
String
getAccessToken
()
{
return
accessToken
;
}
public
MobileRegisterVO
setAccessToken
(
String
accessToken
)
{
this
.
accessToken
=
accessToken
;
return
this
;
}
public
String
getRefreshToken
()
{
return
refreshToken
;
}
public
MobileRegisterVO
setRefreshToken
(
String
refreshToken
)
{
this
.
refreshToken
=
refreshToken
;
return
this
;
}
public
Integer
getExpiresIn
()
{
return
expiresIn
;
}
public
MobileRegisterVO
setExpiresIn
(
Integer
expiresIn
)
{
this
.
expiresIn
=
expiresIn
;
return
this
;
}
}
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论