|
@@ -1,65 +1,173 @@
|
|
-<?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">
|
|
<!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.TenantInfoDao">
|
|
<mapper namespace="com.ym.mec.biz.dal.dao.TenantInfoDao">
|
|
|
|
|
|
- <resultMap type="com.ym.mec.biz.dal.entity.TenantInfo" id="TenantInfo">
|
|
|
|
- <id column="id_" jdbcType="INTEGER" property="id" />
|
|
|
|
- <result column="name_" jdbcType="VARCHAR" property="name" />
|
|
|
|
- <result column="contacts_" jdbcType="VARCHAR" property="contacts" />
|
|
|
|
- <result column="phone_" jdbcType="VARCHAR" property="phone" />
|
|
|
|
- <result column="address_" jdbcType="VARCHAR" property="address" />
|
|
|
|
- <result column="email_" jdbcType="VARCHAR" property="email" />
|
|
|
|
- <result column="logo_" jdbcType="VARCHAR" property="logo" />
|
|
|
|
- <result column="customer_service_phone" jdbcType="VARCHAR" property="customerServicePhone" />
|
|
|
|
- <result column="domain_name_" jdbcType="VARCHAR" property="domainName" />
|
|
|
|
- <result column="data_source_" jdbcType="VARCHAR" property="dataSource" />
|
|
|
|
- <result column="state_" jdbcType="INTEGER" property="state" />
|
|
|
|
- <result column="created_by_" jdbcType="INTEGER" property="createdBy" />
|
|
|
|
- <result column="created_time_" jdbcType="TIMESTAMP" property="createdTime" />
|
|
|
|
- <result column="updated_by_" jdbcType="INTEGER" property="updatedBy" />
|
|
|
|
- <result column="updated_time_" jdbcType="TIMESTAMP" property="updatedTime" />
|
|
|
|
- </resultMap>
|
|
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.ym.mec.biz.dal.entity.TenantInfo">
|
|
|
|
+ <id column="id_" jdbcType="INTEGER" property="id"/>
|
|
|
|
+ <result column="name_" jdbcType="VARCHAR" property="name"/>
|
|
|
|
+ <result column="contacts_" jdbcType="VARCHAR" property="contacts"/>
|
|
|
|
+ <result column="phone_" jdbcType="VARCHAR" property="phone"/>
|
|
|
|
+ <result column="address_" jdbcType="VARCHAR" property="address"/>
|
|
|
|
+ <result column="email_" jdbcType="VARCHAR" property="email"/>
|
|
|
|
+ <result column="logo_" jdbcType="VARCHAR" property="logo"/>
|
|
|
|
+ <result column="customer_service_phone" jdbcType="VARCHAR" property="customerServicePhone"/>
|
|
|
|
+ <result column="domain_name_" jdbcType="VARCHAR" property="domainName"/>
|
|
|
|
+ <result column="data_source_" jdbcType="VARCHAR" property="dataSource"/>
|
|
|
|
+ <result column="pay_state_" jdbcType="INTEGER" property="payState"/>
|
|
|
|
+ <result column="state_" jdbcType="INTEGER" property="state"/>
|
|
|
|
+ <result column="created_by_" jdbcType="INTEGER" property="createdBy"/>
|
|
|
|
+ <result column="created_time_" jdbcType="TIMESTAMP" property="createdTime"/>
|
|
|
|
+ <result column="updated_by_" jdbcType="INTEGER" property="updatedBy"/>
|
|
|
|
+ <result column="updated_time_" jdbcType="TIMESTAMP" property="updatedTime"/>
|
|
|
|
+ </resultMap>
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
<sql id="Base_Column_List">
|
|
- id_, name_, contacts_, phone_, address_, email_, logo_, customer_service_phone, domain_name_,
|
|
|
|
- data_source_, state_, created_by_, created_time_, updated_by_, updated_time_
|
|
|
|
|
|
+ id_
|
|
|
|
+ , name_, contacts_, phone_, address_, email_, logo_, customer_service_phone, domain_name_,
|
|
|
|
+ data_source_, pay_state_, state_, created_by_, created_time_, updated_by_, updated_time_
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
- <!-- 根据主键查询一条记录 -->
|
|
|
|
- <select id="get" resultMap="TenantInfo">
|
|
|
|
- SELECT
|
|
|
|
- <include refid="Base_Column_List" />
|
|
|
|
- FROM
|
|
|
|
- tenant_info WHERE id_ = #{id}
|
|
|
|
- </select>
|
|
|
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
|
+ select
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
+ from tenant_info
|
|
|
|
+ where id_ = #{id,jdbcType=INTEGER}
|
|
|
|
+ </select>
|
|
|
|
|
|
- <!-- 全查询 -->
|
|
|
|
- <select id="findAll" resultMap="TenantInfo">
|
|
|
|
- SELECT
|
|
|
|
- <include refid="Base_Column_List" />
|
|
|
|
- FROM tenant_info ORDER
|
|
|
|
- BY id_
|
|
|
|
- </select>
|
|
|
|
|
|
+ <select id="queryList" resultType="com.ym.mec.biz.dal.entity.TenantInfo">
|
|
|
|
+ select
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
+ from tenant_info
|
|
|
|
+ <where>
|
|
|
|
+ <if test="state != null">
|
|
|
|
+ and state_ = #{state,jdbcType=INTEGER}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
|
+ delete
|
|
|
|
+ from tenant_info
|
|
|
|
+ where id_ = #{id,jdbcType=INTEGER}
|
|
|
|
+ </delete>
|
|
|
|
|
|
- <!-- 向数据库增加一条记录 -->
|
|
|
|
- <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.TenantInfo">
|
|
|
|
|
|
+ <insert id="insert" keyColumn="id_" keyProperty="id" parameterType="com.ym.mec.biz.dal.entity.TenantInfo"
|
|
|
|
+ useGeneratedKeys="true">
|
|
insert into tenant_info (name_, contacts_, phone_,
|
|
insert into tenant_info (name_, contacts_, phone_,
|
|
- address_, email_, logo_,
|
|
|
|
- customer_service_phone, domain_name_, data_source_,
|
|
|
|
- state_, created_by_, created_time_,
|
|
|
|
- updated_by_, updated_time_)
|
|
|
|
|
|
+ address_, email_, logo_,
|
|
|
|
+ customer_service_phone, domain_name_, data_source_,
|
|
|
|
+ pay_state_, state_, created_by_,
|
|
|
|
+ created_time_, updated_by_, updated_time_)
|
|
values (#{name,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR},
|
|
values (#{name,jdbcType=VARCHAR}, #{contacts,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR},
|
|
- #{address,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{logo,jdbcType=VARCHAR},
|
|
|
|
- #{customerServicePhone,jdbcType=VARCHAR}, #{domainName,jdbcType=VARCHAR}, #{dataSource,jdbcType=VARCHAR},
|
|
|
|
- #{state,jdbcType=INTEGER}, #{createdBy,jdbcType=VARCHAR}, #{createdTime,jdbcType=TIMESTAMP},
|
|
|
|
- #{updatedBy,jdbcType=VARCHAR}, #{updatedTime,jdbcType=TIMESTAMP})
|
|
|
|
- </insert>
|
|
|
|
|
|
+ #{address,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{logo,jdbcType=VARCHAR},
|
|
|
|
+ #{customerServicePhone,jdbcType=VARCHAR}, #{domainName,jdbcType=VARCHAR},
|
|
|
|
+ #{dataSource,jdbcType=VARCHAR},
|
|
|
|
+ #{payState,jdbcType=INTEGER}, #{state,jdbcType=INTEGER}, #{createdBy,jdbcType=INTEGER},
|
|
|
|
+ #{createdTime,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=INTEGER}, #{updatedTime,jdbcType=TIMESTAMP})
|
|
|
|
+ </insert>
|
|
|
|
|
|
- <!-- 根据主键查询一条记录 -->
|
|
|
|
- <update id="update" parameterType="com.ym.mec.biz.dal.entity.TenantInfo">
|
|
|
|
- UPDATE tenant_info
|
|
|
|
- <set>
|
|
|
|
|
|
+ <insert id="insertSelective" keyColumn="id_" keyProperty="id" parameterType="com.ym.mec.biz.dal.entity.TenantInfo"
|
|
|
|
+ useGeneratedKeys="true">
|
|
|
|
+ insert into tenant_info
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="name != null">
|
|
|
|
+ name_,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="contacts != null">
|
|
|
|
+ contacts_,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="phone != null">
|
|
|
|
+ phone_,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="address != null">
|
|
|
|
+ address_,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="email != null">
|
|
|
|
+ email_,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="logo != null">
|
|
|
|
+ logo_,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="customerServicePhone != null">
|
|
|
|
+ customer_service_phone,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="domainName != null">
|
|
|
|
+ domain_name_,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dataSource != null">
|
|
|
|
+ data_source_,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="payState != null">
|
|
|
|
+ pay_state_,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="state != null">
|
|
|
|
+ state_,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createdBy != null">
|
|
|
|
+ created_by_,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createdTime != null">
|
|
|
|
+ created_time_,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updatedBy != null">
|
|
|
|
+ updated_by_,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updatedTime != null">
|
|
|
|
+ updated_time_,
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="name != null">
|
|
|
|
+ #{name,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="contacts != null">
|
|
|
|
+ #{contacts,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="phone != null">
|
|
|
|
+ #{phone,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="address != null">
|
|
|
|
+ #{address,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="email != null">
|
|
|
|
+ #{email,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="logo != null">
|
|
|
|
+ #{logo,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="customerServicePhone != null">
|
|
|
|
+ #{customerServicePhone,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="domainName != null">
|
|
|
|
+ #{domainName,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dataSource != null">
|
|
|
|
+ #{dataSource,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="payState != null">
|
|
|
|
+ #{payState,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="state != null">
|
|
|
|
+ #{state,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createdBy != null">
|
|
|
|
+ #{createdBy,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createdTime != null">
|
|
|
|
+ #{createdTime,jdbcType=TIMESTAMP},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updatedBy != null">
|
|
|
|
+ #{updatedBy,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updatedTime != null">
|
|
|
|
+ #{updatedTime,jdbcType=TIMESTAMP},
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+
|
|
|
|
+ <update id="updateByKey" parameterType="com.ym.mec.biz.dal.entity.TenantInfo">
|
|
|
|
+ update tenant_info
|
|
|
|
+ <set>
|
|
<if test="name != null">
|
|
<if test="name != null">
|
|
name_ = #{name,jdbcType=VARCHAR},
|
|
name_ = #{name,jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
@@ -87,40 +195,26 @@
|
|
<if test="dataSource != null">
|
|
<if test="dataSource != null">
|
|
data_source_ = #{dataSource,jdbcType=VARCHAR},
|
|
data_source_ = #{dataSource,jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="payState != null">
|
|
|
|
+ pay_state_ = #{payState,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
<if test="state != null">
|
|
<if test="state != null">
|
|
state_ = #{state,jdbcType=INTEGER},
|
|
state_ = #{state,jdbcType=INTEGER},
|
|
</if>
|
|
</if>
|
|
<if test="createdBy != null">
|
|
<if test="createdBy != null">
|
|
- created_by_ = #{createdBy,jdbcType=VARCHAR},
|
|
|
|
|
|
+ created_by_ = #{createdBy,jdbcType=INTEGER},
|
|
</if>
|
|
</if>
|
|
<if test="createdTime != null">
|
|
<if test="createdTime != null">
|
|
created_time_ = #{createdTime,jdbcType=TIMESTAMP},
|
|
created_time_ = #{createdTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
</if>
|
|
<if test="updatedBy != null">
|
|
<if test="updatedBy != null">
|
|
- updated_by_ = #{updatedBy,jdbcType=VARCHAR},
|
|
|
|
|
|
+ updated_by_ = #{updatedBy,jdbcType=INTEGER},
|
|
</if>
|
|
</if>
|
|
<if test="updatedTime != null">
|
|
<if test="updatedTime != null">
|
|
updated_time_ = #{updatedTime,jdbcType=TIMESTAMP},
|
|
updated_time_ = #{updatedTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
</if>
|
|
- </set>
|
|
|
|
- WHERE id_ = #{id}
|
|
|
|
- </update>
|
|
|
|
-
|
|
|
|
- <!-- 根据主键删除一条记录 -->
|
|
|
|
- <delete id="delete">
|
|
|
|
- DELETE FROM tenant_info WHERE id_ = #{id}
|
|
|
|
- </delete>
|
|
|
|
-
|
|
|
|
- <!-- 分页查询 -->
|
|
|
|
- <select id="queryPage" resultMap="TenantInfo" parameterType="map">
|
|
|
|
- SELECT
|
|
|
|
- <include refid="Base_Column_List" />
|
|
|
|
- FROM tenant_info ORDER BY id_
|
|
|
|
- <include refid="global.limit" />
|
|
|
|
- </select>
|
|
|
|
|
|
+ </set>
|
|
|
|
+ where id_ = #{id,jdbcType=INTEGER}
|
|
|
|
+ </update>
|
|
|
|
|
|
- <!-- 查询当前表的总记录数 -->
|
|
|
|
- <select id="queryCount" resultType="int">
|
|
|
|
- SELECT COUNT(id_) FROM tenant_info
|
|
|
|
- </select>
|
|
|
|
-</mapper>
|
|
|
|
|
|
+</mapper>
|