Merge pull request #5 from sports-match/add-column

Add column
pull/882/head
Chanheng 2025-05-25 18:17:47 -07:00 committed by GitHub
commit 859b225139
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
51 changed files with 565 additions and 252 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@
*/*.iml
/.gradle/
/application.pid
/eladmin-system/application.pid

View File

@ -1,10 +1,5 @@
# ELADMIN Backend Management System
[![AUR](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://github.com/elunez/eladmin/blob/master/LICENSE)
[![star](https://gitee.com/elunez/eladmin/badge/star.svg?theme=white)](https://gitee.com/elunez/eladmin)
[![GitHub stars](https://img.shields.io/github/stars/elunez/eladmin.svg?style=social&label=Stars)](https://github.com/elunez/eladmin)
[![GitHub forks](https://img.shields.io/github/forks/elunez/eladmin.svg?style=social&label=Fork)](https://github.com/elunez/eladmin)
## Project Introduction
A front-end and back-end separated management system based on Spring Boot 2.7.18, Spring Boot JPA, JWT, Spring Security, Redis, and Vue.
@ -26,12 +21,6 @@ A MyBatis-Plus version has also been released:
| GitHub | https://github.com/elunez/eladmin | https://github.com/elunez/eladmin-web |
| Gitee | https://gitee.com/elunez/eladmin | https://gitee.com/elunez/eladmin-web |
## VPS Recommendation
[![VPS Banner](https://eladmin.vip/images/banner/side.jpeg)](https://bwh81.net/aff.php?aff=70876)
Use promo code: `BWHCGLUKKB` for a 6.81% discount [See details](https://bwhstock.in/)
## Main Features
- Uses the latest tech stack with rich community resources.
@ -58,7 +47,7 @@ Use promo code: `BWHCGLUKKB` for a 6.81% discount [See details](https://bwhstock
- Scheduled Tasks: Integrate Quartz for scheduled tasks, with task logs and task execution status.
- Code Generation: High flexibility code generation for front-end and back-end, reducing repetitive work.
- Email Tool: Send HTML format emails with rich text.
- Qiniu Cloud Storage: Synchronize Qiniu cloud storage data to the system, no need to log in to Qiniu cloud to operate cloud data.
- AWS Cloud Storage: Synchronize AWS cloud storage data to the system, no need to log in to AWS cloud to operate cloud data.
- Alipay Payment: Integrate Alipay payment and provide a test account for self-testing.
- Server Monitoring: Monitor server load status.
- Operations Management: One-click deployment of your application.
@ -70,7 +59,7 @@ The project uses a modular development approach, with the following structure:
- `eladmin-common`: System public module, including various utility classes and public configurations.
- `eladmin-system`: System core module and project entry module, also the final module to be packaged and deployed.
- `eladmin-logging`: System log module, other modules need to import this module to record logs.
- `eladmin-tools`: Third-party tool module, including email, Qiniu cloud storage, local storage, and Alipay payment.
- `eladmin-tools`: Third-party tool module, including email, AWS cloud storage, local storage
- `eladmin-generator`: System code generation module, supporting front-end and back-end CRUD code generation.
## Detailed Structure
@ -100,7 +89,7 @@ The project uses a modular development approach, with the following structure:
- eladmin-logging System Log Module
- eladmin-tools Third-party Tool Module
- email Email tool
- qiniu Qiniu cloud storage tool
- AWS S3 cloud storage tool
- alipay Alipay payment tool
- local-storage Local storage tool
- eladmin-generator System Code Generation Module

View File

@ -63,11 +63,14 @@ task:
# Queue capacity
queue-capacity: 50
# Qiniu Cloud
# S3 Cloud
s3:
# File size /M
max-size: 15
qiniu:
max-size: 15
# Email verification code validity time/seconds
code:
expiration: 300

View File

@ -0,0 +1,21 @@
alter table event
add column status varchar(255),
add column is_public bit default 0,
add column allow_wait_list bit default 0;
CREATE TABLE team (
id BIGINT PRIMARY KEY AUTO_INCREMENT,
event_id BIGINT references event(id),
name VARCHAR(255),
team_size INT default 2
);
CREATE TABLE team_player (
id BIGINT PRIMARY KEY AUTO_INCREMENT,
team_id BIGINT,
player_id BIGINT,
score DOUBLE DEFAULT NULL,
is_checked_in BIT DEFAULT 0,
CONSTRAINT fk_team FOREIGN KEY (team_id) REFERENCES team(id),
CONSTRAINT fk_player FOREIGN KEY (player_id) REFERENCES player(id)
);

View File

@ -12,7 +12,6 @@
<properties>
<mail.version>1.4.7</mail.version>
<qiniu.version>7.9.3</qiniu.version>
<alipay.version>4.22.57.ALL</alipay.version>
</properties>
@ -31,18 +30,11 @@
<version>${mail.version}</version>
</dependency>
<!-- Qiniu Cloud Storage -->
<dependency>
<groupId>com.qiniu</groupId>
<artifactId>qiniu-java-sdk</artifactId>
<version>${qiniu.version}</version>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>2.25.22</version>
</dependency>
<!-- Alipay dependency -->
<dependency>
<groupId>com.alipay.sdk</groupId>
<artifactId>alipay-sdk-java</artifactId>
<version>${alipay.version}</version>
</dependency>
</dependencies>
</project>

View File

@ -15,24 +15,15 @@
*/
package me.zhengjie.service.impl;
import com.alibaba.fastjson2.JSON;
import com.qiniu.common.QiniuException;
import com.qiniu.http.Response;
import com.qiniu.storage.BucketManager;
import com.qiniu.storage.Configuration;
import com.qiniu.storage.UploadManager;
import com.qiniu.storage.model.DefaultPutRet;
import com.qiniu.storage.model.FileInfo;
import com.qiniu.util.Auth;
import lombok.RequiredArgsConstructor;
import me.zhengjie.domain.S3Content;
import me.zhengjie.domain.S3Config;
import me.zhengjie.domain.S3Content;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.repository.S3ConfigRepository;
import me.zhengjie.repository.S3ContentRepository;
import me.zhengjie.service.S3Service;
import me.zhengjie.service.dto.S3QueryCriteria;
import me.zhengjie.utils.*;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.service.S3Service;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CachePut;
@ -41,6 +32,7 @@ import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.*;
@ -92,39 +84,7 @@ public class S3ServiceImpl implements S3Service {
@Override
@Transactional(rollbackFor = Exception.class)
public S3Content upload(MultipartFile file, S3Config s3Config) {
FileUtil.checkSize(maxSize, file.getSize());
if(s3Config.getId() == null){
throw new BadRequestException("Please add the corresponding configuration first, then operate");
}
// Construct a configuration class with the specified Zone object
Configuration cfg = new Configuration(S3Util.getRegion(s3Config.getZone()));
UploadManager uploadManager = new UploadManager(cfg);
Auth auth = Auth.create(s3Config.getAccessKey(), s3Config.getSecretKey());
String upToken = auth.uploadToken(s3Config.getBucket());
try {
String key = file.getOriginalFilename();
if(s3ContentRepository.findByKey(key) != null) {
key = S3Util.getKey(key);
}
Response response = uploadManager.put(file.getBytes(), key, upToken);
// Parse the result of successful upload
DefaultPutRet putRet = JSON.parseObject(response.bodyString(), DefaultPutRet.class);
S3Content content = s3ContentRepository.findByKey(FileUtil.getFileNameNoEx(putRet.key));
if(content == null){
// Store in database
S3Content s3Content = new S3Content();
s3Content.setSuffix(FileUtil.getExtensionName(putRet.key));
s3Content.setBucket(s3Config.getBucket());
s3Content.setType(s3Config.getType());
s3Content.setKey(FileUtil.getFileNameNoEx(putRet.key));
s3Content.setUrl(s3Config.getHost()+"/"+putRet.key);
s3Content.setSize(FileUtil.getSize(Integer.parseInt(String.valueOf(file.getSize()))));
return s3ContentRepository.save(s3Content);
}
return content;
} catch (Exception e) {
throw new BadRequestException(e.getMessage());
}
return null;
}
@Override
@ -136,69 +96,19 @@ public class S3ServiceImpl implements S3Service {
@Override
public String download(S3Content content,S3Config config){
String finalUrl;
String type = "Public";
if(type.equals(content.getType())){
finalUrl = content.getUrl();
} else {
Auth auth = Auth.create(config.getAccessKey(), config.getSecretKey());
// 1 hour, can customize link expiration time
long expireInSeconds = 3600;
finalUrl = auth.privateDownloadUrl(content.getUrl(), expireInSeconds);
}
return finalUrl;
return null;
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(S3Content content, S3Config config) {
// Construct a configuration class with the specified Zone object
Configuration cfg = new Configuration(S3Util.getRegion(config.getZone()));
Auth auth = Auth.create(config.getAccessKey(), config.getSecretKey());
BucketManager bucketManager = new BucketManager(auth, cfg);
try {
bucketManager.delete(content.getBucket(), content.getKey() + "." + content.getSuffix());
s3ContentRepository.delete(content);
} catch (QiniuException ex) {
s3ContentRepository.delete(content);
}
}
@Override
@Transactional(rollbackFor = Exception.class)
public void synchronize(S3Config config) {
if(config.getId() == null){
throw new BadRequestException("Please add the corresponding configuration first, then operate");
}
// Construct a configuration class with the specified Zone object
Configuration cfg = new Configuration(S3Util.getRegion(config.getZone()));
Auth auth = Auth.create(config.getAccessKey(), config.getSecretKey());
BucketManager bucketManager = new BucketManager(auth, cfg);
// File name prefix
String prefix = "";
// Length limit for each iteration, maximum 1000, recommended value 1000
int limit = 1000;
// Specify directory separator, list all common prefixes (simulate directory listing effect). Default value is empty string
String delimiter = "";
// List space file list
BucketManager.FileListIterator fileListIterator = bucketManager.createFileListIterator(config.getBucket(), prefix, limit, delimiter);
while (fileListIterator.hasNext()) {
// Process the obtained file list result
S3Content s3Content;
FileInfo[] items = fileListIterator.next();
for (FileInfo item : items) {
if(s3ContentRepository.findByKey(FileUtil.getFileNameNoEx(item.key)) == null){
s3Content = new S3Content();
s3Content.setSize(FileUtil.getSize(Integer.parseInt(String.valueOf(item.fsize))));
s3Content.setSuffix(FileUtil.getExtensionName(item.key));
s3Content.setKey(FileUtil.getFileNameNoEx(item.key));
s3Content.setType(config.getType());
s3Content.setBucket(config.getBucket());
s3Content.setUrl(config.getHost()+"/"+item.key);
s3ContentRepository.save(s3Content);
}
}
}
}
@Override

View File

@ -1,71 +0,0 @@
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.utils;
import com.qiniu.storage.Region;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* S3 cloud storage utility class
* @author Zheng Jie
* @date 2018-12-31
*/
public class S3Util {
private static final String HUAD = "East China";
private static final String HUAB = "North China";
private static final String HUAN = "South China";
private static final String BEIM = "North America";
/**
* Get the corresponding relationship of the machine room
* @param zone machine room name
* @return Region
*/
public static Region getRegion(String zone){
if(HUAD.equals(zone)){
return Region.huadong();
} else if(HUAB.equals(zone)){
return Region.huabei();
} else if(HUAN.equals(zone)){
return Region.huanan();
} else if (BEIM.equals(zone)){
return Region.beimei();
// Otherwise, it is Southeast Asia
} else {
return Region.qvmHuadong();
}
}
/**
* By default, if no key is specified, the hash value of the file content is used as the file name
* @param file file name
* @return String
*/
public static String getKey(String file){
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
Date date = new Date();
return FileUtil.getFileNameNoEx(file) + "-" +
sdf.format(date) +
"." +
FileUtil.getExtensionName(file);
}
}

View File

@ -15,6 +15,7 @@
*/
package com.srr.domain;
import com.srr.enumeration.EventStatus;
import com.srr.enumeration.Format;
import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
@ -114,6 +115,17 @@ public class Event implements Serializable {
@ApiModelProperty(value = "createBy")
private Long createBy;
@Column(name = "`status`")
@Enumerated(EnumType.STRING)
@ApiModelProperty(value = "status")
private EventStatus status;
@Column(name = "`is_public`")
private boolean isPublic;
@Column(name = "`allow_wait_list`")
private boolean allowWaitList;
public void copy(Event source){
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
}

View File

@ -0,0 +1,49 @@
package com.srr.domain;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import java.io.Serializable;
@Entity
@Setter
@Getter
public class Match implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "`id`")
@ApiModelProperty(value = "id", hidden = true)
private Long id;
@ManyToOne
@JoinColumn(name = "match_group_id")
private MatchGroup matchGroup;
@ManyToOne
@JoinColumn(name = "team_player_a_id")
private TeamPlayer teamPlayerA;
@Column(name = "`score_a`")
@ApiModelProperty(value = "Score A")
private int scoreA;
@Column(name = "`team_a_win`")
private boolean teamAWin;
@Column(name = "`score_b`")
@ApiModelProperty(value = "Score B")
private int scoreB;
@Column(name = "`team_b_win`")
private boolean teamBWin;
@ManyToOne
@JoinColumn(name = "team_player_b_id")
private TeamPlayer teamPlayerB;
@Column(name = "`score_verified`")
private boolean scoreVerified;
}

View File

@ -0,0 +1,28 @@
package com.srr.domain;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import java.io.Serializable;
@Getter
@Setter
@Entity
public class MatchGroup implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "`id`")
@ApiModelProperty(value = "id", hidden = true)
private Long id;
@Column(name = "`name`")
@ApiModelProperty(value = "Name")
private String name;
@ManyToOne
@JoinColumn(name = "event_id")
private Event event;
}

