Add .gitignore file and remove target directory from git tracking

This commit is contained in:
zyh
2025-08-26 15:21:06 +08:00
parent d3fe8fda7d
commit bd0a9e6dd7
16 changed files with 28 additions and 816 deletions

28
.gitignore vendored Normal file
View File

@@ -0,0 +1,28 @@
# Maven
target/
*.class
# IntelliJ IDEA
*.iml
*.ipr
*.iws
.idea/
# Eclipse
.settings/
.project
.classpath
# VSCode
.vscode/
# OS
.DS_Store
Thumbs.db
# Logs
*.log
# Temporary files
*.tmp
*.temp

View File

@@ -1,64 +0,0 @@
spring:
application:
name: gameplatform-server
datasource:
url: jdbc:mysql://localhost:3306/login_task_db?useSSL=false&serverTimezone=UTC&characterEncoding=utf8&allowPublicKeyRetrieval=true
username: root
password: root
driver-class-name: com.mysql.cj.jdbc.Driver
hikari:
maximum-pool-size: 10
minimum-idle: 2
connection-timeout: 30000
mybatis:
mapper-locations: classpath:mapper/**/*.xml
type-aliases-package: com.gameplatform.server.model
configuration:
map-underscore-to-camel-case: true
server:
port: 18080
management:
endpoints:
web:
exposure:
include: health,info
logging:
level:
root: info
com.gameplatform.server: debug
org.mybatis: debug
org.apache.ibatis: debug
com.zaxxer.hikari: info
security:
jwt:
secret: "change-this-secret-to-a-long-random-string-please"
access-token-minutes: 30
refresh-token-days: 7
# Swagger/OpenAPI 配置
springdoc:
api-docs:
path: /api-docs
swagger-ui:
path: /swagger-ui.html
tags-sorter: alpha
operations-sorter: alpha
doc-expansion: none
disable-swagger-default-url: true
display-request-duration: true
packages-to-scan: com.gameplatform.server.controller
# 外部脚本端配置与链接过期时间
script:
base-url: "http://36.138.184.60:12345"
connect-timeout-ms: 3000
read-timeout-ms: 5000
link:
expire-hours: 2

View File

