增加租户的功能
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
<id column="Id" jdbcType="BIGINT" property="id" />
|
||||
<result column="Type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="Name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<!--
|
||||
@@ -81,7 +82,7 @@
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
Id, Type, Name
|
||||
Id, Type, Name, tenant_id
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.PersonExample" resultMap="BaseResultMap">
|
||||
<!--
|
||||
@@ -134,10 +135,10 @@
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
insert into jsh_person (Id, Type, Name
|
||||
)
|
||||
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}
|
||||
)
|
||||
insert into jsh_person (Id, Type, Name,
|
||||
tenant_id)
|
||||
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
||||
#{tenantId,jdbcType=BIGINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Person">
|
||||
<!--
|
||||
@@ -155,6 +156,9 @@
|
||||
<if test="name != null">
|
||||
Name,
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
tenant_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
@@ -166,6 +170,9 @@
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
#{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.PersonExample" resultType="java.lang.Integer">
|
||||
@@ -194,6 +201,9 @@
|
||||
<if test="record.name != null">
|
||||
Name = #{record.name,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" />
|
||||
@@ -207,7 +217,8 @@
|
||||
update jsh_person
|
||||
set Id = #{record.id,jdbcType=BIGINT},
|
||||
Type = #{record.type,jdbcType=VARCHAR},
|
||||
Name = #{record.name,jdbcType=VARCHAR}
|
||||
Name = #{record.name,jdbcType=VARCHAR},
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
@@ -225,6 +236,9 @@
|
||||
<if test="name != null">
|
||||
Name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tenantId != null">
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where Id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
@@ -235,7 +249,8 @@
|
||||
-->
|
||||
update jsh_person
|
||||
set Type = #{type,jdbcType=VARCHAR},
|
||||
Name = #{name,jdbcType=VARCHAR}
|
||||
Name = #{name,jdbcType=VARCHAR},
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT}
|
||||
where Id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user