View File

@ -0,0 +1,34 @@
package com.srr.domain;
import io.swagger.annotations.ApiModelProperty;
import javax.persistence.*;
import java.io.Serializable;
import java.util.List;
@Entity
@Table(name = "`team`")
public class Team implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "`id`")
@ApiModelProperty(value = "id", hidden = true)
private Long id;
@ManyToOne
@JoinColumn(name = "event_id")
private Event event;
@Column(name = "`name`")
@ApiModelProperty(value = "Name")
private String name;
@Column(name = "`team_size`")
@ApiModelProperty(value = "Team size")
private int teamSize;
@OneToMany(mappedBy = "team")
@ApiModelProperty(value = "teamPlayers")
private List<TeamPlayer> teamPlayers;
}

View File

@ -0,0 +1,34 @@
package com.srr.domain;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import java.io.Serializable;
@Getter
@Setter
@Entity
@Table(name = "`team_player`")
public class TeamPlayer implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "`id`")
@ApiModelProperty(value = "id", hidden = true)
private Long id;
@ManyToOne
@JoinColumn(name = "team_id")
private Team team;
@Column(name = "`score`")
private Double score;
@ManyToOne
@JoinColumn(name = "player_id")
private Player player;
@Column(name = "`is_checked_in`")
private boolean isCheckedIn;
}

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.service.dto;
package com.srr.dto;
import lombok.Data;
import java.sql.Timestamp;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.service.dto;
package com.srr.dto;
import lombok.Data;
import me.zhengjie.annotation.Query;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.service.dto;
package com.srr.dto;
import lombok.Data;
import java.sql.Timestamp;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.service.dto;
package com.srr.dto;
import lombok.Data;
import me.zhengjie.annotation.Query;

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.service.dto;
package com.srr.dto;
import com.srr.enumeration.EventStatus;
import com.srr.enumeration.Format;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -78,4 +79,10 @@ public class EventDto implements Serializable {
@ApiModelProperty(value = "createBy")
private Long createBy;
private EventStatus status;
private boolean isPublic;
private boolean allowWaitList;
}

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.service.dto;
package com.srr.dto;
import com.srr.enumeration.Format;
import lombok.Data;

