增加租户的功能

This commit is contained in:
季圣华
2019-03-19 23:11:38 +08:00
parent d845b9dfbe
commit 54bf489723
103 changed files with 23174 additions and 21773 deletions

View File

@@ -1,5 +1,5 @@
<?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">
<?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.jsh.erp.datasource.mappers.OrganizationMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Organization">
<!--
@@ -21,6 +21,7 @@
<result column="updater" jdbcType="BIGINT" property="updater" />
<result column="org_create_time" jdbcType="TIMESTAMP" property="orgCreateTime" />
<result column="org_stop_time" jdbcType="TIMESTAMP" property="orgStopTime" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
@@ -94,7 +95,7 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, org_no, org_full_name, org_abr, org_tpcd, org_stcd, org_parent_no, sort, remark,
create_time, creator, update_time, updater, org_create_time, org_stop_time
create_time, creator, update_time, updater, org_create_time, org_stop_time, tenant_id
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.OrganizationExample" resultMap="BaseResultMap">
<!--
@@ -151,14 +152,14 @@
org_abr, org_tpcd, org_stcd,
org_parent_no, sort, remark,
create_time, creator, update_time,
updater, org_create_time, org_stop_time
)
updater, org_create_time, org_stop_time,
tenant_id)
values (#{id,jdbcType=BIGINT}, #{orgNo,jdbcType=VARCHAR}, #{orgFullName,jdbcType=VARCHAR},
#{orgAbr,jdbcType=VARCHAR}, #{orgTpcd,jdbcType=VARCHAR}, #{orgStcd,jdbcType=CHAR},
#{orgParentNo,jdbcType=VARCHAR}, #{sort,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{creator,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP},
#{updater,jdbcType=BIGINT}, #{orgCreateTime,jdbcType=TIMESTAMP}, #{orgStopTime,jdbcType=TIMESTAMP}
)
#{updater,jdbcType=BIGINT}, #{orgCreateTime,jdbcType=TIMESTAMP}, #{orgStopTime,jdbcType=TIMESTAMP},
#{tenantId,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Organization">
<!--
@@ -212,6 +213,9 @@
<if test="orgStopTime != null">
org_stop_time,
</if>
<if test="tenantId != null">
tenant_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
@@ -259,6 +263,9 @@
<if test="orgStopTime != null">
#{orgStopTime,jdbcType=TIMESTAMP},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.OrganizationExample" resultType="java.lang.Integer">
@@ -323,6 +330,9 @@
<if test="record.orgStopTime != null">
org_stop_time = #{record.orgStopTime,jdbcType=TIMESTAMP},
</if>
<if test="record.tenantId != null">
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@@ -348,7 +358,8 @@
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
updater = #{record.updater,jdbcType=BIGINT},
org_create_time = #{record.orgCreateTime,jdbcType=TIMESTAMP},
org_stop_time = #{record.orgStopTime,jdbcType=TIMESTAMP}
org_stop_time = #{record.orgStopTime,jdbcType=TIMESTAMP},
tenant_id = #{record.tenantId,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@@ -402,6 +413,9 @@
<if test="orgStopTime != null">
org_stop_time = #{orgStopTime,jdbcType=TIMESTAMP},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
@@ -424,7 +438,8 @@
update_time = #{updateTime,jdbcType=TIMESTAMP},
updater = #{updater,jdbcType=BIGINT},
org_create_time = #{orgCreateTime,jdbcType=TIMESTAMP},
org_stop_time = #{orgStopTime,jdbcType=TIMESTAMP}
org_stop_time = #{orgStopTime,jdbcType=TIMESTAMP},
tenant_id = #{tenantId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>