Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
antai-sport-http-server
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
antai-sport
antai-sport-http-server
Commits
49ca7c02
Commit
49ca7c02
authored
Apr 20, 2022
by
liming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日常赛初始化
parent
2d168bc3
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
165 additions
and
30 deletions
+165
-30
NormalMatchController.java
...usiness/normalmatch/controller/NormalMatchController.java
+0
-19
SimpleMatchController.java
...usiness/simplematch/controller/SimpleMatchController.java
+32
-0
SimpleMatchListRequestDTO.java
...i/business/simplematch/dto/SimpleMatchListRequestDTO.java
+22
-0
SimpleMatchListResponseDTO.java
.../business/simplematch/dto/SimpleMatchListResponseDTO.java
+13
-0
SimpleMatchListVO.java
...nt/api/business/simplematch/dto/vo/SimpleMatchListVO.java
+16
-0
SimpleMatchBusinessMapper.java
...usiness/simplematch/mapper/SimpleMatchBusinessMapper.java
+12
-0
SimpleMatchService.java
.../api/business/simplematch/service/SimpleMatchService.java
+34
-0
BaseConfig.java
...i/sport/http/server/management/api/config/BaseConfig.java
+23
-0
application.yaml
management-api/src/main/resources/application.yaml
+2
-0
SimpleMatchBusinessMapper.xml
...esources/mapper/simplematch/SimpleMatchBusinessMapper.xml
+11
-0
application-common-db-dev.yml
profile/src/main/resources/application-common-db-dev.yml
+0
-1
application-common-db-local.yml
profile/src/main/resources/application-common-db-local.yml
+0
-5
application-common-db-test.yml
profile/src/main/resources/application-common-db-test.yml
+0
-5
No files found.
management-api/src/main/java/com/antai/sport/http/server/management/api/business/normalmatch/controller/NormalMatchController.java
deleted
100644 → 0
View file @
2d168bc3
package
com
.
antai
.
sport
.
http
.
server
.
management
.
api
.
business
.
normalmatch
.
controller
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"/normal/match"
)
@Api
(
tags
=
{
"日常赛"
})
public
class
NormalMatchController
{
@ApiOperation
(
"测试"
)
@GetMapping
public
String
test
(){
return
"test"
;
}
}
management-api/src/main/java/com/antai/sport/http/server/management/api/business/simplematch/controller/SimpleMatchController.java
0 → 100644
View file @
49ca7c02
package
com
.
antai
.
sport
.
http
.
server
.
management
.
api
.
business
.
simplematch
.
controller
;
import
com.antai.sport.http.server.common.base.Result
;
import
com.antai.sport.http.server.management.api.business.simplematch.dto.SimpleMatchListRequestDTO
;
import
com.antai.sport.http.server.management.api.business.simplematch.dto.SimpleMatchListResponseDTO
;
import
com.antai.sport.http.server.management.api.business.simplematch.service.SimpleMatchService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
static
com
.
antai
.
sport
.
http
.
server
.
common
.
util
.
ResultUtil
.
success
;
@RestController
@RequestMapping
(
"/simple/match"
)
@Api
(
tags
=
{
"日常赛"
})
public
class
SimpleMatchController
{
@Resource
private
SimpleMatchService
simpleMatchService
;
@ApiOperation
(
"加载比赛列表"
)
@PostMapping
(
"list"
)
public
ResponseEntity
<
Result
<
SimpleMatchListResponseDTO
>>
getMatchList
(
@RequestBody
SimpleMatchListRequestDTO
param
)
{
return
success
(
simpleMatchService
.
getMatchList
(
param
));
}
}
management-api/src/main/java/com/antai/sport/http/server/management/api/business/simplematch/dto/SimpleMatchListRequestDTO.java
0 → 100644
View file @
49ca7c02
package
com
.
antai
.
sport
.
http
.
server
.
management
.
api
.
business
.
simplematch
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
@Data
@ApiModel
(
"日常赛列表查询条件"
)
public
class
SimpleMatchListRequestDTO
{
private
Integer
pageNo
;
private
Integer
pageSize
;
private
String
sortField
;
private
String
sortOrder
;
@ApiModelProperty
(
"比赛名称"
)
private
String
name
;
@ApiModelProperty
(
"比赛开始时间查询:开始时间"
)
private
LocalDateTime
beginDate
;
@ApiModelProperty
(
"比赛开始时间查询:结束时间"
)
private
LocalDateTime
endDate
;
}
management-api/src/main/java/com/antai/sport/http/server/management/api/business/simplematch/dto/SimpleMatchListResponseDTO.java
0 → 100644
View file @
49ca7c02
package
com
.
antai
.
sport
.
http
.
server
.
management
.
api
.
business
.
simplematch
.
dto
;
import
com.antai.sport.http.server.management.api.business.simplematch.dto.vo.SimpleMatchListVO
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
SimpleMatchListResponseDTO
{
private
List
<
SimpleMatchListVO
>
data
;
private
Integer
pageNo
;
private
Long
totalCount
;
}
management-api/src/main/java/com/antai/sport/http/server/management/api/business/simplematch/dto/vo/SimpleMatchListVO.java
0 → 100644
View file @
49ca7c02
package
com
.
antai
.
sport
.
http
.
server
.
management
.
api
.
business
.
simplematch
.
dto
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
@Data
public
class
SimpleMatchListVO
{
private
Long
id
;
private
String
name
;
private
String
mapName
;
private
String
pathName
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
LocalDateTime
startTime
;
}
management-api/src/main/java/com/antai/sport/http/server/management/api/business/simplematch/mapper/SimpleMatchBusinessMapper.java
0 → 100644
View file @
49ca7c02
package
com
.
antai
.
sport
.
http
.
server
.
management
.
api
.
business
.
simplematch
.
mapper
;
import
com.antai.sport.http.server.management.api.business.simplematch.dto.SimpleMatchListRequestDTO
;
import
com.antai.sport.http.server.management.api.business.simplematch.dto.vo.SimpleMatchListVO
;
import
com.antai.sport.http.server.repository.simplematch.entity.SimpleMatch
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.apache.ibatis.annotations.Param
;
public
interface
SimpleMatchBusinessMapper
extends
BaseMapper
<
SimpleMatch
>
{
IPage
<
SimpleMatchListVO
>
getMatchList
(
IPage
<
SimpleMatchListVO
>
page
,
@Param
(
"param"
)
SimpleMatchListRequestDTO
param
);
}
management-api/src/main/java/com/antai/sport/http/server/management/api/business/simplematch/service/SimpleMatchService.java
0 → 100644
View file @
49ca7c02
package
com
.
antai
.
sport
.
http
.
server
.
management
.
api
.
business
.
simplematch
.
service
;
import
com.antai.sport.http.server.management.api.business.simplematch.dto.SimpleMatchListRequestDTO
;
import
com.antai.sport.http.server.management.api.business.simplematch.dto.SimpleMatchListResponseDTO
;
import
com.antai.sport.http.server.management.api.business.simplematch.dto.vo.SimpleMatchListVO
;
import
com.antai.sport.http.server.management.api.business.simplematch.mapper.SimpleMatchBusinessMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.OrderItem
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
@Service
public
class
SimpleMatchService
{
@Resource
private
SimpleMatchBusinessMapper
simpleMatchBusinessMapper
;
public
SimpleMatchListResponseDTO
getMatchList
(
SimpleMatchListRequestDTO
param
)
{
Page
<
SimpleMatchListVO
>
pageParam
=
new
Page
<>(
param
.
getPageNo
(),
param
.
getPageSize
());
if
(
StringUtils
.
isNotEmpty
(
param
.
getSortOrder
()))
{
pageParam
.
addOrder
(
new
OrderItem
(
"start_time"
,
"asc"
.
equals
(
param
.
getSortOrder
())));
}
pageParam
.
addOrder
(
new
OrderItem
(
"id"
,
false
));
IPage
<
SimpleMatchListVO
>
result
=
simpleMatchBusinessMapper
.
getMatchList
(
pageParam
,
param
);
SimpleMatchListResponseDTO
dto
=
new
SimpleMatchListResponseDTO
();
dto
.
setData
(
result
.
getRecords
());
dto
.
setPageNo
(
param
.
getPageNo
());
dto
.
setTotalCount
(
result
.
getTotal
());
return
dto
;
}
}
management-api/src/main/java/com/antai/sport/http/server/management/api/config/BaseConfig.java
View file @
49ca7c02
...
@@ -2,9 +2,15 @@ package com.antai.sport.http.server.management.api.config;
...
@@ -2,9 +2,15 @@ package com.antai.sport.http.server.management.api.config;
import
com.antai.sport.http.server.management.api.interceptor.TokenInterceptor
;
import
com.antai.sport.http.server.management.api.interceptor.TokenInterceptor
;
import
com.antai.sport.http.server.management.api.resolver.SysUserArgumentResolver
;
import
com.antai.sport.http.server.management.api.resolver.SysUserArgumentResolver
;
import
com.baomidou.mybatisplus.annotation.DbType
;
import
com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer
;
import
com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor
;
import
com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor
;
import
com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
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.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.web.method.support.HandlerMethodArgumentResolver
;
import
org.springframework.web.method.support.HandlerMethodArgumentResolver
;
import
org.springframework.web.servlet.config.annotation.CorsRegistry
;
import
org.springframework.web.servlet.config.annotation.CorsRegistry
;
import
org.springframework.web.servlet.config.annotation.InterceptorRegistry
;
import
org.springframework.web.servlet.config.annotation.InterceptorRegistry
;
...
@@ -19,6 +25,7 @@ import java.util.List;
...
@@ -19,6 +25,7 @@ import java.util.List;
* @Description:
* @Description:
*/
*/
@Configuration
@Configuration
@EnableTransactionManagement
@ConfigurationProperties
(
prefix
=
"project"
)
@ConfigurationProperties
(
prefix
=
"project"
)
public
class
BaseConfig
implements
WebMvcConfigurer
{
public
class
BaseConfig
implements
WebMvcConfigurer
{
...
@@ -59,4 +66,20 @@ public class BaseConfig implements WebMvcConfigurer {
...
@@ -59,4 +66,20 @@ public class BaseConfig implements WebMvcConfigurer {
public
void
setPermitUrl
(
List
<
String
>
permitUrl
)
{
public
void
setPermitUrl
(
List
<
String
>
permitUrl
)
{
this
.
permitUrl
=
permitUrl
;
this
.
permitUrl
=
permitUrl
;
}
}
@Bean
public
MybatisPlusInterceptor
mybatisPlusInterceptor
(){
MybatisPlusInterceptor
interceptor
=
new
MybatisPlusInterceptor
();
PaginationInnerInterceptor
innerInterceptor
=
new
PaginationInnerInterceptor
();
innerInterceptor
.
setDbType
(
DbType
.
MYSQL
);
innerInterceptor
.
setOverflow
(
true
);
interceptor
.
addInnerInterceptor
(
new
OptimisticLockerInnerInterceptor
());
interceptor
.
addInnerInterceptor
(
innerInterceptor
);
return
interceptor
;
}
@Bean
public
ConfigurationCustomizer
configurationCustomizer
(){
return
mybatisConfiguration
->
mybatisConfiguration
.
setUseGeneratedShortKey
(
false
);
}
}
}
management-api/src/main/resources/application.yaml
View file @
49ca7c02
...
@@ -71,6 +71,8 @@ aliyun:
...
@@ -71,6 +71,8 @@ aliyun:
login
:
SMS_136440120
#登录确认验证码
login
:
SMS_136440120
#登录确认验证码
mybatis-plus
:
mybatis-plus
:
configuration
:
log-impl
:
org.apache.ibatis.logging.stdout.StdOutImpl
global-config
:
global-config
:
db-config
:
db-config
:
logic-delete-value
:
1
logic-delete-value
:
1
...
...
management-api/src/main/resources/mapper/simplematch/SimpleMatchBusinessMapper.xml
0 → 100644
View file @
49ca7c02
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.antai.sport.http.server.management.api.business.simplematch.mapper.SimpleMatchBusinessMapper"
>
<select
id=
"getMatchList"
resultType=
"com.antai.sport.http.server.management.api.business.simplematch.dto.vo.SimpleMatchListVO"
>
select t1.*,t2.map_name,t3.path_name
from simple_match t1
left join map t2 on t1.map = t2.map_key
left join map_path t3 on t1.path = t3.path_key
where t1.deleted = 0
</select>
</mapper>
\ No newline at end of file
profile/src/main/resources/application-common-db-dev.yml
View file @
49ca7c02
...
@@ -10,6 +10,5 @@ spring:
...
@@ -10,6 +10,5 @@ spring:
logging
:
logging
:
level
:
level
:
root
:
info
root
:
info
com.antai.sport.http.server.repository
:
debug
com.easemob.im.http
:
debug
com.easemob.im.http
:
debug
profile/src/main/resources/application-common-db-local.yml
View file @
49ca7c02
...
@@ -7,8 +7,3 @@ spring:
...
@@ -7,8 +7,3 @@ spring:
username
:
root
username
:
root
password
:
123456
password
:
123456
logging
:
level
:
root
:
info
com.antai.sport.http.server.repository
:
debug
profile/src/main/resources/application-common-db-test.yml
View file @
49ca7c02
...
@@ -7,8 +7,3 @@ spring:
...
@@ -7,8 +7,3 @@ spring:
username
:
root
username
:
root
password
:
ENC(eeesjD8BM2hklNwdDv4FCDoaVZF9c8+2)
password
:
ENC(eeesjD8BM2hklNwdDv4FCDoaVZF9c8+2)
logging
:
level
:
root
:
info
com.antai.sport.http.server.repository
:
debug
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