View File

@ -0,0 +1,49 @@
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @website https://eladmin.vip
* @description /
* @author Chanheng
* @date 2025-05-25
**/
@Data
public class MatchDto implements Serializable {
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "Match Group id")
private Long matchGroupId;
@ApiModelProperty(value = "Team 1 id")
private Long team1Id;
@ApiModelProperty(value = "Team 2 id")
private Long team2Id;
@ApiModelProperty(value = "Score Team 1")
private Integer scoreTeam1;
@ApiModelProperty(value = "Score Team 2")
private Integer scoreTeam2;
}

View File

@ -0,0 +1,40 @@
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @website https://eladmin.vip
* @description /
* @author Chanheng
* @date 2025-05-25
**/
@Data
public class MatchGroupDto implements Serializable {
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "Name")
private String name;
@ApiModelProperty(value = "Event id")
private Long eventId;
}

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.service.dto;
package com.srr.dto;
import lombok.Data;
import java.sql.Timestamp;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.service.dto;
package com.srr.dto;
import lombok.Data;
import me.zhengjie.annotation.Query;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.service.dto;
package com.srr.dto;
import lombok.Data;
import java.sql.Timestamp;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.service.dto;
package com.srr.dto;
import lombok.Data;
import java.sql.Timestamp;

View File

