|
@@ -0,0 +1,108 @@
|
|
|
+<?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.ym.mec.biz.dal.dao.SysTenantConfigDao">
|
|
|
+ <resultMap id="SysTenantConfig" type="com.ym.mec.biz.dal.entity.SysTenantConfig">
|
|
|
+ <id column="id_" jdbcType="INTEGER" property="id" />
|
|
|
+ <result column="sys_config_id_" jdbcType="INTEGER" property="sysConfigId" />
|
|
|
+ <result column="tenant_id_" jdbcType="INTEGER" property="tenantId" />
|
|
|
+ <result column="param_value_" jdbcType="VARCHAR" property="paramValue" />
|
|
|
+ <result column="create_time_" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ <result column="update_time_" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id_, sys_config_id_, tenant_id_, param_value_, create_time_, update_time_
|
|
|
+ </sql>
|
|
|
+ <select id="get" parameterType="java.lang.Integer" resultMap="SysTenantConfig">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from sys_tenant_config
|
|
|
+ where id_ = #{id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+ <delete id="delete" parameterType="java.lang.Integer">
|
|
|
+ delete from sys_tenant_config
|
|
|
+ where id_ = #{id,jdbcType=INTEGER}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" keyColumn="id_" keyProperty="id" parameterType="com.ym.mec.biz.dal.entity.SysTenantConfig" useGeneratedKeys="true">
|
|
|
+ insert into sys_tenant_config (sys_config_id_, tenant_id_, param_value_,
|
|
|
+ create_time_, update_time_)
|
|
|
+ values (#{sysConfigId,jdbcType=INTEGER}, #{tenantId,jdbcType=INTEGER}, #{paramValue,jdbcType=VARCHAR},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" keyColumn="id_" keyProperty="id" parameterType="com.ym.mec.biz.dal.entity.SysTenantConfig" useGeneratedKeys="true">
|
|
|
+ insert into sys_tenant_config
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="sysConfigId != null">
|
|
|
+ sys_config_id_,
|
|
|
+ </if>
|
|
|
+ <if test="tenantId != null">
|
|
|
+ tenant_id_,
|
|
|
+ </if>
|
|
|
+ <if test="paramValue != null">
|
|
|
+ param_value_,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time_,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time_,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="sysConfigId != null">
|
|
|
+ #{sysConfigId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="tenantId != null">
|
|
|
+ #{tenantId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="paramValue != null">
|
|
|
+ #{paramValue,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="update" parameterType="com.ym.mec.biz.dal.entity.SysTenantConfig">
|
|
|
+ update sys_tenant_config
|
|
|
+ <set>
|
|
|
+ <if test="sysConfigId != null">
|
|
|
+ sys_config_id_ = #{sysConfigId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="tenantId != null">
|
|
|
+ tenant_id_ = #{tenantId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="paramValue != null">
|
|
|
+ param_value_ = #{paramValue,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time_ = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time_ = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id_ = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <!-- 分页查询 -->
|
|
|
+ <select id="queryPage" resultMap="SysTenantConfig" parameterType="map">
|
|
|
+ SELECT * FROM sys_config ORDER BY id_
|
|
|
+ <include refid="global.limit" />
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 查询当前表的总记录数 -->
|
|
|
+ <select id="queryCount" resultType="int">
|
|
|
+ SELECT COUNT(*) FROM sys_config
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="findAll" resultMap="SysTenantConfig">
|
|
|
+ SELECT * FROM sys_config where 1=1
|
|
|
+ <if test="group != null">
|
|
|
+ and group_ = #{group}
|
|
|
+ </if>
|
|
|
+ ORDER BY id_
|
|
|
+ </select>
|
|
|
+</mapper>
|