Commit 54bf4897 authored by 季圣华's avatar 季圣华
Browse files

增加租户的功能

parent d845b9df
......@@ -8,6 +8,7 @@
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="UName" jdbcType="VARCHAR" property="uname" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
......@@ -80,7 +81,7 @@
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, UName
id, UName, tenant_id
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.UnitExample" resultMap="BaseResultMap">
<!--
......@@ -133,8 +134,10 @@
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_unit (id, UName)
values (#{id,jdbcType=BIGINT}, #{uname,jdbcType=VARCHAR})
insert into jsh_unit (id, UName, tenant_id
)
values (#{id,jdbcType=BIGINT}, #{uname,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Unit">
<!--
......@@ -149,6 +152,9 @@
<if test="uname != null">
UName,
</if>
<if test="tenantId != null">
tenant_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
......@@ -157,6 +163,9 @@
<if test="uname != null">
#{uname,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.UnitExample" resultType="java.lang.Integer">
......@@ -182,6 +191,9 @@
<if test="record.uname != null">
UName = #{record.uname,jdbcType=VARCHAR},
</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" />
......@@ -194,7 +206,8 @@
-->
update jsh_unit
set id = #{record.id,jdbcType=BIGINT},
UName = #{record.uname,jdbcType=VARCHAR}
UName = #{record.uname,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -209,6 +222,9 @@
<if test="uname != null">
UName = #{uname,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
......@@ -218,7 +234,8 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_unit
set UName = #{uname,jdbcType=VARCHAR}
set UName = #{uname,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
......@@ -16,9 +16,10 @@
<result column="phonenum" jdbcType="VARCHAR" property="phonenum" />
<result column="ismanager" jdbcType="TINYINT" property="ismanager" />
<result column="isystem" jdbcType="TINYINT" property="isystem" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="Status" jdbcType="TINYINT" property="status" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
......@@ -92,7 +93,7 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, username, loginame, password, position, department, email, phonenum, ismanager,
isystem, status, description, remark
isystem, Status, description, remark, tenant_id
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.UserExample" resultMap="BaseResultMap">
<!--
......@@ -148,13 +149,13 @@
insert into jsh_user (id, username, loginame,
password, position, department,
email, phonenum, ismanager,
isystem, status, description,
remark)
isystem, Status, description,
remark, tenant_id)
values (#{id,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, #{loginame,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR}, #{department,jdbcType=VARCHAR},
#{email,jdbcType=VARCHAR}, #{phonenum,jdbcType=VARCHAR}, #{ismanager,jdbcType=TINYINT},
#{isystem,jdbcType=TINYINT}, #{status,jdbcType=TINYINT}, #{description,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR})
#{remark,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.User">
<!--
......@@ -194,7 +195,7 @@
isystem,
</if>
<if test="status != null">
status,
Status,
</if>
<if test="description != null">
description,
......@@ -202,6 +203,9 @@
<if test="remark != null">
remark,
</if>
<if test="tenantId != null">
tenant_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
......@@ -243,6 +247,9 @@
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.UserExample" resultType="java.lang.Integer">
......@@ -293,7 +300,7 @@
isystem = #{record.isystem,jdbcType=TINYINT},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=TINYINT},
Status = #{record.status,jdbcType=TINYINT},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
......@@ -301,6 +308,9 @@
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</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" />
......@@ -322,9 +332,10 @@
phonenum = #{record.phonenum,jdbcType=VARCHAR},
ismanager = #{record.ismanager,jdbcType=TINYINT},
isystem = #{record.isystem,jdbcType=TINYINT},
status = #{record.status,jdbcType=TINYINT},
Status = #{record.status,jdbcType=TINYINT},
description = #{record.description,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR}
remark = #{record.remark,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -364,7 +375,7 @@
isystem = #{isystem,jdbcType=TINYINT},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
Status = #{status,jdbcType=TINYINT},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
......@@ -372,6 +383,9 @@
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
......@@ -390,9 +404,10 @@
phonenum = #{phonenum,jdbcType=VARCHAR},
ismanager = #{ismanager,jdbcType=TINYINT},
isystem = #{isystem,jdbcType=TINYINT},
status = #{status,jdbcType=TINYINT},
Status = #{status,jdbcType=TINYINT},
description = #{description,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR}
remark = #{remark,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
......@@ -41,15 +41,15 @@
<property name="enableSubPackages" value="false"/>
<property name="exampleMethodVisibility" value="public"/>
</javaClientGenerator>
<!-- <table tableName="jsh_account" domainObjectName="Account"></table>
<!-- <table tableName="jsh_account" domainObjectName="Account"></table>
<table tableName="jsh_accounthead" domainObjectName="AccountHead"></table>
<table tableName="jsh_accountitem" domainObjectName="AccountItem"></table>
<table tableName="jsh_app" domainObjectName="App"></table>
<table tableName="jsh_asset" domainObjectName="Asset"></table>
<table tableName="jsh_assetcategory" domainObjectName="AssetCategory"></table>
<table tableName="jsh_assetname" domainObjectName="AssetName"></table>-->
<!--<table tableName="jsh_depot" domainObjectName="Depot"></table>-->
<!--<table tableName="jsh_depothead" domainObjectName="DepotHead"></table>
<table tableName="jsh_assetname" domainObjectName="AssetName"></table>
<table tableName="jsh_depot" domainObjectName="Depot"></table>
<table tableName="jsh_depothead" domainObjectName="DepotHead"></table>
<table tableName="jsh_depotitem" domainObjectName="DepotItem"></table>
<table tableName="jsh_functions" domainObjectName="Functions"></table>
<table tableName="jsh_inoutitem" domainObjectName="InOutItem"></table>
......@@ -59,13 +59,13 @@
<table tableName="jsh_materialproperty" domainObjectName="MaterialProperty"></table>
<table tableName="jsh_person" domainObjectName="Person"></table>
<table tableName="jsh_role" domainObjectName="Role"></table>
<table tableName="jsh_supplier" domainObjectName="Supplier"></table>-->
<table tableName="jsh_supplier" domainObjectName="Supplier"></table>
<table tableName="jsh_systemconfig" domainObjectName="SystemConfig"></table>
<!--<table tableName="jsh_unit" domainObjectName="Unit"></table>
<table tableName="jsh_unit" domainObjectName="Unit"></table>
<table tableName="jsh_user" domainObjectName="User"></table>
<table tableName="jsh_userbusiness" domainObjectName="UserBusiness"></table>
<table tableName="jsh_serial_number" domainObjectName="SerialNumber"></table>-->
<table tableName="jsh_serial_number" domainObjectName="SerialNumber"></table>
<table tableName="jsh_organization" domainObjectName="Organization"></table>
<!--<table tableName="jsh_orga_user_rel" domainObjectName="OrgaUserRel"></table>-->
<table tableName="jsh_orga_user_rel" domainObjectName="OrgaUserRel"></table> -->
</context>
</generatorConfiguration>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment