新增apiKey和相关逻辑

This commit is contained in:
lu7213 committed 2026-10-09 10:58:25 -04:00
1 parent bc772b8b15
commit 051f78b59c
9 files changed
+77 -15

No files matched your search

@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="id" column="id" />
<result property="appId" column="app_id" />
<result property="userId" column="user_id" />
<result property="apiKey" column="api_key" />
<result property="apiSecret" column="api_secret" />
<result property="status" column="status" />
<result property="expiredAt" column="expired_at" />
@@ -17,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectAppApiKeysVo">
select id, app_id, user_id, api_secret, status, expired_at, created_at, deleted_at, updated_at from app_api_keys
select id, app_id, user_id, api_key, api_secret, status, expired_at, created_at, deleted_at, updated_at from app_api_keys
</sql>
<select id="selectAppApiKeysList" parameterType="AppApiKeys" resultMap="AppApiKeysResult">
@@ -27,6 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="appId != null "> and app_id = #{appId}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="apiSecret != null and apiSecret != ''"> and api_secret = #{apiSecret}</if>
<if test="apiKey != null and apiKey != ''"> and api_key = #{apiKey}</if>
<if test="status != null "> and status = #{status}</if>
<if test="expiredAt != null "> and expired_at = #{expiredAt}</if>
</where>
@@ -42,6 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="appId != null">app_id,</if>
<if test="userId != null">user_id,</if>
<if test="apiKey != null and apiKey != ''">api_key,</if>
<if test="apiSecret != null and apiSecret != ''">api_secret,</if>
<if test="status != null">status,</if>
<if test="expiredAt != null">expired_at,</if>
@@ -52,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="appId != null">#{appId},</if>
<if test="userId != null">#{userId},</if>
<if test="apiKey != null and apiKey != ''">#{apiKey},</if>
<if test="apiSecret != null and apiSecret != ''">#{apiSecret},</if>
<if test="status != null">#{status},</if>
<if test="expiredAt != null">#{expiredAt},</if>
@@ -66,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=",">
<if test="appId != null">app_id = #{appId},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="apiKey != null and apiKey != ''">api_key = #{apiKey},</if>
<if test="apiSecret != null and apiSecret != ''">api_secret = #{apiSecret},</if>
<if test="status != null">status = #{status},</if>
<if test="expiredAt != null">expired_at = #{expiredAt},</if>