1
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -44,4 +44,13 @@
|
||||
<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>
|
||||
|
||||
@@ -110,4 +110,64 @@
|
||||
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 <= NOW()
|
||||
</when>
|
||||
<otherwise>
|
||||
AND expire_at > 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 <= NOW()
|
||||
</when>
|
||||
<otherwise>
|
||||
AND expire_at > NOW()
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
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));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
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));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,41 +1,4 @@
|
||||
com\gameplatform\server\mapper\agent\LinkTaskMapper.class
|
||||
com\gameplatform\server\exception\GlobalExceptionHandler$2.class
|
||||
com\gameplatform\server\service\link\LinkGenerationService.class
|
||||
com\gameplatform\server\mapper\agent\AgentPointsTxMapper.class
|
||||
com\gameplatform\server\config\CorsConfig.class
|
||||
com\gameplatform\server\exception\GlobalExceptionHandler.class
|
||||
com\gameplatform\server\model\dto\common\PageResult.class
|
||||
com\gameplatform\server\service\UserService.class
|
||||
com\gameplatform\server\controller\auth\AuthController.class
|
||||
com\gameplatform\server\GamePlatformServerApplication.class
|
||||
com\gameplatform\server\service\link\LinkGenerationService$GenerateResult.class
|
||||
com\gameplatform\server\mapper\admin\AnnouncementMapper.class
|
||||
com\gameplatform\server\service\auth\AuthService.class
|
||||
com\gameplatform\server\config\SwaggerConfig.class
|
||||
com\gameplatform\server\mapper\account\UserAccountMapper.class
|
||||
com\gameplatform\server\service\account\AccountService.class
|
||||
com\gameplatform\server\security\JwtAuthenticationFilter.class
|
||||
com\gameplatform\server\service\external\ScriptClient.class
|
||||
com\gameplatform\server\model\dto\link\LinkGenerateResponse.class
|
||||
com\gameplatform\server\controller\auth\AuthController$1.class
|
||||
com\gameplatform\server\model\dto\link\LinkGenerateRequest.class
|
||||
com\gameplatform\server\model\entity\admin\Announcement.class
|
||||
com\gameplatform\server\model\entity\agent\AgentPointsTx.class
|
||||
com\gameplatform\server\controller\admin\AccountController.class
|
||||
com\gameplatform\server\model\dto\auth\LoginRequest.class
|
||||
com\gameplatform\server\model\entity\account\UserAccount.class
|
||||
com\gameplatform\server\model\dto\auth\LoginResponse.class
|
||||
com\gameplatform\server\model\entity\agent\LinkTask.class
|
||||
com\gameplatform\server\controller\link\LinkController.class
|
||||
com\gameplatform\server\exception\GlobalExceptionHandler$1.class
|
||||
com\gameplatform\server\mapper\agent\LinkBatchMapper.class
|
||||
com\gameplatform\server\security\JwtService.class
|
||||
com\gameplatform\server\mapper\admin\OperationLogMapper.class
|
||||
com\gameplatform\server\model\entity\agent\LinkBatch.class
|
||||
com\gameplatform\server\security\SecurityConfig.class
|
||||
com\gameplatform\server\model\entity\admin\OperationLog.class
|
||||
com\gameplatform\server\model\dto\account\AccountResponse.class
|
||||
com\gameplatform\server\model\dto\account\AccountCreateRequest.class
|
||||
com\gameplatform\server\controller\link\QrProxyController.class
|
||||
com\gameplatform\server\model\dto\account\AccountUpdateRequest.class
|
||||
com\gameplatform\server\model\dto\account\ResetPasswordRequest.class
|
||||
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
|
||||
|
||||
@@ -1,37 +1,55 @@
|
||||
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\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\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\model\dto\auth\LoginRequest.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\link\QrProxyController.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\config\SwaggerConfig.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\entity\admin\OperationLog.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\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\common\PageResult.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\dto\link\LinkGenerateRequest.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\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\model\entity\admin\Announcement.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\model\entity\agent\LinkBatch.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
|
||||
|
||||
Reference in New Issue
Block a user