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

增加租户的功能

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