@@ -1,83 +0,0 @@
<?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.gameplatform.server.mapper.account.UserAccountMapper">
<resultMap id="UserAccountMap" type="com.gameplatform.server.model.entity.account.UserAccount">
<id property="id" column="id" />
<result property="userType" column="user_type" />
<result property="username" column="username" />
<result property="passwordHash" column="password_hash" />
<result property="status" column="status" />
<result property="pointsBalance" column="points_balance" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<select id="findByUsernameAndType" resultMap="UserAccountMap">
SELECT id, user_type, username, password_hash, status, points_balance, created_at, updated_at
FROM user_account
WHERE username = #{username}
AND user_type = #{userType}
LIMIT 1
</select>
<select id="findByUsername" resultMap="UserAccountMap">
SELECT id, user_type, username, password_hash, status, points_balance, created_at, updated_at
FROM user_account
WHERE username = #{username}
LIMIT 1
</select>
<select id="findById" parameterType="long" resultMap="UserAccountMap">
SELECT id, user_type, username, password_hash, status, points_balance, created_at, updated_at
FROM user_account
WHERE id = #{id}
LIMIT 1
</select>
<insert id="insert" parameterType="com.gameplatform.server.model.entity.account.UserAccount" useGeneratedKeys="true" keyProperty="id">
INSERT INTO user_account (user_type, username, password_hash, status, points_balance)
VALUES (#{userType}, #{username}, #{passwordHash}, #{status}, #{pointsBalance})
</insert>
<update id="update" parameterType="com.gameplatform.server.model.entity.account.UserAccount">
UPDATE user_account
<set>
<if test="status != null">status = #{status},</if>
<if test="pointsBalance != null">points_balance = #{pointsBalance},</if>
</set>
WHERE id = #{id}
</update>
<update id="setStatus">
UPDATE user_account SET status = #{status} WHERE id = #{id}
</update>
<update id="updatePassword">
UPDATE user_account SET password_hash = #{passwordHash} WHERE id = #{id}
</update>
<select id="countByFilter" resultType="long">
SELECT COUNT(1) FROM user_account
<where>
<if test="userType != null and userType != ''">AND user_type = #{userType}</if>
<if test="status != null and status != ''">AND status = #{status}</if>
<if test="keyword != null and keyword != ''">
AND username LIKE CONCAT('%', #{keyword}, '%')
</if>
</where>
</select>
<select id="listByFilter" resultMap="UserAccountMap">
SELECT id, user_type, username, password_hash, status, points_balance, created_at, updated_at
FROM user_account
<where>
<if test="userType != null and userType != ''">AND user_type = #{userType}</if>
<if test="status != null and status != ''">AND status = #{status}</if>
<if test="keyword != null and keyword != ''">
AND username LIKE CONCAT('%', #{keyword}, '%')
</if>
</where>
ORDER BY id DESC
LIMIT #{size} OFFSET #{offset}
</select>
</mapper>

View File

@@ -1,67 +0,0 @@
<?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.gameplatform.server.mapper.admin.AnnouncementMapper">
<resultMap id="AnnouncementMap" type="com.gameplatform.server.model.entity.admin.Announcement">
<id property="id" column="id" />
<result property="title" column="title" />
<result property="content" column="content" />
<result property="enabled" column="enabled" />
<result property="jumpUrl" column="jump_url" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<select id="findById" parameterType="long" resultMap="AnnouncementMap">
SELECT id, title, content, enabled, jump_url, created_at, updated_at
FROM announcement
WHERE id = #{id}
LIMIT 1
</select>
<insert id="insert" parameterType="com.gameplatform.server.model.entity.admin.Announcement" useGeneratedKeys="true" keyProperty="id">
INSERT INTO announcement (title, content, enabled, jump_url)
VALUES (#{title}, #{content}, #{enabled}, #{jumpUrl})
</insert>
<update id="update" parameterType="com.gameplatform.server.model.entity.admin.Announcement">
UPDATE announcement
<set>
<if test="title != null">title = #{title},</if>
<if test="content != null">content = #{content},</if>
<if test="enabled != null">enabled = #{enabled},</if>
<if test="jumpUrl != null">jump_url = #{jumpUrl},</if>
</set>
WHERE id = #{id}
</update>
<delete id="deleteById" parameterType="long">
DELETE FROM announcement WHERE id = #{id}
</delete>
<select id="findAll" resultMap="AnnouncementMap">
SELECT id, title, content, enabled, jump_url, created_at, updated_at
FROM announcement
ORDER BY created_at DESC
LIMIT #{size} OFFSET #{offset}
</select>
<select id="countAll" resultType="long">
SELECT COUNT(1) FROM announcement
</select>
<select id="findByEnabled" resultMap="AnnouncementMap">
SELECT id, title, content, enabled, jump_url, created_at, updated_at
FROM announcement
WHERE enabled = #{enabled}
ORDER BY created_at DESC
LIMIT #{size} OFFSET #{offset}
</select>
<select id="countByEnabled" resultType="long">
SELECT COUNT(1) FROM announcement WHERE enabled = #{enabled}
</select>
<update id="updateEnabled">
UPDATE announcement SET enabled = #{enabled} WHERE id = #{id}
</update>
</mapper>

View File

@@ -1,74 +0,0 @@
<?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.gameplatform.server.mapper.admin.OperationLogMapper">
<resultMap id="OperationLogMap" type="com.gameplatform.server.model.entity.admin.OperationLog">
<id property="id" column="id" />
<result property="actorType" column="actor_type" />
<result property="actorId" column="actor_id" />
<result property="codeNo" column="code_no" />
<result property="op" column="op" />
<result property="detail" column="detail" />
<result property="clientIp" column="client_ip" />
<result property="userAgent" column="user_agent" />
<result property="createdAt" column="created_at" />
</resultMap>
<select id="findById" parameterType="long" resultMap="OperationLogMap">
SELECT id, actor_type, actor_id, code_no, op, detail, client_ip, user_agent, created_at
FROM operation_log
WHERE id = #{id}
LIMIT 1
</select>
<insert id="insert" parameterType="com.gameplatform.server.model.entity.admin.OperationLog" useGeneratedKeys="true" keyProperty="id">
INSERT INTO operation_log (actor_type, actor_id, code_no, op, detail, client_ip, user_agent)
VALUES (#{actorType}, #{actorId}, #{codeNo}, #{op}, #{detail}, #{clientIp}, #{userAgent})
</insert>
<select id="findByCodeNo" resultMap="OperationLogMap">
SELECT id, actor_type, actor_id, code_no, op, detail, client_ip, user_agent, created_at
FROM operation_log
WHERE code_no = #{codeNo}
ORDER BY created_at DESC
LIMIT #{size} OFFSET #{offset}
</select>
<select id="countByCodeNo" resultType="long">
SELECT COUNT(1) FROM operation_log WHERE code_no = #{codeNo}
</select>
<select id="findByActorId" resultMap="OperationLogMap">
SELECT id, actor_type, actor_id, code_no, op, detail, client_ip, user_agent, created_at
FROM operation_log
WHERE actor_id = #{actorId}
ORDER BY created_at DESC
LIMIT #{size} OFFSET #{offset}
</select>
<select id="countByActorId" resultType="long">
SELECT COUNT(1) FROM operation_log WHERE actor_id = #{actorId}
</select>
<select id="findByActorType" resultMap="OperationLogMap">
SELECT id, actor_type, actor_id, code_no, op, detail, client_ip, user_agent, created_at
FROM operation_log
WHERE actor_type = #{actorType}
ORDER BY created_at DESC
LIMIT #{size} OFFSET #{offset}
</select>
<select id="countByActorType" resultType="long">
SELECT COUNT(1) FROM operation_log WHERE actor_type = #{actorType}
</select>
<select id="findAll" resultMap="OperationLogMap">
SELECT id, actor_type, actor_id, code_no, op, detail, client_ip, user_agent, created_at
FROM operation_log
ORDER BY created_at DESC
LIMIT #{size} OFFSET #{offset}
</select>
<select id="countAll" resultType="long">
SELECT COUNT(1) FROM operation_log
</select>
</mapper>

View File

@@ -1,68 +0,0 @@
<?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.gameplatform.server.mapper.admin.SystemConfigMapper">
<resultMap id="SystemConfigMap" type="com.gameplatform.server.model.entity.admin.SystemConfig">
<id property="id" column="id" />
<result property="configKey" column="config_key" />
<result property="configValue" column="config_value" />
<result property="configType" column="config_type" />
<result property="description" column="description" />
<result property="isSystem" column="is_system" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<select id="findById" parameterType="long" resultMap="SystemConfigMap">
SELECT id, config_key, config_value, config_type, description, is_system, created_at, updated_at
FROM system_config
WHERE id = #{id}
LIMIT 1
</select>
<select id="findByKey" parameterType="string" resultMap="SystemConfigMap">
SELECT id, config_key, config_value, config_type, description, is_system, created_at, updated_at
FROM system_config
WHERE config_key = #{configKey}
LIMIT 1
</select>
<select id="findByType" parameterType="string" resultMap="SystemConfigMap">
SELECT id, config_key, config_value, config_type, description, is_system, created_at, updated_at
FROM system_config
WHERE config_type = #{configType}
ORDER BY config_key ASC
</select>
<select id="findAll" resultMap="SystemConfigMap">
SELECT id, config_key, config_value, config_type, description, is_system, created_at, updated_at
FROM system_config
ORDER BY config_key ASC
LIMIT #{size} OFFSET #{offset}
</select>
<select id="countAll" resultType="long">
SELECT COUNT(1) FROM system_config
</select>
<insert id="insert" parameterType="com.gameplatform.server.model.entity.admin.SystemConfig" useGeneratedKeys="true" keyProperty="id">
INSERT INTO system_config (config_key, config_value, config_type, description, is_system)
VALUES (#{configKey}, #{configValue}, #{configType}, #{description}, #{isSystem})
</insert>
<update id="update" parameterType="com.gameplatform.server.model.entity.admin.SystemConfig">
UPDATE system_config
SET config_value = #{configValue},
config_type = #{configType},
description = #{description},
is_system = #{isSystem}
WHERE id = #{id}
</update>
<delete id="deleteById" parameterType="long">
DELETE FROM system_config WHERE id = #{id}
</delete>
<delete id="deleteByKey" parameterType="string">
DELETE FROM system_config WHERE config_key = #{configKey}
</delete>
</mapper>

View File

@@ -1,52 +0,0 @@
<?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.gameplatform.server.mapper.agent.AgentPointsTxMapper">
<resultMap id="AgentPointsTxMap" type="com.gameplatform.server.model.entity.agent.AgentPointsTx">
<id property="id" column="id" />
<result property="accountId" column="account_id" />
<result property="type" column="type" />
<result property="beforePoints" column="before_points" />
<result property="deltaPoints" column="delta_points" />
<result property="afterPoints" column="after_points" />
<result property="reason" column="reason" />
<result property="refId" column="ref_id" />
<result property="operatorId" column="operator_id" />
<result property="createdAt" column="created_at" />
</resultMap>
<select id="findById" parameterType="long" resultMap="AgentPointsTxMap">
SELECT id, account_id, type, before_points, delta_points, after_points, reason, ref_id, operator_id, created_at
FROM agent_points_tx
WHERE id = #{id}
LIMIT 1
</select>
<insert id="insert" parameterType="com.gameplatform.server.model.entity.agent.AgentPointsTx" useGeneratedKeys="true" keyProperty="id">
INSERT INTO agent_points_tx (account_id, type, before_points, delta_points, after_points, reason, ref_id, operator_id)
VALUES (#{accountId}, #{type}, #{beforePoints}, #{deltaPoints}, #{afterPoints}, #{reason}, #{refId}, #{operatorId})
</insert>
<select id="findByAccountId" resultMap="AgentPointsTxMap">
SELECT id, account_id, type, before_points, delta_points, after_points, reason, ref_id, operator_id, created_at
FROM agent_points_tx
WHERE account_id = #{accountId}
ORDER BY created_at DESC
LIMIT #{size} OFFSET #{offset}
</select>
<select id="countByAccountId" resultType="long">
SELECT COUNT(1) FROM agent_points_tx WHERE account_id = #{accountId}
</select>
<select id="findByAccountIdAndType" resultMap="AgentPointsTxMap">
SELECT id, account_id, type, before_points, delta_points, after_points, reason, ref_id, operator_id, created_at
FROM agent_points_tx
WHERE account_id = #{accountId} AND type = #{type}
ORDER BY created_at DESC
LIMIT #{size} OFFSET #{offset}
</select>
<select id="countByAccountIdAndType" resultType="long">
SELECT COUNT(1) FROM agent_points_tx WHERE account_id = #{accountId} AND type = #{type}
</select>
</mapper>

View File

@@ -1,56 +0,0 @@
<?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.gameplatform.server.mapper.agent.LinkBatchMapper">
<resultMap id="LinkBatchMap" type="com.gameplatform.server.model.entity.agent.LinkBatch">
<id property="id" column="id" />
<result property="agentId" column="agent_id" />
<result property="quantity" column="quantity" />
<result property="times" column="times" />
<result property="operatorId" column="operator_id" />
<result property="createdAt" column="created_at" />
</resultMap>
<select id="findById" parameterType="long" resultMap="LinkBatchMap">
SELECT id, agent_id, quantity, times, operator_id, created_at
FROM link_batch
WHERE id = #{id}
LIMIT 1
</select>
<insert id="insert" parameterType="com.gameplatform.server.model.entity.agent.LinkBatch" useGeneratedKeys="true" keyProperty="id">
INSERT INTO link_batch (agent_id, quantity, times, operator_id)
VALUES (#{agentId}, #{quantity}, #{times}, #{operatorId})
</insert>
<select id="findByAgentId" resultMap="LinkBatchMap">
SELECT id, agent_id, quantity, times, operator_id, created_at
FROM link_batch
WHERE agent_id = #{agentId}
ORDER BY created_at DESC
LIMIT #{size} OFFSET #{offset}
</select>
<select id="countByAgentId" resultType="long">
SELECT COUNT(1) FROM link_batch WHERE agent_id = #{agentId}
</select>
<select id="findAll" resultMap="LinkBatchMap">
SELECT id, agent_id, quantity, times, operator_id, created_at
FROM link_batch
ORDER BY created_at DESC
LIMIT #{size} OFFSET #{offset}
</select>
<select id="countAll" resultType="long">
SELECT COUNT(1) FROM link_batch
</select>
<select id="findByIds" resultMap="LinkBatchMap">
SELECT id, agent_id, quantity, times, operator_id, created_at
FROM link_batch
WHERE id IN
<foreach item="id" collection="ids" open="(" separator="," close=")">
#{id}
</foreach>
</select>
</mapper>

View File

@@ -1,173 +0,0 @@
<?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.gameplatform.server.mapper.agent.LinkTaskMapper">
<resultMap id="LinkTaskMap" type="com.gameplatform.server.model.entity.agent.LinkTask">
<id property="id" column="id" />
<result property="batchId" column="batch_id" />
<result property="agentId" column="agent_id" />
<result property="codeNo" column="code_no" />
<result property="tokenHash" column="token_hash" />
<result property="expireAt" column="expire_at" />
<result property="status" column="status" />
<result property="region" column="region" />
<result property="machineId" column="machine_id" />
<result property="loginAt" column="login_at" />
<result property="refundAt" column="refund_at" />
<result property="revokedAt" column="revoked_at" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<select id="findById" parameterType="long" resultMap="LinkTaskMap">
SELECT id, batch_id, agent_id, code_no, token_hash, expire_at, status, region, machine_id, login_at, refund_at, revoked_at, created_at, updated_at
FROM link_task
WHERE id = #{id}
LIMIT 1
</select>
<select id="findByCodeNo" parameterType="string" resultMap="LinkTaskMap">
SELECT id, batch_id, agent_id, code_no, token_hash, expire_at, status, region, machine_id, login_at, refund_at, revoked_at, created_at, updated_at
FROM link_task
WHERE code_no = #{codeNo}
LIMIT 1
</select>
<select id="findByTokenHash" parameterType="string" resultMap="LinkTaskMap">
SELECT id, batch_id, agent_id, code_no, token_hash, expire_at, status, region, machine_id, login_at, refund_at, revoked_at, created_at, updated_at
FROM link_task
WHERE token_hash = #{tokenHash}
LIMIT 1
</select>
<insert id="insert" parameterType="com.gameplatform.server.model.entity.agent.LinkTask" useGeneratedKeys="true" keyProperty="id">
INSERT INTO link_task (batch_id, agent_id, code_no, token_hash, expire_at, status, region, machine_id, login_at, refund_at, revoked_at)
VALUES (#{batchId}, #{agentId}, #{codeNo}, #{tokenHash}, #{expireAt}, #{status}, #{region}, #{machineId}, #{loginAt}, #{refundAt}, #{revokedAt})
</insert>
<update id="update" parameterType="com.gameplatform.server.model.entity.agent.LinkTask">
UPDATE link_task
<set>
<if test="status != null">status = #{status},</if>
<if test="region != null">region = #{region},</if>
<if test="machineId != null">machine_id = #{machineId},</if>
<if test="loginAt != null">login_at = #{loginAt},</if>
<if test="refundAt != null">refund_at = #{refundAt},</if>
<if test="revokedAt != null">revoked_at = #{revokedAt},</if>
</set>
WHERE id = #{id}
</update>
<update id="updateStatus">
UPDATE link_task SET status = #{status} WHERE id = #{id}
</update>
<update id="updateStatusAndMachine">
UPDATE link_task
SET status = #{status}, region = #{region}, machine_id = #{machineId}, login_at = #{loginAt}
WHERE id = #{id}
</update>
<select id="findByAgentId" resultMap="LinkTaskMap">
SELECT id, batch_id, agent_id, code_no, token_hash, expire_at, status, region, machine_id, login_at, refund_at, revoked_at, created_at, updated_at
FROM link_task
WHERE agent_id = #{agentId}
ORDER BY created_at DESC
LIMIT #{size} OFFSET #{offset}
</select>
<select id="countByAgentId" resultType="long">
SELECT COUNT(1) FROM link_task WHERE agent_id = #{agentId}
</select>
<select id="findByAgentIdAndStatus" resultMap="LinkTaskMap">
SELECT id, batch_id, agent_id, code_no, token_hash, expire_at, status, region, machine_id, login_at, refund_at, revoked_at, created_at, updated_at
FROM link_task
WHERE agent_id = #{agentId} AND status = #{status}
ORDER BY created_at DESC
LIMIT #{size} OFFSET #{offset}
</select>
<select id="countByAgentIdAndStatus" resultType="long">
SELECT COUNT(1) FROM link_task WHERE agent_id = #{agentId} AND status = #{status}
</select>
<select id="findByBatchId" resultMap="LinkTaskMap">
SELECT id, batch_id, agent_id, code_no, token_hash, expire_at, status, region, machine_id, login_at, refund_at, revoked_at, created_at, updated_at
FROM link_task
WHERE batch_id = #{batchId}
ORDER BY created_at DESC
LIMIT #{size} OFFSET #{offset}
</select>
<select id="countByBatchId" resultType="long">
SELECT COUNT(1) FROM link_task WHERE batch_id = #{batchId}
</select>
<select id="findExpiredTasks" resultMap="LinkTaskMap">
SELECT id, batch_id, agent_id, code_no, token_hash, expire_at, status, region, machine_id, login_at, refund_at, revoked_at, created_at, updated_at
FROM link_task
WHERE expire_at &lt;= #{expireTime} AND status IN ('NEW', 'USING')
ORDER BY expire_at ASC
LIMIT #{size}
</select>
<select id="findLinkTasksWithConditions" resultMap="LinkTaskMap">
SELECT id, batch_id, agent_id, code_no, token_hash, expire_at, status, region, machine_id, login_at, refund_at, revoked_at, created_at, updated_at
FROM link_task
<where>
agent_id = #{agentId}
<if test="status != null and status != ''">
AND status = #{status}
</if>
<if test="batchId != null">
AND batch_id = #{batchId}
</if>
<if test="isExpired != null">
<choose>
<when test="isExpired == true">
AND expire_at &lt;= NOW()
</when>
<otherwise>
AND expire_at &gt; NOW()
</otherwise>
</choose>
</if>
</where>
<choose>
<when test="sortBy == 'expireAt'">
ORDER BY expire_at ${sortDir}
</when>
<when test="sortBy == 'updatedAt'">
ORDER BY updated_at ${sortDir}
</when>
<otherwise>
ORDER BY created_at ${sortDir}
</otherwise>
</choose>
LIMIT #{size} OFFSET #{offset}
</select>
<select id="countLinkTasksWithConditions" resultType="long">
SELECT COUNT(1)
FROM link_task
<where>
agent_id = #{agentId}
<if test="status != null and status != ''">
AND status = #{status}
</if>
<if test="batchId != null">
AND batch_id = #{batchId}
</if>
<if test="isExpired != null">
<choose>
<when test="isExpired == true">
AND expire_at &lt;= NOW()
</when>
<otherwise>
AND expire_at &gt; NOW()
</otherwise>
</choose>
</if>
</where>
</select>
</mapper>

View File

@@ -1,8 +0,0 @@
-- Initial database schema for game_platform
CREATE TABLE IF NOT EXISTS users (
id BIGINT PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(50) NOT NULL,
email VARCHAR(120) NULL,
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
);

View File

@@ -1,50 +0,0 @@
package com.gameplatform.server.model.entity.agent.table;
import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;
// Auto generate by mybatis-flex, do not modify it.
public class LinkBatchTableDef extends TableDef {
public static final LinkBatchTableDef LINK_BATCH = new LinkBatchTableDef();
public final QueryColumn ID = new QueryColumn(this, "id");
public final QueryColumn TIMES = new QueryColumn(this, "times");
public final QueryColumn AGENT_ID = new QueryColumn(this, "agent_id");
public final QueryColumn QUANTITY = new QueryColumn(this, "quantity");
public final QueryColumn BATCH_SIZE = new QueryColumn(this, "batch_size");
public final QueryColumn CREATED_AT = new QueryColumn(this, "created_at");
public final QueryColumn OPERATOR_ID = new QueryColumn(this, "operator_id");
public final QueryColumn DEDUCT_POINTS = new QueryColumn(this, "deduct_points");
/**
* 所有字段。
*/
public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");
/**
* 默认字段,不包含逻辑删除或者 large 等字段。
*/
public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, TIMES, AGENT_ID, QUANTITY, BATCH_SIZE, CREATED_AT, OPERATOR_ID, DEDUCT_POINTS};
public LinkBatchTableDef() {
super("", "link_batch");
}
private LinkBatchTableDef(String schema, String name, String alisa) {
super(schema, name, alisa);
}
public LinkBatchTableDef as(String alias) {
String key = getNameWithSchema() + "." + alias;
return getCache(key, k -> new LinkBatchTableDef("", "link_batch", alias));
}
}

View File

@@ -1,62 +0,0 @@
package com.gameplatform.server.model.entity.agent.table;
import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;
// Auto generate by mybatis-flex, do not modify it.
public class LinkTaskTableDef extends TableDef {
public static final LinkTaskTableDef LINK_TASK = new LinkTaskTableDef();
public final QueryColumn ID = new QueryColumn(this, "id");
public final QueryColumn CODE_NO = new QueryColumn(this, "code_no");
public final QueryColumn REGION = new QueryColumn(this, "region");
public final QueryColumn STATUS = new QueryColumn(this, "status");
public final QueryColumn AGENT_ID = new QueryColumn(this, "agent_id");
public final QueryColumn BATCH_ID = new QueryColumn(this, "batch_id");
public final QueryColumn LOGIN_AT = new QueryColumn(this, "login_at");
public final QueryColumn EXPIRE_AT = new QueryColumn(this, "expire_at");
public final QueryColumn REFUND_AT = new QueryColumn(this, "refund_at");
public final QueryColumn CREATED_AT = new QueryColumn(this, "created_at");
public final QueryColumn MACHINE_ID = new QueryColumn(this, "machine_id");
public final QueryColumn REVOKED_AT = new QueryColumn(this, "revoked_at");
public final QueryColumn TOKEN_HASH = new QueryColumn(this, "token_hash");
public final QueryColumn UPDATED_AT = new QueryColumn(this, "updated_at");
/**
* 所有字段。
*/
public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");
/**
* 默认字段,不包含逻辑删除或者 large 等字段。
*/
public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, CODE_NO, REGION, STATUS, AGENT_ID, BATCH_ID, LOGIN_AT, EXPIRE_AT, REFUND_AT, CREATED_AT, MACHINE_ID, REVOKED_AT, TOKEN_HASH, UPDATED_AT};
public LinkTaskTableDef() {
super("", "link_task");
}
private LinkTaskTableDef(String schema, String name, String alisa) {
super(schema, name, alisa);
}
public LinkTaskTableDef as(String alias) {
String key = getNameWithSchema() + "." + alias;
return getCache(key, k -> new LinkTaskTableDef("", "link_task", alias));
}
}

View File

@@ -1,4 +0,0 @@
com\gameplatform\server\model\entity\agent\table\LinkTaskTableDef.class
com\gameplatform\server\service\link\FlexLinkListService.class
com\gameplatform\server\service\link\OptimizedFlexLinkListService.class
com\gameplatform\server\model\entity\agent\table\LinkBatchTableDef.class

View File

@@ -1,55 +0,0 @@
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\mapper\agent\AgentPointsTxMapper.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\mapper\admin\AnnouncementMapper.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\service\link\FlexLinkListService.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\service\account\AccountService.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\service\auth\AuthService.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\controller\admin\AccountController.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\service\external\ScriptClient.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\mapper\agent\LinkBatchMapper.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\controller\admin\SystemConfigController.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\mapper\agent\LinkTaskMapper.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\entity\admin\SystemConfig.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\dto\account\AccountResponse.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\dto\link\LinkListItem.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\service\UserService.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\dto\common\PageResult.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\dto\link\LinkGenerateRequest.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\service\link\SimplifiedFlexLinkListService.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\dto\account\AccountUpdateRequest.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\security\JwtAuthenticationFilter.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\entity\agent\AgentPointsTx.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\dto\auth\LoginResponse.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\controller\link\LinkController.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\mapper\admin\OperationLogMapper.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\service\link\LinkListService.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\dto\admin\SystemConfigConverter.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\mapper\flex\agent\LinkTaskFlexMapper.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\entity\agent\LinkBatch.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\dto\link\LinkListResponse.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\security\SecurityConfig.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\dto\account\ResetPasswordRequest.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\service\link\LinkStatusService.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\dto\auth\LoginRequest.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\dto\admin\SystemConfigResponse.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\controller\link\QrProxyController.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\config\SwaggerConfig.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\entity\admin\OperationLog.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\controller\auth\AuthController.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\security\JwtService.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\config\CorsConfig.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\dto\admin\SystemConfigRequest.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\dto\link\LinkGenerateResponse.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\GamePlatformServerApplication.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\entity\agent\LinkTask.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\entity\admin\Announcement.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\dto\link\LinkStatusResponse.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\service\admin\SystemConfigService.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\dto\link\LinkListRequest.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\service\link\LinkGenerationService.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\exception\GlobalExceptionHandler.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\mapper\admin\SystemConfigMapper.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\mapper\account\UserAccountMapper.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\service\link\OptimizedFlexLinkListService.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\mapper\flex\agent\LinkBatchFlexMapper.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\dto\account\AccountCreateRequest.java
D:\project\gamePlatform\server\src\main\java\com\gameplatform\server\model\entity\account\UserAccount.java