Update pom.xml for MyBatis Plus integration and downgrade Spring Boot version; refactor validation imports from Jakarta to Javax; modify mappers to extend BaseMapper for CRUD operations; clean up unused MyBatis-Flex mappers; adjust application.yml for MyBatis Plus configuration.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package com.gameplatform.server.model.dto.account;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@Schema(description = "账户创建请求")
|
||||
public class AccountCreateRequest {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.gameplatform.server.model.dto.account;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
@Schema(description = "账户更新请求")
|
||||
public class AccountUpdateRequest {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.gameplatform.server.model.dto.account;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
@Schema(description = "重置密码请求")
|
||||
public class ResetPasswordRequest {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.gameplatform.server.model.dto.auth;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
public class LoginRequest {
|
||||
@NotBlank
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.gameplatform.server.model.dto.link;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Max;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,15 +1,33 @@
|
||||
package com.gameplatform.server.model.entity.account;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@TableName("user_account")
|
||||
public class UserAccount {
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@TableField("user_type")
|
||||
private String userType; // ADMIN | AGENT
|
||||
|
||||
private String username; // 登录名(admin/agent 共用)
|
||||
|
||||
@TableField("password_hash")
|
||||
private String passwordHash; // BCrypt 或 PLAIN:xxx(初始化用)
|
||||
|
||||
private String status; // ENABLED / DISABLED
|
||||
|
||||
@TableField("points_balance")
|
||||
private Long pointsBalance; // 仅 AGENT 使用
|
||||
|
||||
@TableField("created_at")
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
@TableField("updated_at")
|
||||
private LocalDateTime updatedAt;
|
||||
|
||||
public Long getId() { return id; }
|
||||
|
||||
@@ -1,14 +1,29 @@
|
||||
package com.gameplatform.server.model.entity.admin;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@TableName("announcement")
|
||||
public class Announcement {
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
private String title;
|
||||
|
||||
private String content;
|
||||
|
||||
private Boolean enabled;
|
||||
|
||||
@TableField("jump_url")
|
||||
private String jumpUrl;
|
||||
|
||||
@TableField("created_at")
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
@TableField("updated_at")
|
||||
private LocalDateTime updatedAt;
|
||||
|
||||
public Long getId() { return id; }
|
||||
|
||||
@@ -1,16 +1,36 @@
|
||||
package com.gameplatform.server.model.entity.admin;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@TableName("operation_log")
|
||||
public class OperationLog {
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@TableField("actor_type")
|
||||
private String actorType; // admin | agent | system | user
|
||||
|
||||
@TableField("actor_id")
|
||||
private Long actorId;
|
||||
|
||||
@TableField("code_no")
|
||||
private String codeNo;
|
||||
|
||||
private String op;
|
||||
|
||||
private String detail; // JSON字符串
|
||||
|
||||
@TableField("client_ip")
|
||||
private String clientIp;
|
||||
|
||||
@TableField("user_agent")
|
||||
private String userAgent;
|
||||
|
||||
@TableField("created_at")
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
public Long getId() { return id; }
|
||||
|
||||
@@ -1,15 +1,34 @@
|
||||
package com.gameplatform.server.model.entity.admin;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@TableName("system_config")
|
||||
public class SystemConfig {
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@TableField("config_key")
|
||||
private String configKey;
|
||||
|
||||
@TableField("config_value")
|
||||
private String configValue;
|
||||
|
||||
@TableField("config_type")
|
||||
private String configType;
|
||||
|
||||
private String description;
|
||||
|
||||
@TableField("is_system")
|
||||
private Boolean isSystem;
|
||||
|
||||
@TableField("created_at")
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
@TableField("updated_at")
|
||||
private LocalDateTime updatedAt;
|
||||
|
||||
public Long getId() { return id; }
|
||||
|
||||
@@ -1,17 +1,39 @@
|
||||
package com.gameplatform.server.model.entity.agent;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@TableName("agent_points_tx")
|
||||
public class AgentPointsTx {
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@TableField("account_id")
|
||||
private Long accountId;
|
||||
|
||||
private String type; // ADD | DEDUCT
|
||||
|
||||
@TableField("before_points")
|
||||
private Long beforePoints;
|
||||
|
||||
@TableField("delta_points")
|
||||
private Long deltaPoints;
|
||||
|
||||
@TableField("after_points")
|
||||
private Long afterPoints;
|
||||
|
||||
private String reason; // create_links | manual | refund_no_rollback | other
|
||||
|
||||
@TableField("ref_id")
|
||||
private Long refId;
|
||||
|
||||
@TableField("operator_id")
|
||||
private Long operatorId;
|
||||
|
||||
@TableField("created_at")
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
public Long getId() { return id; }
|
||||
|
||||
@@ -1,13 +1,27 @@
|
||||
package com.gameplatform.server.model.entity.agent;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@TableName("link_batch")
|
||||
public class LinkBatch {
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@TableField("agent_id")
|
||||
private Long agentId;
|
||||
|
||||
private Integer quantity;
|
||||
|
||||
private Integer times;
|
||||
|
||||
@TableField("operator_id")
|
||||
private Long operatorId;
|
||||
|
||||
@TableField("created_at")
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
public Long getId() { return id; }
|
||||
|
||||
@@ -1,21 +1,50 @@
|
||||
package com.gameplatform.server.model.entity.agent;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@TableName("link_task")
|
||||
public class LinkTask {
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
@TableField("batch_id")
|
||||
private Long batchId;
|
||||
|
||||
@TableField("agent_id")
|
||||
private Long agentId;
|
||||
|
||||
@TableField("code_no")
|
||||
private String codeNo;
|
||||
|
||||
@TableField("token_hash")
|
||||
private String tokenHash;
|
||||
|
||||
@TableField("expire_at")
|
||||
private LocalDateTime expireAt;
|
||||
|
||||
private String status; // NEW | USING | LOGGED_IN | REFUNDED | EXPIRED
|
||||
|
||||
private String region; // Q | V
|
||||
|
||||
@TableField("machine_id")
|
||||
private String machineId;
|
||||
|
||||
@TableField("login_at")
|
||||
private LocalDateTime loginAt;
|
||||
|
||||
@TableField("refund_at")
|
||||
private LocalDateTime refundAt;
|
||||
|
||||
@TableField("revoked_at")
|
||||
private LocalDateTime revokedAt;
|
||||
|
||||
@TableField("created_at")
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
@TableField("updated_at")
|
||||
private LocalDateTime updatedAt;
|
||||
|
||||
public Long getId() { return id; }
|
||||
|
||||
Reference in New Issue
Block a user