增加租户的功能

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.AccountMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Account">
<!--
@@ -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>