Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
deprecated-tabulator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
deprecated-tabulator
Commits
1e22ea4f
Commit
1e22ea4f
authored
Jul 27, 2022
by
月兔回旋于空中
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
结构 >> 提交补充
parent
2a240963
Pipeline
#14994
passed with stages
in 2 minutes and 40 seconds
Changes
11
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
64 additions
and
43 deletions
+64
-43
build.gradle
build.gradle
+6
-7
src/main/java/moe/mycard/tabulator/SwaggerConfiguration.java
src/main/java/moe/mycard/tabulator/SwaggerConfiguration.java
+5
-1
src/main/java/moe/mycard/tabulator/api/IndexApi.java
src/main/java/moe/mycard/tabulator/api/IndexApi.java
+5
-5
src/main/java/moe/mycard/tabulator/api/TournamentApi.java
src/main/java/moe/mycard/tabulator/api/TournamentApi.java
+5
-7
src/main/java/moe/mycard/tabulator/common/LoginInterceptor.java
...in/java/moe/mycard/tabulator/common/LoginInterceptor.java
+1
-1
src/main/java/moe/mycard/tabulator/common/MvcConfigurer.java
src/main/java/moe/mycard/tabulator/common/MvcConfigurer.java
+21
-1
src/main/java/moe/mycard/tabulator/controllers/IndexDo.java
src/main/java/moe/mycard/tabulator/controllers/IndexDo.java
+5
-5
src/main/java/moe/mycard/tabulator/controllers/TournamentDo.java
...n/java/moe/mycard/tabulator/controllers/TournamentDo.java
+5
-5
src/main/java/moe/mycard/tabulator/exception/CavException.java
...ain/java/moe/mycard/tabulator/exception/CavException.java
+1
-1
src/main/java/moe/mycard/tabulator/exception/GlobalExceptionProcessor.java
.../mycard/tabulator/exception/GlobalExceptionProcessor.java
+3
-3
src/main/java/moe/mycard/tabulator/model/dto/ReturnMessage.java
...in/java/moe/mycard/tabulator/model/dto/ReturnMessage.java
+7
-7
No files found.
build.gradle
View file @
1e22ea4f
plugins
{
group
'org.example'
id
'org.springframework.boot'
version
'2.6.4'
apply
plugin:
'idea'
id
'io.spring.dependency-management'
version
'1.0.11.RELEASE'
apply
plugin:
'java'
id
'java'
apply
plugin:
'application'
}
group
=
'moe.mycard'
group
=
'moe.mycard'
version
=
'0.0.1-SNAPSHOT'
version
=
'0.0.1-SNAPSHOT'
...
@@ -21,11 +20,11 @@ repositories {
...
@@ -21,11 +20,11 @@ repositories {
}
}
dependencies
{
dependencies
{
// https://mvnrepository.com/artifact/com.google.guava/guava
implementation
group:
'com.google.guava'
,
name:
'guava'
,
version:
'31.1-jre'
// https://mvnrepository.com/artifact/io.springfox/springfox-boot-starter
// https://mvnrepository.com/artifact/io.springfox/springfox-boot-starter
implementation
group:
'io.springfox'
,
name:
'springfox-boot-starter'
,
version:
'3.0.0'
implementation
group:
'io.springfox'
,
name:
'springfox-boot-starter'
,
version:
'3.0.0'
// implementation group: 'io.springfox', name: 'springfox-swagger-ui', version: '3.0.0'
// implementation group: 'io.springfox', name: 'springfox-swagger2', version: '3.0.0'
// ----- Spring Boot
// ----- Spring Boot
implementation
group:
'org.springframework.boot'
,
name:
'spring-boot-starter-web'
,
version:
'2.5.7'
implementation
group:
'org.springframework.boot'
,
name:
'spring-boot-starter-web'
,
version:
'2.5.7'
...
...
src/main/java/moe/mycard/tabulator/SwaggerConfiguration.java
View file @
1e22ea4f
...
@@ -3,8 +3,12 @@ package moe.mycard.tabulator;
...
@@ -3,8 +3,12 @@ package moe.mycard.tabulator;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
springfox.documentation.oas.annotations.EnableOpenApi
;
import
springfox.documentation.oas.annotations.EnableOpenApi
;
@EnableOpenApi
@Configuration
@Configuration
//@Profile({"dev", "test", "uat"})
@EnableOpenApi
//会自动开启配置,启动类不需要加任何注解
public
class
SwaggerConfiguration
{
public
class
SwaggerConfiguration
{
}
}
\ No newline at end of file
src/main/java/moe/mycard/tabulator/api/IndexApi.java
View file @
1e22ea4f
...
@@ -21,7 +21,7 @@ public interface IndexApi {
...
@@ -21,7 +21,7 @@ public interface IndexApi {
@ApiOperation
(
"新增 - 创建新的比赛"
)
@ApiOperation
(
"新增 - 创建新的比赛"
)
@PostMapping
(
"/save_tournament"
)
@PostMapping
(
"/save_tournament"
)
ReturnMessage
<
Void
>
save_tournament
(
@RequestBody
GlobalAskBody
<
SaveTournamentReq
>
body
);
ReturnMessage
<
?
>
save_tournament
(
@RequestBody
GlobalAskBody
<
SaveTournamentReq
>
body
);
@ApiOperation
(
"分页 - 获取比赛列表"
)
@ApiOperation
(
"分页 - 获取比赛列表"
)
@PostMapping
(
"/page_tournament"
)
@PostMapping
(
"/page_tournament"
)
...
@@ -29,11 +29,11 @@ public interface IndexApi {
...
@@ -29,11 +29,11 @@ public interface IndexApi {
@ApiOperation
(
"编辑 - 单场次比赛信息"
)
@ApiOperation
(
"编辑 - 单场次比赛信息"
)
@PostMapping
(
"/edit_tournament"
)
@PostMapping
(
"/edit_tournament"
)
ReturnMessage
<
Void
>
edit_tournament
(
@RequestBody
GlobalAskBody
<
UpdateTournamentReq
>
body
);
ReturnMessage
<
?
>
edit_tournament
(
@RequestBody
GlobalAskBody
<
UpdateTournamentReq
>
body
);
@ApiOperation
(
"删除 - 单场次比赛"
)
@ApiOperation
(
"删除 - 单场次比赛"
)
@PostMapping
(
"/delete_tournament"
)
@PostMapping
(
"/delete_tournament"
)
ReturnMessage
<
Void
>
delete_tournament
(
@RequestBody
GlobalAskBody
<
TidReq
>
body
);
ReturnMessage
<
?
>
delete_tournament
(
@RequestBody
GlobalAskBody
<
TidReq
>
body
);
@ApiOperation
(
"详情 - 单场次比赛信息"
)
@ApiOperation
(
"详情 - 单场次比赛信息"
)
@PostMapping
(
"/details_tournament_info"
)
@PostMapping
(
"/details_tournament_info"
)
...
@@ -41,9 +41,9 @@ public interface IndexApi {
...
@@ -41,9 +41,9 @@ public interface IndexApi {
@ApiOperation
(
"导出比赛"
)
@ApiOperation
(
"导出比赛"
)
@PostMapping
(
"/export_tournament"
)
@PostMapping
(
"/export_tournament"
)
ReturnMessage
<
Void
>
export_tournament
(
@RequestBody
GlobalAskBody
<
TidReq
>
body
);
ReturnMessage
<
?
>
export_tournament
(
@RequestBody
GlobalAskBody
<
TidReq
>
body
);
@ApiOperation
(
"比赛授权"
)
@ApiOperation
(
"比赛授权"
)
@PostMapping
(
"/authorize"
)
@PostMapping
(
"/authorize"
)
ReturnMessage
<
Void
>
authorize
(
@RequestBody
GlobalAskBody
<?>
body
);
ReturnMessage
<
?
>
authorize
(
@RequestBody
GlobalAskBody
<?>
body
);
}
}
src/main/java/moe/mycard/tabulator/api/TournamentApi.java
View file @
1e22ea4f
package
moe.mycard.tabulator.api
;
package
moe.mycard.tabulator.api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
moe.mycard.tabulator.model.dto.GlobalAskBody
;
import
moe.mycard.tabulator.model.dto.GlobalAskBody
;
import
moe.mycard.tabulator.model.dto.ReturnMessage
;
import
moe.mycard.tabulator.model.dto.ReturnMessage
;
...
@@ -28,12 +27,11 @@ public interface TournamentApi {
...
@@ -28,12 +27,11 @@ public interface TournamentApi {
@ApiOperation
(
"制表"
)
@ApiOperation
(
"制表"
)
@PostMapping
(
"tabulation"
)
@PostMapping
(
"tabulation"
)
@ApiImplicitParam
(
name
=
"比赛id"
)
ReturnMessage
<
TTree
>
tabulation
(
@RequestBody
GlobalAskBody
<
TidReq
>
body
);
ReturnMessage
<
TTree
>
tabulation
(
@RequestBody
GlobalAskBody
<
TidReq
>
body
);
@ApiOperation
(
"编辑 - 单场次比赛信息"
)
@ApiOperation
(
"编辑 - 单场次比赛信息"
)
@PostMapping
(
"/edit_tournament"
)
@PostMapping
(
"/edit_tournament"
)
ReturnMessage
<
Void
>
edit_tournament
(
@RequestBody
GlobalAskBody
<
UpdateTournamentReq
>
body
);
ReturnMessage
<
?
>
edit_tournament
(
@RequestBody
GlobalAskBody
<
UpdateTournamentReq
>
body
);
@ApiOperation
(
"详情 - 单场次比赛信息 常规信息"
)
@ApiOperation
(
"详情 - 单场次比赛信息 常规信息"
)
@PostMapping
(
"/details_tournament_info"
)
@PostMapping
(
"/details_tournament_info"
)
...
@@ -45,11 +43,11 @@ public interface TournamentApi {
...
@@ -45,11 +43,11 @@ public interface TournamentApi {
@ApiOperation
(
"编辑 - 座位信息"
)
@ApiOperation
(
"编辑 - 座位信息"
)
@PostMapping
(
"/edit_seat"
)
@PostMapping
(
"/edit_seat"
)
ReturnMessage
<
Void
>
edit_seat
(
@RequestBody
GlobalAskBody
<
UpdateSeatNode
>
body
);
ReturnMessage
<
?
>
edit_seat
(
@RequestBody
GlobalAskBody
<
UpdateSeatNode
>
body
);
@ApiOperation
(
"晋级"
)
@ApiOperation
(
"晋级"
)
@PostMapping
(
"/promotion"
)
@PostMapping
(
"/promotion"
)
ReturnMessage
<
Void
>
promotion
(
@RequestBody
GlobalAskBody
<
TidReq
>
body
);
ReturnMessage
<
?
>
promotion
(
@RequestBody
GlobalAskBody
<
TidReq
>
body
);
// @ApiOperation("分页 - 参赛者对战记录")
// @ApiOperation("分页 - 参赛者对战记录")
// @PostMapping("/page_match_record")
// @PostMapping("/page_match_record")
...
@@ -61,9 +59,9 @@ public interface TournamentApi {
...
@@ -61,9 +59,9 @@ public interface TournamentApi {
// @ApiOperation("导出比赛 - 单轮次")
// @ApiOperation("导出比赛 - 单轮次")
// @PostMapping("/export_round")
// @PostMapping("/export_round")
// ReturnMessage<
Void
> export_round(@RequestBody GlobalAskBody<?> body);
// ReturnMessage<
?
> export_round(@RequestBody GlobalAskBody<?> body);
// @ApiOperation("导入比赛 - 单轮次")
// @ApiOperation("导入比赛 - 单轮次")
// @PostMapping("/import_round")
// @PostMapping("/import_round")
// ReturnMessage<
Void
> import_round(@RequestBody GlobalAskBody<?> body);
// ReturnMessage<
?
> import_round(@RequestBody GlobalAskBody<?> body);
}
}
src/main/java/moe/mycard/tabulator/common/LoginInterceptor.java
View file @
1e22ea4f
...
@@ -22,7 +22,7 @@ import java.util.concurrent.TimeUnit;
...
@@ -22,7 +22,7 @@ import java.util.concurrent.TimeUnit;
@Component
@Component
public
class
LoginInterceptor
implements
HandlerInterceptor
{
public
class
LoginInterceptor
implements
HandlerInterceptor
{
public
boolean
isAuth
=
tru
e
;
public
boolean
isAuth
=
fals
e
;
@Resource
private
RedisTemplate
<
String
,
Long
>
redisTemplate
;
@Resource
private
RedisTemplate
<
String
,
Long
>
redisTemplate
;
...
...
src/main/java/moe/mycard/tabulator/common/MvcConfigurer.java
View file @
1e22ea4f
...
@@ -3,6 +3,7 @@ package moe.mycard.tabulator.common;
...
@@ -3,6 +3,7 @@ package moe.mycard.tabulator.common;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
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.WebMvcConfigurationSupport
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport
;
/**
/**
...
@@ -25,7 +26,26 @@ public class MvcConfigurer extends WebMvcConfigurationSupport {
...
@@ -25,7 +26,26 @@ public class MvcConfigurer extends WebMvcConfigurationSupport {
@Override
@Override
protected
void
addInterceptors
(
InterceptorRegistry
registry
)
{
protected
void
addInterceptors
(
InterceptorRegistry
registry
)
{
/** 拦截器按照顺序执行,如果不同拦截器拦截存在相同的URL,前面的拦截器会执行,后面的拦截器将不执行 */
/** 拦截器按照顺序执行,如果不同拦截器拦截存在相同的URL,前面的拦截器会执行,后面的拦截器将不执行 */
registry
.
addInterceptor
(
getLoginInterceptor
()).
addPathPatterns
(
"/**"
);
registry
.
addInterceptor
(
getLoginInterceptor
()).
addPathPatterns
(
"/api/**"
)
.
excludePathPatterns
(
"/**/login/**"
)
.
excludePathPatterns
(
"/actuator/health/**"
)
.
excludePathPatterns
(
"/v2/api-docs/**"
)
.
excludePathPatterns
(
"/v2/api-docs-ext/**"
)
.
excludePathPatterns
(
"/swagger-resources"
)
.
excludePathPatterns
(
"/error/**"
)
.
excludePathPatterns
(
"/webjars/**"
)
.
excludePathPatterns
(
"/swagger-ui.html"
)
.
excludePathPatterns
(
"/swagger-ui/index.html"
)
.
excludePathPatterns
(
"/swagger-ui/**"
)
.
excludePathPatterns
(
"/doc.html"
);
super
.
addInterceptors
(
registry
);
super
.
addInterceptors
(
registry
);
}
}
@Override
protected
void
addResourceHandlers
(
ResourceHandlerRegistry
registry
)
{
registry
.
addResourceHandler
(
"/swagger-ui/**"
).
addResourceLocations
(
"classpath:/META-INF/resources/webjars/springfox-swagger-ui/"
);
}
}
}
src/main/java/moe/mycard/tabulator/controllers/IndexDo.java
View file @
1e22ea4f
...
@@ -23,7 +23,7 @@ public class IndexDo implements IndexApi {
...
@@ -23,7 +23,7 @@ public class IndexDo implements IndexApi {
@Resource
private
TournamentDoService
tournamentDoService
;
@Resource
private
TournamentDoService
tournamentDoService
;
@Override
@Override
public
ReturnMessage
<
Void
>
save_tournament
(
GlobalAskBody
<
SaveTournamentReq
>
body
)
{
public
ReturnMessage
<
?
>
save_tournament
(
GlobalAskBody
<
SaveTournamentReq
>
body
)
{
indexService
.
saveTournament
(
body
);
indexService
.
saveTournament
(
body
);
return
ReturnMessage
.
ok
();
return
ReturnMessage
.
ok
();
}
}
...
@@ -35,13 +35,13 @@ public class IndexDo implements IndexApi {
...
@@ -35,13 +35,13 @@ public class IndexDo implements IndexApi {
}
}
@Override
@Override
public
ReturnMessage
<
Void
>
edit_tournament
(
GlobalAskBody
<
UpdateTournamentReq
>
body
)
{
public
ReturnMessage
<
?
>
edit_tournament
(
GlobalAskBody
<
UpdateTournamentReq
>
body
)
{
indexService
.
editTournament
(
body
);
indexService
.
editTournament
(
body
);
return
ReturnMessage
.
ok
();
return
ReturnMessage
.
ok
();
}
}
@Override
@Override
public
ReturnMessage
<
Void
>
delete_tournament
(
GlobalAskBody
<
TidReq
>
body
)
{
public
ReturnMessage
<
?
>
delete_tournament
(
GlobalAskBody
<
TidReq
>
body
)
{
indexService
.
deleteTournament
(
body
);
indexService
.
deleteTournament
(
body
);
return
ReturnMessage
.
ok
();
return
ReturnMessage
.
ok
();
}
}
...
@@ -53,12 +53,12 @@ public class IndexDo implements IndexApi {
...
@@ -53,12 +53,12 @@ public class IndexDo implements IndexApi {
}
}
@Override
@Override
public
ReturnMessage
<
Void
>
export_tournament
(
GlobalAskBody
<
TidReq
>
body
)
{
public
ReturnMessage
<
?
>
export_tournament
(
GlobalAskBody
<
TidReq
>
body
)
{
return
null
;
return
null
;
}
}
@Override
@Override
public
ReturnMessage
<
Void
>
authorize
(
GlobalAskBody
<?>
body
)
{
public
ReturnMessage
<
?
>
authorize
(
GlobalAskBody
<?>
body
)
{
return
null
;
return
null
;
}
}
}
}
src/main/java/moe/mycard/tabulator/controllers/TournamentDo.java
View file @
1e22ea4f
...
@@ -36,7 +36,7 @@ public class TournamentDo implements TournamentApi {
...
@@ -36,7 +36,7 @@ public class TournamentDo implements TournamentApi {
}
}
@Override
@Override
public
ReturnMessage
<
Void
>
edit_tournament
(
GlobalAskBody
<
UpdateTournamentReq
>
body
)
{
public
ReturnMessage
<
?
>
edit_tournament
(
GlobalAskBody
<
UpdateTournamentReq
>
body
)
{
indexDoService
.
editTournament
(
body
);
indexDoService
.
editTournament
(
body
);
return
ReturnMessage
.
ok
();
return
ReturnMessage
.
ok
();
}
}
...
@@ -54,13 +54,13 @@ public class TournamentDo implements TournamentApi {
...
@@ -54,13 +54,13 @@ public class TournamentDo implements TournamentApi {
}
}
@Override
@Override
public
ReturnMessage
<
Void
>
edit_seat
(
GlobalAskBody
<
UpdateSeatNode
>
body
)
{
public
ReturnMessage
<
?
>
edit_seat
(
GlobalAskBody
<
UpdateSeatNode
>
body
)
{
tournamentDoService
.
editSeat
(
body
);
tournamentDoService
.
editSeat
(
body
);
return
ReturnMessage
.
ok
();
return
ReturnMessage
.
ok
();
}
}
@Override
@Override
public
ReturnMessage
<
Void
>
promotion
(
GlobalAskBody
<
TidReq
>
body
)
{
public
ReturnMessage
<
?
>
promotion
(
GlobalAskBody
<
TidReq
>
body
)
{
return
null
;
return
null
;
}
}
...
@@ -75,12 +75,12 @@ public class TournamentDo implements TournamentApi {
...
@@ -75,12 +75,12 @@ public class TournamentDo implements TournamentApi {
// }
// }
// @Override
// @Override
// public ReturnMessage<
Void
> export_round(GlobalAskBody<?> body) {
// public ReturnMessage<
?
> export_round(GlobalAskBody<?> body) {
// return null;
// return null;
// }
// }
//
//
// @Override
// @Override
// public ReturnMessage<
Void
> import_round(GlobalAskBody<?> body) {
// public ReturnMessage<
?
> import_round(GlobalAskBody<?> body) {
// return null;
// return null;
// }
// }
}
}
src/main/java/moe/mycard/tabulator/exception/CavException.java
View file @
1e22ea4f
...
@@ -48,7 +48,7 @@ public class CavException extends RuntimeException {
...
@@ -48,7 +48,7 @@ public class CavException extends RuntimeException {
*
*
* @return 异常信息
* @return 异常信息
*/
*/
public
ReturnMessage
<
Void
>
result
()
{
public
ReturnMessage
<
?
>
result
()
{
return
ReturnMessage
.
error
(
code
,
this
.
getMessage
());
return
ReturnMessage
.
error
(
code
,
this
.
getMessage
());
}
}
}
}
src/main/java/moe/mycard/tabulator/exception/GlobalExceptionProcessor.java
View file @
1e22ea4f
...
@@ -28,14 +28,14 @@ public class GlobalExceptionProcessor extends Method {
...
@@ -28,14 +28,14 @@ public class GlobalExceptionProcessor extends Method {
/** 全局未知异常捕获 */
/** 全局未知异常捕获 */
@ExceptionHandler
(
Exception
.
class
)
@ExceptionHandler
(
Exception
.
class
)
public
ReturnMessage
<
Void
>
exception
(
Exception
ex
,
HttpServletRequest
request
)
{
public
ReturnMessage
<
?
>
exception
(
Exception
ex
,
HttpServletRequest
request
)
{
log
(
true
,
ex
,
request
);
log
(
true
,
ex
,
request
);
return
ReturnMessage
.
error
();
return
ReturnMessage
.
error
();
}
}
/** 请求类型错误 */
/** 请求类型错误 */
@ExceptionHandler
(
HttpRequestMethodNotSupportedException
.
class
)
@ExceptionHandler
(
HttpRequestMethodNotSupportedException
.
class
)
public
ReturnMessage
<
Void
>
exception
(
public
ReturnMessage
<
?
>
exception
(
HttpRequestMethodNotSupportedException
ex
,
HttpServletRequest
request
)
{
HttpRequestMethodNotSupportedException
ex
,
HttpServletRequest
request
)
{
log
(
false
,
ex
,
request
);
log
(
false
,
ex
,
request
);
return
ReturnMessage
.
error
(
"请求类型错误,该资源不支持此请求类型"
);
return
ReturnMessage
.
error
(
"请求类型错误,该资源不支持此请求类型"
);
...
@@ -43,7 +43,7 @@ public class GlobalExceptionProcessor extends Method {
...
@@ -43,7 +43,7 @@ public class GlobalExceptionProcessor extends Method {
/** 内置异常捕获 */
/** 内置异常捕获 */
@ExceptionHandler
(
CavException
.
class
)
@ExceptionHandler
(
CavException
.
class
)
public
ReturnMessage
<
Void
>
exception
(
CavException
ex
,
HttpServletRequest
request
)
{
public
ReturnMessage
<
?
>
exception
(
CavException
ex
,
HttpServletRequest
request
)
{
log
(
true
,
ex
,
request
);
log
(
true
,
ex
,
request
);
return
ex
.
result
();
return
ex
.
result
();
}
}
...
...
src/main/java/moe/mycard/tabulator/model/dto/ReturnMessage.java
View file @
1e22ea4f
...
@@ -7,7 +7,7 @@ import lombok.EqualsAndHashCode;
...
@@ -7,7 +7,7 @@ import lombok.EqualsAndHashCode;
@Data
@Data
public
class
ReturnMessage
<
T
>
extends
BlankReturnMessage
{
public
class
ReturnMessage
<
T
>
extends
BlankReturnMessage
{
private
Object
data
;
private
T
data
;
public
static
<
vo
>
ReturnMessage
<
vo
>
ok
()
{
public
static
<
vo
>
ReturnMessage
<
vo
>
ok
()
{
ReturnMessage
<
vo
>
result
=
new
ReturnMessage
<>();
ReturnMessage
<
vo
>
result
=
new
ReturnMessage
<>();
...
@@ -24,22 +24,22 @@ public class ReturnMessage<T> extends BlankReturnMessage {
...
@@ -24,22 +24,22 @@ public class ReturnMessage<T> extends BlankReturnMessage {
return
result
;
return
result
;
}
}
public
static
ReturnMessage
<
Void
>
error
(
Integer
code
,
String
message
)
{
public
static
ReturnMessage
<
?
>
error
(
Integer
code
,
String
message
)
{
ReturnMessage
<
Void
>
result
=
new
ReturnMessage
<>();
ReturnMessage
<
?
>
result
=
new
ReturnMessage
<>();
result
.
setCode
(
code
);
result
.
setCode
(
code
);
result
.
setMessage
(
message
);
result
.
setMessage
(
message
);
return
result
;
return
result
;
}
}
public
static
ReturnMessage
<
Void
>
error
(
String
message
)
{
public
static
ReturnMessage
<
?
>
error
(
String
message
)
{
ReturnMessage
<
Void
>
result
=
new
ReturnMessage
<>();
ReturnMessage
<
?
>
result
=
new
ReturnMessage
<>();
result
.
setCode
(
300
);
result
.
setCode
(
300
);
result
.
setMessage
(
message
);
result
.
setMessage
(
message
);
return
result
;
return
result
;
}
}
public
static
ReturnMessage
<
Void
>
error
()
{
public
static
ReturnMessage
<
?
>
error
()
{
ReturnMessage
<
Void
>
result
=
new
ReturnMessage
<>();
ReturnMessage
<
?
>
result
=
new
ReturnMessage
<>();
result
.
setCode
(
300
);
result
.
setCode
(
300
);
result
.
setMessage
(
"系统异常"
);
result
.
setMessage
(
"系统异常"
);
return
result
;
return
result
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment