|
|
@@ -0,0 +1,91 @@
|
|
|
+<?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.fs.his.mapper.MerchantAppConfigMapper">
|
|
|
+
|
|
|
+ <resultMap type="MerchantAppConfig" id="MerchantAppConfigResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="merchantType" column="merchant_type" />
|
|
|
+ <result property="appId" column="app_id" />
|
|
|
+ <result property="callbackUrl" column="callback_url" />
|
|
|
+ <result property="dataJson" column="data_json" />
|
|
|
+ <result property="createdTime" column="created_time" />
|
|
|
+ <result property="updatedTime" column="updated_time" />
|
|
|
+ <result property="isDeleted" column="is_deleted" />
|
|
|
+ <result property="createdBy" column="created_by" />
|
|
|
+ <result property="updatedBy" column="updated_by" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectMerchantAppConfigVo">
|
|
|
+ select id, merchant_type, app_id, callback_url, data_json, created_time, updated_time, is_deleted, created_by, updated_by from merchant_app_config
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectMerchantAppConfigList" parameterType="MerchantAppConfig" resultMap="MerchantAppConfigResult">
|
|
|
+ <include refid="selectMerchantAppConfigVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="merchantType != null and merchantType != ''"> and merchant_type = #{merchantType}</if>
|
|
|
+ <if test="appId != null and appId != ''"> and app_id = #{appId}</if>
|
|
|
+ <if test="params.beginCreatedTime != null and params.beginCreatedTime != '' and params.endCreatedTime != null and params.endCreatedTime != ''"> and created_time between #{params.beginCreatedTime} and #{params.endCreatedTime}</if>
|
|
|
+ <if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectMerchantAppConfigById" parameterType="Long" resultMap="MerchantAppConfigResult">
|
|
|
+ <include refid="selectMerchantAppConfigVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertMerchantAppConfig" parameterType="MerchantAppConfig" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into merchant_app_config
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="merchantType != null and merchantType != ''">merchant_type,</if>
|
|
|
+ <if test="appId != null and appId != ''">app_id,</if>
|
|
|
+ <if test="callbackUrl != null">callback_url,</if>
|
|
|
+ <if test="dataJson != null">data_json,</if>
|
|
|
+ <if test="createdTime != null">created_time,</if>
|
|
|
+ <if test="updatedTime != null">updated_time,</if>
|
|
|
+ <if test="isDeleted != null">is_deleted,</if>
|
|
|
+ <if test="createdBy != null and createdBy != ''">created_by,</if>
|
|
|
+ <if test="updatedBy != null and updatedBy != ''">updated_by,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="merchantType != null and merchantType != ''">#{merchantType},</if>
|
|
|
+ <if test="appId != null and appId != ''">#{appId},</if>
|
|
|
+ <if test="callbackUrl != null">#{callbackUrl},</if>
|
|
|
+ <if test="dataJson != null">#{dataJson},</if>
|
|
|
+ <if test="createdTime != null">#{createdTime},</if>
|
|
|
+ <if test="updatedTime != null">#{updatedTime},</if>
|
|
|
+ <if test="isDeleted != null">#{isDeleted},</if>
|
|
|
+ <if test="createdBy != null and createdBy != ''">#{createdBy},</if>
|
|
|
+ <if test="updatedBy != null and updatedBy != ''">#{updatedBy},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateMerchantAppConfig" parameterType="MerchantAppConfig">
|
|
|
+ update merchant_app_config
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="merchantType != null and merchantType != ''">merchant_type = #{merchantType},</if>
|
|
|
+ <if test="appId != null and appId != ''">app_id = #{appId},</if>
|
|
|
+ <if test="callbackUrl != null">callback_url = #{callbackUrl},</if>
|
|
|
+ <if test="dataJson != null">data_json = #{dataJson},</if>
|
|
|
+ <if test="createdTime != null">created_time = #{createdTime},</if>
|
|
|
+ <if test="updatedTime != null">updated_time = #{updatedTime},</if>
|
|
|
+ <if test="isDeleted != null">is_deleted = #{isDeleted},</if>
|
|
|
+ <if test="createdBy != null and createdBy != ''">created_by = #{createdBy},</if>
|
|
|
+ <if test="updatedBy != null and updatedBy != ''">updated_by = #{updatedBy},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteMerchantAppConfigById" parameterType="Long">
|
|
|
+ delete from merchant_app_config where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteMerchantAppConfigByIds" parameterType="String">
|
|
|
+ delete from merchant_app_config where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|