@ -0,0 +1,47 @@
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @website https://eladmin.vip
* @description /
* @author Chanheng
* @date 2025-05-25
**/
@Data
public class TeamDto implements Serializable {
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "Event")
private Long eventId;
@ApiModelProperty(value = "Name")
private String name;
@ApiModelProperty(value = "Team size")
private Integer teamSize;
@ApiModelProperty(value = "Team players")
private List<TeamPlayerDto> teamPlayers;
}

View File

@ -0,0 +1,49 @@
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @website https://eladmin.vip
* @description /
* @author Chanheng
* @date 2025-05-25
**/
@Data
public class TeamPlayerDto implements Serializable {
@ApiModelProperty(value = "id")
private Long id;
@ApiModelProperty(value = "Team id")
private Long teamId;
@ApiModelProperty(value = "Player id")
private Long playerId;
@ApiModelProperty(value = "Player name")
private String playerName;
@ApiModelProperty(value = "Score")
private Double score;
@ApiModelProperty(value = "Is checked in")
private Boolean isCheckedIn;
}

View File

@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.service.mapstruct;
package com.srr.dto.mapstruct;
import me.zhengjie.base.BaseMapper;
import com.srr.domain.Club;
import com.srr.service.dto.ClubDto;
import com.srr.dto.ClubDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;

