This commit is contained in:
雷欧(林平凡)
2025-08-06 18:04:37 +08:00
parent 7edb6013c8
commit 8638187ced
13 changed files with 431 additions and 93 deletions

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?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.ruoyi.jarvis.mapper.SuperAdminMapper">
@@ -10,12 +10,13 @@
<result property="appKey" column="app_key"/>
<result property="secretKey" column="secret_key"/>
<result property="isActive" column="is_active"/>
<result property="isCount" column="is_count"/>
<result property="createdAt" column="created_at"/>
<result property="updatedAt" column="updated_at"/>
</resultMap>
<sql id="selectSuperAdminVo">
select id, wxid, name, union_id, app_key, secret_key, is_active, created_at, updated_at from super_admin
select id, wxid, name, union_id, app_key, secret_key, is_active, is_count, created_at, updated_at from super_admin
</sql>
<select id="selectSuperAdminList" parameterType="SuperAdmin" resultMap="SuperAdminResult">
@@ -23,7 +24,7 @@
<where>
<if test="wxid != null and wxid != ''"> and wxid = #{wxid}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="unionId != null and unionId != ''"> and union_id = #{unionId}</if>
<if test="unionId != null"> and union_id = #{unionId}</if>
<if test="appKey != null and appKey != ''"> and app_key = #{appKey}</if>
<if test="secretKey != null and secretKey != ''"> and secret_key = #{secretKey}</if>
<if test="isActive != null "> and is_active = #{isActive}</if>
@@ -36,12 +37,17 @@
where id = #{id}
</select>
<select id="selectSuperAdminByUnionId" parameterType="Long" resultMap="SuperAdminResult">
<include refid="selectSuperAdminVo"/>
where union_id = #{unionId}
</select>
<insert id="insertSuperAdmin" parameterType="SuperAdmin" useGeneratedKeys="true" keyProperty="id">
insert into super_admin
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="wxid != null and wxid != ''">wxid,</if>
<if test="name != null and name != ''">name,</if>
<if test="unionId != null and unionId != ''">union_id,</if>
<if test="unionId != null">union_id,</if>
<if test="appKey != null and appKey != ''">app_key,</if>
<if test="secretKey != null and secretKey != ''">secret_key,</if>
<if test="isActive != null">is_active,</if>
@@ -51,7 +57,7 @@
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="wxid != null and wxid != ''">#{wxid},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="unionId != null and unionId != ''">#{unionId},</if>
<if test="unionId != null">#{unionId},</if>
<if test="appKey != null and appKey != ''">#{appKey},</if>
<if test="secretKey != null and secretKey != ''">#{secretKey},</if>
<if test="isActive != null">#{isActive},</if>
@@ -65,10 +71,11 @@
<trim prefix="SET" suffixOverrides=",">
<if test="wxid != null and wxid != ''">wxid = #{wxid},</if>
<if test="name != null and name != ''">name = #{name},</if>
<if test="unionId != null and unionId != ''">union_id = #{unionId},</if>
<if test="unionId != null">union_id = #{unionId},</if>
<if test="appKey != null and appKey != ''">app_key = #{appKey},</if>
<if test="secretKey != null and secretKey != ''">secret_key = #{secretKey},</if>
<if test="isActive != null">is_active = #{isActive},</if>
<if test="isCount != null">is_count = #{isCount},</if>
updated_at = now(),
</trim>
where id = #{id}