Commit 7cabc39a authored by qiankunpingtai's avatar qiankunpingtai
Browse files

切换到jsh的版本

parent 9182e734
<?xml version="1.0" encoding="UTF-8" ?> <?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" > <!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.TenantMapper" > <mapper namespace="com.jsh.erp.datasource.mappers.TenantMapper" >
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Tenant" > <resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Tenant" >
<!-- <!--
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 column="id" property="id" jdbcType="BIGINT" /> <id column="id" property="id" jdbcType="BIGINT" />
<result column="tenant_id" property="tenantId" jdbcType="BIGINT" /> <result column="tenant_id" property="tenantId" jdbcType="BIGINT" />
<result column="login_name" property="loginName" jdbcType="VARCHAR" /> <result column="login_name" property="loginName" jdbcType="VARCHAR" />
<result column="user_num_limit" property="userNumLimit" jdbcType="INTEGER" /> <result column="user_num_limit" property="userNumLimit" jdbcType="INTEGER" />
<result column="bills_num_limit" property="billsNumLimit" jdbcType="INTEGER" /> <result column="bills_num_limit" property="billsNumLimit" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" /> <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause" > <sql id="Example_Where_Clause" >
<!-- <!--
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.
--> -->
<where > <where >
<foreach collection="oredCriteria" item="criteria" separator="or" > <foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" > <if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" > <trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" > <foreach collection="criteria.criteria" item="criterion" >
<choose > <choose >
<when test="criterion.noValue" > <when test="criterion.noValue" >
and ${criterion.condition} and ${criterion.condition}
</when> </when>
<when test="criterion.singleValue" > <when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value} and ${criterion.condition} #{criterion.value}
</when> </when>
<when test="criterion.betweenValue" > <when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when> </when>
<when test="criterion.listValue" > <when test="criterion.listValue" >
and ${criterion.condition} and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," > <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem} #{listItem}
</foreach> </foreach>
</when> </when>
</choose> </choose>
</foreach>
</trim>
</if>
</foreach> </foreach>
</where> </trim>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, tenant_id, login_name, user_num_limit, bills_num_limit, create_time
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.jsh.erp.datasource.entities.TenantExample" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from jsh_tenant
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_tenant
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_tenant
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.TenantExample" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_tenant
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if> </if>
</delete> </foreach>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Tenant" > </where>
<!-- </sql>
WARNING - @mbggenerated <sql id="Update_By_Example_Where_Clause" >
This element is automatically generated by MyBatis Generator, do not modify. <!--
--> WARNING - @mbggenerated
insert into jsh_tenant (id, tenant_id, login_name, This element is automatically generated by MyBatis Generator, do not modify.
user_num_limit, bills_num_limit, create_time -->
) <where >
values (#{id,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT}, #{loginName,jdbcType=VARCHAR}, <foreach collection="example.oredCriteria" item="criteria" separator="or" >
#{userNumLimit,jdbcType=INTEGER}, #{billsNumLimit,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP} <if test="criteria.valid" >
) <trim prefix="(" suffix=")" prefixOverrides="and" >
</insert> <foreach collection="criteria.criteria" item="criterion" >
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Tenant" > <choose >
<!-- <when test="criterion.noValue" >
WARNING - @mbggenerated and ${criterion.condition}
This element is automatically generated by MyBatis Generator, do not modify. </when>
--> <when test="criterion.singleValue" >
insert into jsh_tenant and ${criterion.condition} #{criterion.value}
<trim prefix="(" suffix=")" suffixOverrides="," > </when>
<if test="id != null" > <when test="criterion.betweenValue" >
id, and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</if> </when>
<if test="tenantId != null" > <when test="criterion.listValue" >
tenant_id, and ${criterion.condition}
</if> <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
<if test="loginName != null" > #{listItem}
login_name, </foreach>
</if> </when>
<if test="userNumLimit != null" > </choose>
user_num_limit, </foreach>
</if> </trim>
<if test="billsNumLimit != null" >
bills_num_limit,
</if>
<if test="createTime != null" >
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=BIGINT},
</if>
<if test="tenantId != null" >
#{tenantId,jdbcType=BIGINT},
</if>
<if test="loginName != null" >
#{loginName,jdbcType=VARCHAR},
</if>
<if test="userNumLimit != null" >
#{userNumLimit,jdbcType=INTEGER},
</if>
<if test="billsNumLimit != null" >
#{billsNumLimit,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.TenantExample" resultType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_tenant
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_tenant
<set >
<if test="record.id != null" >
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.tenantId != null" >
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if test="record.loginName != null" >
login_name = #{record.loginName,jdbcType=VARCHAR},
</if>
<if test="record.userNumLimit != null" >
user_num_limit = #{record.userNumLimit,jdbcType=INTEGER},
</if>
<if test="record.billsNumLimit != null" >
bills_num_limit = #{record.billsNumLimit,jdbcType=INTEGER},
</if>
<if test="record.createTime != null" >
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if> </if>
</update> </foreach>
<update id="updateByExample" parameterType="map" > </where>
<!-- </sql>
WARNING - @mbggenerated <sql id="Base_Column_List" >
This element is automatically generated by MyBatis Generator, do not modify. <!--
--> WARNING - @mbggenerated
update jsh_tenant This element is automatically generated by MyBatis Generator, do not modify.
set id = #{record.id,jdbcType=BIGINT}, -->
id, tenant_id, login_name, user_num_limit, bills_num_limit, create_time
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.jsh.erp.datasource.entities.TenantExample" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from jsh_tenant
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from jsh_tenant
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_tenant
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.TenantExample" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from jsh_tenant
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Tenant" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_tenant (id, tenant_id, login_name,
user_num_limit, bills_num_limit, create_time
)
values (#{id,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT}, #{loginName,jdbcType=VARCHAR},
#{userNumLimit,jdbcType=INTEGER}, #{billsNumLimit,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Tenant" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_tenant
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="tenantId != null" >
tenant_id,
</if>
<if test="loginName != null" >
login_name,
</if>
<if test="userNumLimit != null" >
user_num_limit,
</if>
<if test="billsNumLimit != null" >
bills_num_limit,
</if>
<if test="createTime != null" >
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=BIGINT},
</if>
<if test="tenantId != null" >
#{tenantId,jdbcType=BIGINT},
</if>
<if test="loginName != null" >
#{loginName,jdbcType=VARCHAR},
</if>
<if test="userNumLimit != null" >
#{userNumLimit,jdbcType=INTEGER},
</if>
<if test="billsNumLimit != null" >
#{billsNumLimit,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.TenantExample" resultType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from jsh_tenant
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_tenant
<set >
<if test="record.id != null" >
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.tenantId != null" >
tenant_id = #{record.tenantId,jdbcType=BIGINT}, tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if test="record.loginName != null" >
login_name = #{record.loginName,jdbcType=VARCHAR}, login_name = #{record.loginName,jdbcType=VARCHAR},
</if>
<if test="record.userNumLimit != null" >
user_num_limit = #{record.userNumLimit,jdbcType=INTEGER}, user_num_limit = #{record.userNumLimit,jdbcType=INTEGER},
</if>
<if test="record.billsNumLimit != null" >
bills_num_limit = #{record.billsNumLimit,jdbcType=INTEGER}, bills_num_limit = #{record.billsNumLimit,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP} </if>
<if test="_parameter != null" > <if test="record.createTime != null" >
<include refid="Update_By_Example_Where_Clause" /> create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if> </if>
</update> </set>
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Tenant" > <if test="_parameter != null" >
<!-- <include refid="Update_By_Example_Where_Clause" />
WARNING - @mbggenerated </if>
This element is automatically generated by MyBatis Generator, do not modify. </update>
--> <update id="updateByExample" parameterType="map" >
update jsh_tenant <!--
<set > WARNING - @mbggenerated
<if test="tenantId != null" > This element is automatically generated by MyBatis Generator, do not modify.
tenant_id = #{tenantId,jdbcType=BIGINT}, -->
</if> update jsh_tenant
<if test="loginName != null" > set id = #{record.id,jdbcType=BIGINT},
login_name = #{loginName,jdbcType=VARCHAR}, tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if> login_name = #{record.loginName,jdbcType=VARCHAR},
<if test="userNumLimit != null" > user_num_limit = #{record.userNumLimit,jdbcType=INTEGER},
user_num_limit = #{userNumLimit,jdbcType=INTEGER}, bills_num_limit = #{record.billsNumLimit,jdbcType=INTEGER},
</if> create_time = #{record.createTime,jdbcType=TIMESTAMP}
<if test="billsNumLimit != null" > <if test="_parameter != null" >
bills_num_limit = #{billsNumLimit,jdbcType=INTEGER}, <include refid="Update_By_Example_Where_Clause" />
</if> </if>
<if test="createTime != null" > </update>
create_time = #{createTime,jdbcType=TIMESTAMP}, <update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Tenant" >
</if> <!--
</set> WARNING - @mbggenerated
where id = #{id,jdbcType=BIGINT} This element is automatically generated by MyBatis Generator, do not modify.
</update> -->
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Tenant" > update jsh_tenant
<!-- <set >
WARNING - @mbggenerated <if test="tenantId != null" >
This element is automatically generated by MyBatis Generator, do not modify. tenant_id = #{tenantId,jdbcType=BIGINT},
--> </if>
update jsh_tenant <if test="loginName != null" >
set tenant_id = #{tenantId,jdbcType=BIGINT},
login_name = #{loginName,jdbcType=VARCHAR}, login_name = #{loginName,jdbcType=VARCHAR},
</if>
<if test="userNumLimit != null" >
user_num_limit = #{userNumLimit,jdbcType=INTEGER}, user_num_limit = #{userNumLimit,jdbcType=INTEGER},
</if>
<if test="billsNumLimit != null" >
bills_num_limit = #{billsNumLimit,jdbcType=INTEGER}, bills_num_limit = #{billsNumLimit,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP} </if>
where id = #{id,jdbcType=BIGINT} <if test="createTime != null" >
</update> create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Tenant" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update jsh_tenant
set tenant_id = #{tenantId,jdbcType=BIGINT},
login_name = #{loginName,jdbcType=VARCHAR},
user_num_limit = #{userNumLimit,jdbcType=INTEGER},
bills_num_limit = #{billsNumLimit,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper> </mapper>
\ No newline at end of file
...@@ -5,9 +5,8 @@ ...@@ -5,9 +5,8 @@
select * select *
FROM jsh_unit FROM jsh_unit
where 1=1 where 1=1
<if test="name != null and name != ''"> <if test="name != null">
<bind name="name" value="'%' + _parameter.name + '%'"/> and UName like '%${name}%'
and UName like #{name}
</if> </if>
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_Flag,'0') !='1'
<if test="offset != null and rows != null"> <if test="offset != null and rows != null">
...@@ -19,9 +18,8 @@ ...@@ -19,9 +18,8 @@
COUNT(id) COUNT(id)
FROM jsh_unit FROM jsh_unit
WHERE 1=1 WHERE 1=1
<if test="name != null and name != ''"> <if test="name != null">
<bind name="name" value="'%' + _parameter.name + '%'"/> and UName like '%${name}%'
and UName like #{name}
</if> </if>
and ifnull(delete_Flag,'0') !='1' and ifnull(delete_Flag,'0') !='1'
</select> </select>
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
<result column="Value" jdbcType="VARCHAR" property="value" /> <result column="Value" jdbcType="VARCHAR" property="value" />
<result column="BtnStr" jdbcType="VARCHAR" property="btnstr" /> <result column="BtnStr" jdbcType="VARCHAR" property="btnstr" />
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" /> <result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<!-- <!--
...@@ -85,7 +84,7 @@ ...@@ -85,7 +84,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, Type, KeyId, Value, BtnStr, delete_Flag, tenant_id Id, Type, KeyId, Value, BtnStr, delete_Flag
</sql> </sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -139,11 +138,11 @@ ...@@ -139,11 +138,11 @@
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_userbusiness (Id, Type, KeyId, insert into jsh_userbusiness (Id, Type, KeyId,
Value, BtnStr, delete_Flag, Value, BtnStr, delete_Flag
tenant_id) )
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{keyid,jdbcType=VARCHAR}, values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{keyid,jdbcType=VARCHAR},
#{value,jdbcType=VARCHAR}, #{btnstr,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR}, #{value,jdbcType=VARCHAR}, #{btnstr,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=VARCHAR}
#{tenantId,jdbcType=BIGINT}) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.UserBusiness"> <insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.UserBusiness">
<!-- <!--
...@@ -170,9 +169,6 @@ ...@@ -170,9 +169,6 @@
<if test="deleteFlag != null"> <if test="deleteFlag != null">
delete_Flag, delete_Flag,
</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">
...@@ -193,9 +189,6 @@ ...@@ -193,9 +189,6 @@
<if test="deleteFlag != null"> <if test="deleteFlag != null">
#{deleteFlag,jdbcType=VARCHAR}, #{deleteFlag,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.UserBusinessExample" resultType="java.lang.Integer"> <select id="countByExample" parameterType="com.jsh.erp.datasource.entities.UserBusinessExample" resultType="java.lang.Integer">
...@@ -233,9 +226,6 @@ ...@@ -233,9 +226,6 @@
<if test="record.deleteFlag != null"> <if test="record.deleteFlag != null">
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}, delete_Flag = #{record.deleteFlag,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" />
...@@ -252,8 +242,7 @@ ...@@ -252,8 +242,7 @@
KeyId = #{record.keyid,jdbcType=VARCHAR}, KeyId = #{record.keyid,jdbcType=VARCHAR},
Value = #{record.value,jdbcType=VARCHAR}, Value = #{record.value,jdbcType=VARCHAR},
BtnStr = #{record.btnstr,jdbcType=VARCHAR}, BtnStr = #{record.btnstr,jdbcType=VARCHAR},
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}, delete_Flag = #{record.deleteFlag,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>
...@@ -280,9 +269,6 @@ ...@@ -280,9 +269,6 @@
<if test="deleteFlag != null"> <if test="deleteFlag != null">
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}, delete_Flag = #{deleteFlag,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>
...@@ -296,8 +282,7 @@ ...@@ -296,8 +282,7 @@
KeyId = #{keyid,jdbcType=VARCHAR}, KeyId = #{keyid,jdbcType=VARCHAR},
Value = #{value,jdbcType=VARCHAR}, Value = #{value,jdbcType=VARCHAR},
BtnStr = #{btnstr,jdbcType=VARCHAR}, BtnStr = #{btnstr,jdbcType=VARCHAR},
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}, delete_Flag = #{deleteFlag,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
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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.UserMapperEx"> <mapper namespace="com.jsh.erp.datasource.mappers.UserMapperEx">
<resultMap extends="com.jsh.erp.datasource.mappers.UserMapper.BaseResultMap" id="ResultMapEx" <resultMap extends="com.jsh.erp.datasource.mappers.UserMapper.BaseResultMap" id="ResultMapEx" type="com.jsh.erp.datasource.entities.UserEx">
type="com.jsh.erp.datasource.entities.UserEx"> <result column="orgaId" jdbcType="BIGINT" property="orgaId" />
<result column="orgaId" jdbcType="BIGINT" property="orgaId"/> <result column="org_abr" jdbcType="VARCHAR" property="orgAbr" />
<result column="org_abr" jdbcType="VARCHAR" property="orgAbr"/> <result column="user_blng_orga_dspl_seq" jdbcType="VARCHAR" property="userBlngOrgaDsplSeq" />
<result column="user_blng_orga_dspl_seq" jdbcType="VARCHAR" property="userBlngOrgaDsplSeq"/> <result column="orgaUserRelId" jdbcType="BIGINT" property="orgaUserRelId" />
<result column="orgaUserRelId" jdbcType="BIGINT" property="orgaUserRelId"/>
</resultMap> </resultMap>
<select id="selectByConditionUser" parameterType="com.jsh.erp.datasource.entities.UserExample" <select id="selectByConditionUser" parameterType="com.jsh.erp.datasource.entities.UserExample" resultMap="com.jsh.erp.datasource.mappers.UserMapper.BaseResultMap">
resultMap="com.jsh.erp.datasource.mappers.UserMapper.BaseResultMap">
select * select *
FROM jsh_user FROM jsh_user
where 1=1 where 1=1
and ifnull(status,'0') not in('1','2') and ifnull(status,'0') not in('1','2')
<if test="userName != null and userName != ''"> <if test="userName != null">
<bind name="userName" value="'%' + _parameter.userName + '%'"/> and username like '%${userName}%'
and username like #{userName}
</if> </if>
<if test="loginName != null and loginName != ''"> <if test="loginName != null">
<bind name="loginName" value="'%' + _parameter.loginName + '%'"/> and loginame like '%${loginName}%'
and loginame like #{loginName}
</if> </if>
<if test="offset != null and rows != null"> <if test="offset != null and rows != null">
limit #{offset},#{rows} limit #{offset},#{rows}
...@@ -32,37 +28,34 @@ ...@@ -32,37 +28,34 @@
FROM jsh_user FROM jsh_user
WHERE 1=1 WHERE 1=1
and ifnull(status,'0') not in('1','2') and ifnull(status,'0') not in('1','2')
<if test="userName != null and userName != ''"> <if test="userName != null">
<bind name="userName" value="'%' + _parameter.userName + '%'"/> and username like '%${userName}%'
and username like #{userName}
</if> </if>
<if test="loginName != null and loginName != ''"> <if test="loginName != null">
<bind name="loginName" value="'%' + _parameter.loginName + '%'"/> and loginame like '%${loginName}%'
and loginame like #{loginName}
</if> </if>
</select> </select>
<select id="getUserList" parameterType="java.util.Map" resultMap="ResultMapEx"> <select id="getUserList" parameterType="java.util.Map" resultMap="ResultMapEx">
select user.id, user.username, user.loginame, user.position, user.email, user.phonenum, select user.id, user.username, user.loginame, user.position, user.email, user.phonenum,
user.description, user.remark,user.isystem,org.id as user.description, user.remark,user.isystem,org.id as orgaId,user.tenant_id,org.org_abr,rel.user_blng_orga_dspl_seq,
orgaId,user.tenant_id,org.org_abr,rel.user_blng_orga_dspl_seq,
rel.id as orgaUserRelId rel.id as orgaUserRelId
FROM jsh_user user FROM jsh_user user
left join jsh_orga_user_rel rel on user.id=rel.user_id and ifnull(rel.delete_flag,'0') !='1' left join jsh_orga_user_rel rel on user.id=rel.user_id and ifnull(rel.delete_flag,'0') !='1'
left join jsh_organization org on rel.orga_id=org.id and ifnull(org.org_stcd,'0') !='5' left join jsh_organization org on rel.orga_id=org.id and ifnull(org.org_stcd,'0') !='5'
where 1=1 where 1=1
and ifnull(user.status,'0') not in('1','2') and ifnull(user.status,'0') not in('1','2')
<if test="userName != null and userName != ''"> <if test="userName != null and userName != ''">
<bind name="userName" value="'%' + _parameter.userName + '%'"/> <bind name="userName" value="'%' + _parameter.userName + '%'" />
and user.userName like #{userName} and user.userName like #{userName}
</if> </if>
<if test="loginName != null and loginName != ''"> <if test="loginName != null and loginName != ''">
<bind name="loginName" value="'%' + _parameter.loginName + '%'"/> <bind name="loginName" value="'%' + _parameter.loginName + '%'" />
and user.loginName like #{loginName} and user.loginName like #{loginName}
</if> </if>
order by user.id desc order by user.id desc
</select> </select>
<insert id="addUser" parameterType="com.jsh.erp.datasource.entities.UserEx" <insert id="addUser" parameterType="com.jsh.erp.datasource.entities.UserEx"
useGeneratedKeys="true" keyProperty="id" keyColumn="id"> useGeneratedKeys="true" keyProperty="id" keyColumn="id">
insert into jsh_user (username, loginame, insert into jsh_user (username, loginame,
password, position, password, position,
email, phonenum, ismanager, email, phonenum, ismanager,
...@@ -116,12 +109,15 @@ ...@@ -116,12 +109,15 @@
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<select id="getUserListByLoginName" resultMap="com.jsh.erp.datasource.mappers.UserMapper.BaseResultMap"> <select id="getUserListByUserNameOrLoginName" resultMap="com.jsh.erp.datasource.mappers.UserMapper.BaseResultMap">
select user.id, user.username, user.loginame, user.position, user.email, user.phonenum, select user.id, user.username, user.loginame, user.position, user.email, user.phonenum,
user.description, user.remark,user.isystem,user.tenant_id user.description, user.remark,user.isystem
FROM jsh_user user FROM jsh_user user
where 1=1 where 1=1
and ifnull(user.status,'0') not in('1','2') and ifnull(user.status,'0') not in('1','2')
<if test="userName != null and userName != ''">
and user.userName = #{userName}
</if>
<if test="loginame != null and loginame != ''"> <if test="loginame != null and loginame != ''">
and user.loginame = #{loginame} and user.loginame = #{loginame}
</if> </if>
...@@ -188,42 +184,4 @@ ...@@ -188,42 +184,4 @@
and ifnull(org_stcd,'0') !='5' and ifnull(org_stcd,'0') !='5'
order by sort asc order by sort asc
</select> </select>
<select id="getUserListByUserNameAndTenantId" resultMap="com.jsh.erp.datasource.mappers.UserMapper.BaseResultMap">
select user.id, user.username, user.loginame, user.position, user.email, user.phonenum,
user.description, user.remark,user.isystem
FROM jsh_user user
where 1=1
and ifnull(user.status,'0') not in('1','2')
<if test="userName != null and userName != ''">
and user.userName = #{userName}
</if>
<choose>
<when test="tenantId != null">
and user.tenant_id = #{tenantId}
</when>
<otherwise>
AND user.tenant_id is null
</otherwise>
</choose>
order by user.id desc
</select>
<select id="addRegisterUserNotInclueUser" resultType="java.lang.String">
select registerUserTemplate(#{userId},#{tenantId},#{roleId}) from dual;
</select>
<select id="getUserListByloginNameAndPassword" resultMap="com.jsh.erp.datasource.mappers.UserMapper.BaseResultMap">
select user.id, user.username, user.loginame, user.position, user.email, user.phonenum,
user.description, user.remark,user.isystem,user.tenant_id
FROM jsh_user user
where 1=1
and ifnull(user.status,'0') not in('1','2')
<if test="loginame != null and loginame != ''">
and user.loginame = #{loginame}
</if>
<if test="password != null and password != ''">
and user.password = #{password}
</if>
order by user.id desc
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<generatorConfiguration> <generatorConfiguration>
<classPathEntry <classPathEntry
location="C:\Users\cjl\.m2\repository\mysql\mysql-connector-java\5.1.47\mysql-connector-java-5.1.47.jar"/> location="E:\maven-repository\default\mysql\mysql-connector-java\5.1.47\mysql-connector-java-5.1.47.jar"/>
<context id="DB2Tables" targetRuntime="MyBatis3" defaultModelType="flat"> <context id="DB2Tables" targetRuntime="MyBatis3" defaultModelType="flat">
<commentGenerator> <commentGenerator>
......
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