View File

@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.service.mapstruct;
package com.srr.dto.mapstruct;
import me.zhengjie.base.BaseMapper;
import com.srr.domain.Court;
import com.srr.service.dto.CourtDto;
import com.srr.dto.CourtDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;

View File

@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.service.mapstruct;
package com.srr.dto.mapstruct;
import me.zhengjie.base.BaseMapper;
import com.srr.domain.Event;
import com.srr.service.dto.EventDto;
import com.srr.dto.EventDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;

View File

@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.service.mapstruct;
package com.srr.dto.mapstruct;
import me.zhengjie.base.BaseMapper;
import com.srr.domain.Player;
import com.srr.service.dto.PlayerDto;
import com.srr.dto.PlayerDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;

View File

@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.service.mapstruct;
package com.srr.dto.mapstruct;
import me.zhengjie.base.BaseMapper;
import com.srr.domain.Sport;
import com.srr.service.dto.SportDto;
import com.srr.dto.SportDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;

View File

@ -0,0 +1,7 @@
package com.srr.enumeration;
public enum EventStatus {
OPEN,
IN_PROGRESS,
CLOSED
}

View File

@ -0,0 +1,28 @@
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.repository;
import com.srr.domain.MatchGroup;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
/**
* @website https://eladmin.vip
* @author Chanheng
* @date 2025-05-25
**/
public interface MatchGroupRepository extends JpaRepository<MatchGroup, Long>, JpaSpecificationExecutor<MatchGroup> {
}

View File

@ -0,0 +1,28 @@
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.repository;
import com.srr.domain.Match;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
/**
* @website https://eladmin.vip
* @author Chanheng
* @date 2025-05-25
**/
public interface MatchRepository extends JpaRepository<Match, Long>, JpaSpecificationExecutor<Match> {
}

