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

增加租户的功能

parent d845b9df
......@@ -16,6 +16,7 @@
<result column="BillNo" jdbcType="VARCHAR" property="billno" />
<result column="BillTime" jdbcType="TIMESTAMP" property="billtime" />
<result column="Remark" jdbcType="VARCHAR" property="remark" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
......@@ -89,7 +90,7 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Type, OrganId, HandsPersonId, ChangeAmount, TotalPrice, AccountId, BillNo, BillTime,
Remark
Remark, tenant_id
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AccountHeadExample" resultMap="BaseResultMap">
<!--
......@@ -145,11 +146,11 @@
insert into jsh_accounthead (Id, Type, OrganId,
HandsPersonId, ChangeAmount, TotalPrice,
AccountId, BillNo, BillTime,
Remark)
Remark, tenant_id)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{organid,jdbcType=BIGINT},
#{handspersonid,jdbcType=BIGINT}, #{changeamount,jdbcType=DECIMAL}, #{totalprice,jdbcType=DECIMAL},
#{accountid,jdbcType=BIGINT}, #{billno,jdbcType=VARCHAR}, #{billtime,jdbcType=TIMESTAMP},
#{remark,jdbcType=VARCHAR})
#{remark,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.AccountHead">
<!--
......@@ -188,6 +189,9 @@
<if test="remark != null">
Remark,
</if>
<if test="tenantId != null">
tenant_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
......@@ -220,6 +224,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.AccountHeadExample" resultType="java.lang.Integer">
......@@ -269,6 +276,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" />
......@@ -289,7 +299,8 @@
AccountId = #{record.accountid,jdbcType=BIGINT},
BillNo = #{record.billno,jdbcType=VARCHAR},
BillTime = #{record.billtime,jdbcType=TIMESTAMP},
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>
......@@ -328,6 +339,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>
......@@ -345,7 +359,8 @@
AccountId = #{accountid,jdbcType=BIGINT},
BillNo = #{billno,jdbcType=VARCHAR},
BillTime = #{billtime,jdbcType=TIMESTAMP},
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
......@@ -12,6 +12,7 @@
<result column="InOutItemId" jdbcType="BIGINT" property="inoutitemid" />
<result column="EachAmount" jdbcType="DECIMAL" property="eachamount" />
<result column="Remark" jdbcType="VARCHAR" property="remark" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
......@@ -84,7 +85,7 @@
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, HeaderId, AccountId, InOutItemId, EachAmount, Remark
Id, HeaderId, AccountId, InOutItemId, EachAmount, Remark, tenant_id
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AccountItemExample" resultMap="BaseResultMap">
<!--
......@@ -138,11 +139,11 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_accountitem (Id, HeaderId, AccountId,
InOutItemId, EachAmount, Remark
)
InOutItemId, EachAmount, Remark,
tenant_id)
values (#{id,jdbcType=BIGINT}, #{headerid,jdbcType=BIGINT}, #{accountid,jdbcType=BIGINT},
#{inoutitemid,jdbcType=BIGINT}, #{eachamount,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR}
)
#{inoutitemid,jdbcType=BIGINT}, #{eachamount,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR},
#{tenantId,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.AccountItem">
<!--
......@@ -169,6 +170,9 @@
<if test="remark != null">
Remark,
</if>
<if test="tenantId != null">
tenant_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
......@@ -189,6 +193,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.AccountItemExample" resultType="java.lang.Integer">
......@@ -226,6 +233,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" />
......@@ -242,7 +252,8 @@
AccountId = #{record.accountid,jdbcType=BIGINT},
InOutItemId = #{record.inoutitemid,jdbcType=BIGINT},
EachAmount = #{record.eachamount,jdbcType=DECIMAL},
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>
......@@ -269,6 +280,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>
......@@ -282,7 +296,8 @@
AccountId = #{accountid,jdbcType=BIGINT},
InOutItemId = #{inoutitemid,jdbcType=BIGINT},
EachAmount = #{eachamount,jdbcType=DECIMAL},
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
......@@ -13,6 +13,7 @@
<result column="CurrentAmount" jdbcType="DECIMAL" property="currentamount" />
<result column="Remark" jdbcType="VARCHAR" property="remark" />
<result column="IsDefault" jdbcType="BIT" property="isdefault" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
......@@ -85,7 +86,7 @@
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
Id, Name, SerialNo, InitialAmount, CurrentAmount, Remark, IsDefault
Id, Name, SerialNo, InitialAmount, CurrentAmount, Remark, IsDefault, tenant_id
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AccountExample" resultMap="BaseResultMap">
<!--
......@@ -140,10 +141,10 @@
-->
insert into jsh_account (Id, Name, SerialNo,
InitialAmount, CurrentAmount, Remark,
IsDefault)
IsDefault, tenant_id)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{serialno,jdbcType=VARCHAR},
#{initialamount,jdbcType=DECIMAL}, #{currentamount,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR},
#{isdefault,jdbcType=BIT})
#{isdefault,jdbcType=BIT}, #{tenantId,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Account">
<!--
......@@ -173,6 +174,9 @@
<if test="isdefault != null">
IsDefault,
</if>
<if test="tenantId != null">
tenant_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
......@@ -196,6 +200,9 @@
<if test="isdefault != null">
#{isdefault,jdbcType=BIT},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AccountExample" resultType="java.lang.Integer">
......@@ -236,6 +243,9 @@
<if test="record.isdefault != null">
IsDefault = #{record.isdefault,jdbcType=BIT},
</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" />
......@@ -253,7 +263,8 @@
InitialAmount = #{record.initialamount,jdbcType=DECIMAL},
CurrentAmount = #{record.currentamount,jdbcType=DECIMAL},
Remark = #{record.remark,jdbcType=VARCHAR},
IsDefault = #{record.isdefault,jdbcType=BIT}
IsDefault = #{record.isdefault,jdbcType=BIT},
tenant_id = #{record.tenantId,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -283,6 +294,9 @@
<if test="isdefault != null">
IsDefault = #{isdefault,jdbcType=BIT},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
</set>
where Id = #{id,jdbcType=BIGINT}
</update>
......@@ -297,7 +311,8 @@
InitialAmount = #{initialamount,jdbcType=DECIMAL},
CurrentAmount = #{currentamount,jdbcType=DECIMAL},
Remark = #{remark,jdbcType=VARCHAR},
IsDefault = #{isdefault,jdbcType=BIT}
IsDefault = #{isdefault,jdbcType=BIT},
tenant_id = #{tenantId,jdbcType=BIGINT}
where Id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
......@@ -10,6 +10,7 @@
<result column="assetname" jdbcType="VARCHAR" property="assetname" />
<result column="isystem" jdbcType="TINYINT" property="isystem" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
......@@ -82,7 +83,7 @@
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, assetname, isystem, description
id, assetname, isystem, description, tenant_id
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.AssetCategoryExample" resultMap="BaseResultMap">
<!--
......@@ -136,9 +137,9 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_assetcategory (id, assetname, isystem,
description)
description, tenant_id)
values (#{id,jdbcType=BIGINT}, #{assetname,jdbcType=VARCHAR}, #{isystem,jdbcType=TINYINT},
#{description,jdbcType=VARCHAR})
#{description,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.AssetCategory">
<!--
......@@ -159,6 +160,9 @@
<if test="description != null">
description,
</if>
<if test="tenantId != null">
tenant_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
......@@ -173,6 +177,9 @@
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
#{tenantId,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.AssetCategoryExample" resultType="java.lang.Integer">
......@@ -204,6 +211,9 @@
<if test="record.description != null">
description = #{record.description,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" />
......@@ -218,7 +228,8 @@
set id = #{record.id,jdbcType=BIGINT},
assetname = #{record.assetname,jdbcType=VARCHAR},
isystem = #{record.isystem,jdbcType=TINYINT},
description = #{record.description,jdbcType=VARCHAR}
description = #{record.description,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -239,6 +250,9 @@
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="tenantId != null">
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
......@@ -250,7 +264,8 @@
update jsh_assetcategory
set assetname = #{assetname,jdbcType=VARCHAR},
isystem = #{isystem,jdbcType=TINYINT},
description = #{description,jdbcType=VARCHAR}
description = #{description,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
This diff is collapsed.
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