|
@@ -0,0 +1,89 @@
|
|
|
|
+<?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.manage.mapper.AppManageMapper">
|
|
|
|
+
|
|
|
|
+ <resultMap type="AppManage" id="AppManageResult">
|
|
|
|
+ <result property="appId" column="app_id" />
|
|
|
|
+ <result property="appKey" column="app_key" />
|
|
|
|
+ <result property="appName" column="app_name" />
|
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
|
+ <result property="remark" column="remark" />
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
+ <sql id="selectAppManageVo">
|
|
|
|
+ select app_id, app_key, app_name, del_flag, create_by, create_time, update_by, update_time, remark from app_manage
|
|
|
|
+ </sql>
|
|
|
|
+
|
|
|
|
+ <select id="selectAppManageList" parameterType="AppManage" resultMap="AppManageResult">
|
|
|
|
+ <include refid="selectAppManageVo"/>
|
|
|
|
+ <where>
|
|
|
|
+ <if test="appKey != null and appKey != ''"> and app_key = #{appKey}</if>
|
|
|
|
+ <if test="appName != null and appName != ''"> and app_name like concat('%', #{appName}, '%')</if>
|
|
|
|
+ </where>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="selectAppManageByAppId" parameterType="Long" resultMap="AppManageResult">
|
|
|
|
+ <include refid="selectAppManageVo"/>
|
|
|
|
+ where app_id = #{appId}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="selectAppManageByAppKey" parameterType="String" resultMap="AppManageResult">
|
|
|
|
+ <include refid="selectAppManageVo"/>
|
|
|
|
+ where app_key = #{appKey}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <insert id="insertAppManage" parameterType="AppManage" useGeneratedKeys="true" keyProperty="appId">
|
|
|
|
+ insert into app_manage
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="appKey != null and appKey != ''">app_key,</if>
|
|
|
|
+ <if test="appName != null and appName != ''">app_name,</if>
|
|
|
|
+ <if test="delFlag != null">del_flag,</if>
|
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="appKey != null and appKey != ''">#{appKey},</if>
|
|
|
|
+ <if test="appName != null and appName != ''">#{appName},</if>
|
|
|
|
+ <if test="delFlag != null">#{delFlag},</if>
|
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+
|
|
|
|
+ <update id="updateAppManage" parameterType="AppManage">
|
|
|
|
+ update app_manage
|
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
|
+ <if test="appKey != null and appKey != ''">app_key = #{appKey},</if>
|
|
|
|
+ <if test="appName != null and appName != ''">app_name = #{appName},</if>
|
|
|
|
+ <if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
|
+ </trim>
|
|
|
|
+ where app_id = #{appId}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteAppManageByAppId" parameterType="Long">
|
|
|
|
+ delete from app_manage where app_id = #{appId}
|
|
|
|
+ </delete>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteAppManageByAppIds" parameterType="String">
|
|
|
|
+ delete from app_manage where app_id in
|
|
|
|
+ <foreach item="appId" collection="array" open="(" separator="," close=")">
|
|
|
|
+ #{appId}
|
|
|
|
+ </foreach>
|
|
|
|
+ </delete>
|
|
|
|
+</mapper>
|