View File

@ -0,0 +1,28 @@
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.repository;
import com.srr.domain.TeamPlayer;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
/**
* @website https://eladmin.vip
* @author Chanheng
* @date 2025-05-25
**/
public interface TeamPlayerRepository extends JpaRepository<TeamPlayer, Long>, JpaSpecificationExecutor<TeamPlayer> {
}

View File

@ -0,0 +1,28 @@
/*
* Copyright 2019-2025 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.srr.repository;
import com.srr.domain.Team;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
/**
* @website https://eladmin.vip
* @author Chanheng
* @date 2025-05-25
**/
public interface TeamRepository extends JpaRepository<Team, Long>, JpaSpecificationExecutor<Team> {
}

View File

@ -18,7 +18,7 @@ package com.srr.rest;
import me.zhengjie.annotation.Log;
import com.srr.domain.Club;
import com.srr.service.ClubService;
import com.srr.service.dto.ClubQueryCriteria;
import com.srr.dto.ClubQueryCriteria;
import org.springframework.data.domain.Pageable;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
@ -30,7 +30,7 @@ import io.swagger.annotations.*;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import me.zhengjie.utils.PageResult;
import com.srr.service.dto.ClubDto;
import com.srr.dto.ClubDto;
/**
* @website https://eladmin.vip

View File

@ -18,7 +18,7 @@ package com.srr.rest;
import me.zhengjie.annotation.Log;
import com.srr.domain.Court;
import com.srr.service.CourtService;
import com.srr.service.dto.CourtQueryCriteria;
import com.srr.dto.CourtQueryCriteria;
import org.springframework.data.domain.Pageable;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
@ -30,7 +30,7 @@ import io.swagger.annotations.*;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import me.zhengjie.utils.PageResult;
import com.srr.service.dto.CourtDto;
import com.srr.dto.CourtDto;
/**
* @website https://eladmin.vip

View File

@ -18,7 +18,7 @@ package com.srr.rest;
import me.zhengjie.annotation.Log;
import com.srr.domain.Event;
import com.srr.service.EventService;
import com.srr.service.dto.EventQueryCriteria;
import com.srr.dto.EventQueryCriteria;
import org.springframework.data.domain.Pageable;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
@ -30,7 +30,7 @@ import io.swagger.annotations.*;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import me.zhengjie.utils.PageResult;
import com.srr.service.dto.EventDto;
import com.srr.dto.EventDto;
/**
* @website https://eladmin.vip

View File

@ -18,7 +18,7 @@ package com.srr.rest;
import me.zhengjie.annotation.Log;
import com.srr.domain.Player;
import com.srr.service.PlayerService;
import com.srr.service.dto.PlayerQueryCriteria;
import com.srr.dto.PlayerQueryCriteria;
import org.springframework.data.domain.Pageable;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
@ -30,7 +30,7 @@ import io.swagger.annotations.*;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import me.zhengjie.utils.PageResult;
import com.srr.service.dto.PlayerDto;
import com.srr.dto.PlayerDto;
/**
* @website https://eladmin.vip

View File

@ -18,7 +18,7 @@ package com.srr.rest;
import me.zhengjie.annotation.Log;
import com.srr.domain.Sport;
import com.srr.service.SportService;
import com.srr.service.dto.SportQueryCriteria;
import com.srr.dto.SportQueryCriteria;
import me.zhengjie.annotation.rest.AnonymousGetMapping;
import org.springframework.data.domain.Pageable;
import lombok.RequiredArgsConstructor;
@ -31,7 +31,7 @@ import io.swagger.annotations.*;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import me.zhengjie.utils.PageResult;
import com.srr.service.dto.SportDto;
import com.srr.dto.SportDto;
/**
* @website https://eladmin.vip

View File

@ -16,8 +16,8 @@
package com.srr.service;
import com.srr.domain.Club;
import com.srr.service.dto.ClubDto;
import com.srr.service.dto.ClubQueryCriteria;
import com.srr.dto.ClubDto;
import com.srr.dto.ClubQueryCriteria;
import org.springframework.data.domain.Pageable;
import java.util.List;

View File

@ -16,8 +16,8 @@
package com.srr.service;
import com.srr.domain.Court;
import com.srr.service.dto.CourtDto;
import com.srr.service.dto.CourtQueryCriteria;
import com.srr.dto.CourtDto;
import com.srr.dto.CourtQueryCriteria;
import org.springframework.data.domain.Pageable;
import java.util.List;

View File

@ -16,8 +16,8 @@
package com.srr.service;
import com.srr.domain.Event;
import com.srr.service.dto.EventDto;
import com.srr.service.dto.EventQueryCriteria;
import com.srr.dto.EventDto;
import com.srr.dto.EventQueryCriteria;
import org.springframework.data.domain.Pageable;
import java.util.List;

View File

@ -16,8 +16,8 @@
package com.srr.service;
import com.srr.domain.Player;
import com.srr.service.dto.PlayerDto;
import com.srr.service.dto.PlayerQueryCriteria;
import com.srr.dto.PlayerDto;
import com.srr.dto.PlayerQueryCriteria;
import org.springframework.data.domain.Pageable;
import java.util.List;

View File

@ -16,10 +16,10 @@
package com.srr.service;
import com.srr.domain.Sport;
import com.srr.service.dto.SportDto;
import com.srr.service.dto.SportQueryCriteria;
import com.srr.dto.SportDto;
import com.srr.dto.SportQueryCriteria;
import org.springframework.data.domain.Pageable;
import java.util.Map;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;

View File

@ -21,9 +21,9 @@ import me.zhengjie.utils.FileUtil;
import lombok.RequiredArgsConstructor;
import com.srr.repository.ClubRepository;
import com.srr.service.ClubService;
import com.srr.service.dto.ClubDto;
import com.srr.service.dto.ClubQueryCriteria;
import com.srr.service.mapstruct.ClubMapper;
import com.srr.dto.ClubDto;
import com.srr.dto.ClubQueryCriteria;
import com.srr.dto.mapstruct.ClubMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.data.domain.Page;

View File

@ -21,9 +21,9 @@ import me.zhengjie.utils.FileUtil;
import lombok.RequiredArgsConstructor;
import com.srr.repository.CourtRepository;
import com.srr.service.CourtService;
import com.srr.service.dto.CourtDto;
import com.srr.service.dto.CourtQueryCriteria;
import com.srr.service.mapstruct.CourtMapper;
import com.srr.dto.CourtDto;
import com.srr.dto.CourtQueryCriteria;
import com.srr.dto.mapstruct.CourtMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.data.domain.Page;

View File

@ -21,9 +21,9 @@ import me.zhengjie.utils.FileUtil;
import lombok.RequiredArgsConstructor;
import com.srr.repository.EventRepository;
import com.srr.service.EventService;
import com.srr.service.dto.EventDto;
import com.srr.service.dto.EventQueryCriteria;
import com.srr.service.mapstruct.EventMapper;
import com.srr.dto.EventDto;
import com.srr.dto.EventQueryCriteria;
import com.srr.dto.mapstruct.EventMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.data.domain.Page;

View File

@ -21,9 +21,9 @@ import me.zhengjie.utils.FileUtil;
import lombok.RequiredArgsConstructor;
import com.srr.repository.PlayerRepository;
import com.srr.service.PlayerService;
import com.srr.service.dto.PlayerDto;
import com.srr.service.dto.PlayerQueryCriteria;
import com.srr.service.mapstruct.PlayerMapper;
import com.srr.dto.PlayerDto;
import com.srr.dto.PlayerQueryCriteria;
import com.srr.dto.mapstruct.PlayerMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.data.domain.Page;

View File

@ -21,9 +21,9 @@ import me.zhengjie.utils.FileUtil;
import lombok.RequiredArgsConstructor;
import com.srr.repository.SportRepository;
import com.srr.service.SportService;
import com.srr.service.dto.SportDto;
import com.srr.service.dto.SportQueryCriteria;
import com.srr.service.mapstruct.SportMapper;
import com.srr.dto.SportDto;
import com.srr.dto.SportQueryCriteria;
import com.srr.dto.mapstruct.SportMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.data.domain.Page;