feat(TenantSecretKey): 添加代理id字段并更新相关映射- 在 TenantSecretKey 类中添加 agentId 字段

- 更新 TenantSecretKeyMapper.xml 文件,添加 agentId 的映射
- 在查询、插入和更新语句中加入 agentId 相关的条件和字段
main-p
shi 2025-02-20 14:46:09 +08:00
parent 5fce3d77c9
commit b44ef7f120
2 changed files with 11 additions and 1 deletions

View File

@ -24,6 +24,11 @@ public class TenantSecretKey extends BaseEntity
/** 主键id */
private Long id;
/**
* id
*/
private Long agentId;
/** 租户key */
@Excel(name = "租户key")
private String tenantKey;

View File

@ -6,6 +6,7 @@
<resultMap type="TenantSecretKey" id="TenantSecretKeyResult">
<result property="id" column="id" />
<result property="agentId" column="agent_id" />
<result property="tenantKey" column="tenant_key" />
<result property="tenantSn" column="tenant_sn" />
<result property="tenantSecret" column="tenant_secret" />
@ -18,13 +19,14 @@
</resultMap>
<sql id="selectTenantSecretKeyVo">
select id, tenant_key, tenant_sn, tenant_secret, tenant_status, tenant_type, create_by, create_time, update_by, update_time from ff_tenant_secret_key
select id,agent_id, tenant_key, tenant_sn, tenant_secret, tenant_status, tenant_type, create_by, create_time, update_by, update_time from ff_tenant_secret_key
</sql>
<select id="selectTenantSecretKeyList" parameterType="TenantSecretKey" resultMap="TenantSecretKeyResult">
<include refid="selectTenantSecretKeyVo"/>
<where>
<if test="tenantKey != null and tenantKey != ''"> and tenant_key = #{tenantKey}</if>
<if test="agentId != null "> and agent_id = #{agentId}</if>
<if test="tenantSn != null and tenantSn != ''"> and tenant_sn = #{tenantSn}</if>
<if test="tenantSecret != null and tenantSecret != ''"> and tenant_secret = #{tenantSecret}</if>
<if test="tenantStatus != null "> and tenant_status = #{tenantStatus}</if>
@ -46,6 +48,7 @@
insert into ff_tenant_secret_key
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tenantKey != null and tenantKey != ''">tenant_key,</if>
<if test="agentId != null ">agent_id,</if>
<if test="tenantSn != null">tenant_sn,</if>
<if test="tenantSecret != null and tenantSecret != ''">tenant_secret,</if>
<if test="tenantStatus != null">tenant_status,</if>
@ -57,6 +60,7 @@
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tenantKey != null and tenantKey != ''">#{tenantKey},</if>
<if test="agentId != null ">#{agentId},</if>
<if test="tenantSn != null">#{tenantSn},</if>
<if test="tenantSecret != null and tenantSecret != ''">#{tenantSecret},</if>
<if test="tenantStatus != null">#{tenantStatus},</if>
@ -72,6 +76,7 @@
update ff_tenant_secret_key
<trim prefix="SET" suffixOverrides=",">
<if test="tenantKey != null and tenantKey != ''">tenant_key = #{tenantKey},</if>
<if test="agentId != null ">agent_id = #{agentId},</if>
<if test="tenantSn != null">tenant_sn = #{tenantSn},</if>
<if test="tenantSecret != null and tenantSecret != ''">tenant_secret = #{tenantSecret},</if>
<if test="tenantStatus != null">tenant_status = #{tenantStatus},</if>