|
@@ -1,19 +1,15 @@
|
|
|
<?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">
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.ruoyi.opt.mapper.SysInfoConfigMapper">
|
|
|
-
|
|
|
+
|
|
|
<resultMap type="SysInfoConfig" id="SysInfoConfigResult">
|
|
|
<result property="confId" column="conf_id" />
|
|
|
- <result property="sysTpCd" column="sys_tp_cd" />
|
|
|
- <result property="methTpCd" column="meth_tp_cd" />
|
|
|
- <result property="methUrl" column="meth_url" />
|
|
|
- <result property="appId" column="app_id" />
|
|
|
- <result property="appKey" column="app_key" />
|
|
|
- <result property="skKhh" column="sk_khh" />
|
|
|
- <result property="skAccountNm" column="sk_account_nm" />
|
|
|
- <result property="skAccount" column="sk_account" />
|
|
|
+ <result property="typeCd" column="type_cd" />
|
|
|
+ <result property="sceneTpCd" column="scene_tp_cd" />
|
|
|
+ <result property="sceneTpNm" column="scene_tp_nm" />
|
|
|
+ <result property="content" column="content" />
|
|
|
<result property="status" column="status" />
|
|
|
<result property="createBy" column="create_by" />
|
|
|
<result property="createTime" column="create_time" />
|
|
@@ -22,72 +18,59 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectSysInfoConfigVo">
|
|
|
- select conf_id, sys_tp_cd, meth_tp_cd, meth_url, app_id, app_key, sk_khh, sk_account_nm, sk_account, status, create_by, create_time, update_by, update_time from sys_info_config
|
|
|
+ select c.conf_id, c.type_cd, c.scene_tp_cd, c.content, c.STATUS, c.create_by, c.create_time, c.update_by, c.update_time,
|
|
|
+ (SELECT a.dict_label FROM sys_dict_data a WHERE a.dict_value = c.scene_tp_cd
|
|
|
+ AND a.dict_type = (SELECT d.child_dict_type FROM sys_dict_data d WHERE d.dict_type = 'sys_tp_cd' AND d.dict_value = c.type_cd)
|
|
|
+ ) AS scene_tp_nm
|
|
|
+ FROM
|
|
|
+ sys_info_config c
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectSysInfoConfigList" parameterType="SysInfoConfig" resultMap="SysInfoConfigResult">
|
|
|
<include refid="selectSysInfoConfigVo"/>
|
|
|
- <where>
|
|
|
- <if test="sysTpCd != null and sysTpCd != ''"> and sys_tp_cd = #{sysTpCd}</if>
|
|
|
- <if test="methUrl != null and methUrl != ''"> and meth_url like concat('%', #{methUrl}, '%')</if>
|
|
|
- <if test="appId != null and appId != ''"> and app_id like concat('%', #{appId}, '%')</if>
|
|
|
- <if test="skKhh != null and skKhh != ''"> and sk_khh like concat('%', #{skKhh}, '%')</if>
|
|
|
- <if test="skAccountNm != null and skAccountNm != ''"> and sk_account_nm like concat('%', #{skAccountNm}, '%')</if>
|
|
|
- <if test="skAccount != null and skAccount != ''"> and sk_account like concat('%', #{skAccount}, '%')</if>
|
|
|
- <if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
+ <where>
|
|
|
+ <if test="typeCd != null and typeCd != ''"> and c.type_cd = #{typeCd}</if>
|
|
|
+ <if test="sceneTpCd != null and sceneTpCd != ''"> and c.scene_tp_cd = #{sceneTpCd}</if>
|
|
|
+ <if test="content != null and content != ''"> and c.content = #{content}</if>
|
|
|
+ <if test="status != null and status != ''"> and c.status = #{status}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectSysInfoConfigByConfId" parameterType="Long" resultMap="SysInfoConfigResult">
|
|
|
<include refid="selectSysInfoConfigVo"/>
|
|
|
- where conf_id = #{confId}
|
|
|
+ where c.conf_id = #{confId}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<insert id="insertSysInfoConfig" parameterType="SysInfoConfig" useGeneratedKeys="true" keyProperty="confId">
|
|
|
insert into sys_info_config
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="sysTpCd != null">sys_tp_cd,</if>
|
|
|
- <if test="methTpCd != null">meth_tp_cd,</if>
|
|
|
- <if test="methUrl != null">meth_url,</if>
|
|
|
- <if test="appId != null">app_id,</if>
|
|
|
- <if test="appKey != null">app_key,</if>
|
|
|
- <if test="skKhh != null">sk_khh,</if>
|
|
|
- <if test="skAccountNm != null">sk_account_nm,</if>
|
|
|
- <if test="skAccount != null">sk_account,</if>
|
|
|
+ <if test="typeCd != null">type_cd,</if>
|
|
|
+ <if test="sceneTpCd != null">scene_tp_cd,</if>
|
|
|
+ <if test="content != null">content,</if>
|
|
|
<if test="status != null">status,</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>
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="sysTpCd != null">#{sysTpCd},</if>
|
|
|
- <if test="methTpCd != null">#{methTpCd},</if>
|
|
|
- <if test="methUrl != null">#{methUrl},</if>
|
|
|
- <if test="appId != null">#{appId},</if>
|
|
|
- <if test="appKey != null">#{appKey},</if>
|
|
|
- <if test="skKhh != null">#{skKhh},</if>
|
|
|
- <if test="skAccountNm != null">#{skAccountNm},</if>
|
|
|
- <if test="skAccount != null">#{skAccount},</if>
|
|
|
+ <if test="typeCd != null">#{typeCd},</if>
|
|
|
+ <if test="sceneTpCd != null">#{sceneTpCd},</if>
|
|
|
+ <if test="content != null">#{content},</if>
|
|
|
<if test="status != null">#{status},</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>
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateSysInfoConfig" parameterType="SysInfoConfig">
|
|
|
update sys_info_config
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
- <if test="sysTpCd != null">sys_tp_cd = #{sysTpCd},</if>
|
|
|
- <if test="methTpCd != null">meth_tp_cd = #{methTpCd},</if>
|
|
|
- <if test="methUrl != null">meth_url = #{methUrl},</if>
|
|
|
- <if test="appId != null">app_id = #{appId},</if>
|
|
|
- <if test="appKey != null">app_key = #{appKey},</if>
|
|
|
- <if test="skKhh != null">sk_khh = #{skKhh},</if>
|
|
|
- <if test="skAccountNm != null">sk_account_nm = #{skAccountNm},</if>
|
|
|
- <if test="skAccount != null">sk_account = #{skAccount},</if>
|
|
|
+ <if test="typeCd != null">type_cd = #{typeCd},</if>
|
|
|
+ <if test="sceneTpCd != null">scene_tp_cd = #{sceneTpCd},</if>
|
|
|
+ <if test="content != null">content = #{content},</if>
|
|
|
<if test="status != null">status = #{status},</if>
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
@@ -102,10 +85,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteSysInfoConfigByConfIds" parameterType="String">
|
|
|
- delete from sys_info_config where conf_id in
|
|
|
+ delete from sys_info_config where conf_id in
|
|
|
<foreach item="confId" collection="array" open="(" separator="," close=")">
|
|
|
#{confId}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
|
|
|
+ <resultMap type="ConfigDictData" id="ConfigDictDataResult">
|
|
|
+ <result property="v" column="dict_value" />
|
|
|
+ <result property="n" column="dict_label" />
|
|
|
+ <result property="childDictType" column="child_dict_type" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <select id="selectDictDataListByDictType" parameterType="String" resultMap="ConfigDictDataResult">
|
|
|
+ select d.dict_value, d.dict_label ,d.child_dict_type from sys_dict_data d where d.dict_type = #{dictType}
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|