feat: 增强二维码和图片代理功能
主要修改: 1. 在QrProxyController中新增多个图片代理接口,包括首页、首次赏金、中途赏金和结束赏金图片的获取。 2. 更新LinkController中的链接状态查询逻辑,简化日志输出。 3. 在LinkStatusService中优化链接状态处理逻辑,增加对USING状态的过期检查。 4. 在ScriptClient中新增通用图片获取方法,支持从脚本端获取图片数据。 5. 更新SecurityConfig,允许公开访问二维码和游戏界面数据接口。 技术细节: - 新增GameInterfaceResponse DTO以支持游戏界面数据的返回格式。 - 通过脚本端接口实现图片的动态获取和链接状态的自动刷新。
This commit is contained in:
@@ -16,32 +16,37 @@
|
||||
<result property="revokedAt" column="revoked_at" />
|
||||
<result property="createdAt" column="created_at" />
|
||||
<result property="updatedAt" column="updated_at" />
|
||||
<result property="needRefresh" column="need_refresh" />
|
||||
<result property="refreshTime" column="refresh_time" />
|
||||
<result property="qrCreatedAt" column="qr_created_at" />
|
||||
<result property="qrExpireAt" column="qr_expire_at" />
|
||||
<result property="firstRegionSelectAt" column="first_region_select_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
|
||||
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, need_refresh, refresh_time, qr_created_at, qr_expire_at, first_region_select_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
|
||||
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, need_refresh, refresh_time, qr_created_at, qr_expire_at, first_region_select_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
|
||||
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, need_refresh, refresh_time, qr_created_at, qr_expire_at, first_region_select_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 INTO link_task (batch_id, agent_id, code_no, token_hash, expire_at, status, region, machine_id, login_at, refund_at, revoked_at, need_refresh, refresh_time, qr_created_at, qr_expire_at, first_region_select_at)
|
||||
VALUES (#{batchId}, #{agentId}, #{codeNo}, #{tokenHash}, #{expireAt}, #{status}, #{region}, #{machineId}, #{loginAt}, #{refundAt}, #{revokedAt}, #{needRefresh}, #{refreshTime}, #{qrCreatedAt}, #{qrExpireAt}, #{firstRegionSelectAt})
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.gameplatform.server.model.entity.agent.LinkTask">
|
||||
@@ -53,6 +58,11 @@
|
||||
<if test="loginAt != null">login_at = #{loginAt},</if>
|
||||
<if test="refundAt != null">refund_at = #{refundAt},</if>
|
||||
<if test="revokedAt != null">revoked_at = #{revokedAt},</if>
|
||||
<if test="needRefresh != null">need_refresh = #{needRefresh},</if>
|
||||
<if test="refreshTime != null">refresh_time = #{refreshTime},</if>
|
||||
<if test="qrCreatedAt != null">qr_created_at = #{qrCreatedAt},</if>
|
||||
<if test="qrExpireAt != null">qr_expire_at = #{qrExpireAt},</if>
|
||||
<if test="firstRegionSelectAt != null">first_region_select_at = #{firstRegionSelectAt},</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
@@ -68,7 +78,7 @@
|
||||
</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
|
||||
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, need_refresh, refresh_time, qr_created_at, qr_expire_at, first_region_select_at
|
||||
FROM link_task
|
||||
WHERE agent_id = #{agentId}
|
||||
ORDER BY created_at DESC
|
||||
@@ -80,7 +90,7 @@
|
||||
</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
|
||||
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, need_refresh, refresh_time, qr_created_at, qr_expire_at, first_region_select_at
|
||||
FROM link_task
|
||||
WHERE agent_id = #{agentId} AND status = #{status}
|
||||
ORDER BY created_at DESC
|
||||
@@ -92,7 +102,7 @@
|
||||
</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
|
||||
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, need_refresh, refresh_time, qr_created_at, qr_expire_at, first_region_select_at
|
||||
FROM link_task
|
||||
WHERE batch_id = #{batchId}
|
||||
ORDER BY created_at DESC
|
||||
@@ -104,7 +114,7 @@
|
||||
</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
|
||||
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, need_refresh, refresh_time, qr_created_at, qr_expire_at, first_region_select_at
|
||||
FROM link_task
|
||||
WHERE expire_at <= #{expireTime} AND status IN ('NEW', 'USING')
|
||||
ORDER BY expire_at ASC
|
||||
@@ -112,7 +122,7 @@
|
||||
</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
|
||||
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, need_refresh, refresh_time, qr_created_at, qr_expire_at, first_region_select_at
|
||||
FROM link_task
|
||||
<where>
|
||||
agent_id = #{agentId}
|
||||
@@ -189,7 +199,7 @@
|
||||
</delete>
|
||||
|
||||
<select id="findByCodeNosAndAgentId" 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
|
||||
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, need_refresh, refresh_time, qr_created_at, qr_expire_at, first_region_select_at
|
||||
FROM link_task
|
||||
WHERE agent_id = #{agentId}
|
||||
AND code_no IN
|
||||
|
||||
Reference in New Issue
Block a user