更新generatorConfig.xml

This commit is contained in:
shuzheng 2017-01-06 17:28:15 +08:00
parent 0b8ff62bc0
commit 13701e00fb
9 changed files with 830 additions and 389 deletions

View File

@ -10,7 +10,7 @@ public interface UpmsPermissionMapper {
int deleteByExample(UpmsPermissionExample example);
int deleteByPrimaryKey(Integer userOrganizationId);
int deleteByPrimaryKey(Integer permissionId);
int insert(UpmsPermission record);
@ -18,7 +18,7 @@ public interface UpmsPermissionMapper {
List<UpmsPermission> selectByExample(UpmsPermissionExample example);
UpmsPermission selectByPrimaryKey(Integer userOrganizationId);
UpmsPermission selectByPrimaryKey(Integer permissionId);
int updateByExampleSelective(@Param("record") UpmsPermission record, @Param("example") UpmsPermissionExample example);

View File

@ -1,30 +1,29 @@
<?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.zheng.upms.dao.mapper.UpmsPermissionMapper">
<resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsPermission">
<id column="user_organization_id" jdbcType="INTEGER" property="userOrganizationId" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="organization_id" jdbcType="INTEGER" property="organizationId" />
<?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.zheng.upms.dao.mapper.UpmsPermissionMapper" >
<resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsPermission" >
<id column="permission_id" property="permissionId" jdbcType="INTEGER" />
<result column="system_id" property="systemId" jdbcType="INTEGER" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
<sql id="Example_Where_Clause" >
<where >
<foreach collection="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">
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
@ -35,25 +34,25 @@
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
<sql id="Update_By_Example_Where_Clause" >
<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">
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
@ -64,293 +63,108 @@
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
user_organization_id, user_id, organization_id
</sql>
<select id="selectByExample" parameterType="com.zheng.upms.dao.model.UpmsPermissionExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from upms_user_organization
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from upms_user_organization
where user_organization_id = #{userOrganizationId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from upms_user_organization
where user_organization_id = #{userOrganizationId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.upms.dao.model.UpmsPermissionExample">
delete from upms_user_organization
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsPermission">
insert into upms_user_organization (user_organization_id, user_id, organization_id
)
values (#{userOrganizationId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{organizationId,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsPermission">
insert into upms_user_organization
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userOrganizationId != null">
user_organization_id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="organizationId != null">
organization_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userOrganizationId != null">
#{userOrganizationId,jdbcType=INTEGER},
</if>
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="organizationId != null">
#{organizationId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsPermissionExample" resultType="java.lang.Integer">
select count(*) from upms_user_organization
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update upms_user_organization
<set>
<if test="record.userOrganizationId != null">
user_organization_id = #{record.userOrganizationId,jdbcType=INTEGER},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=INTEGER},
</if>
<if test="record.organizationId != null">
organization_id = #{record.organizationId,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update upms_user_organization
set user_organization_id = #{record.userOrganizationId,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=INTEGER},
organization_id = #{record.organizationId,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsPermission">
update upms_user_organization
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="organizationId != null">
organization_id = #{organizationId,jdbcType=INTEGER},
</if>
</set>
where user_organization_id = #{userOrganizationId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsPermission">
update upms_user_organization
set user_id = #{userId,jdbcType=INTEGER},
organization_id = #{organizationId,jdbcType=INTEGER}
where user_organization_id = #{userOrganizationId,jdbcType=INTEGER}
</update>
<cache />
<resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsPermission">
<id column="permission_id" jdbcType="INTEGER" property="permissionId" />
<result column="system_id" jdbcType="INTEGER" property="systemId" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<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 close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<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 close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
<sql id="Base_Column_List" >
permission_id, system_id
</sql>
<select id="selectByExample" parameterType="com.zheng.upms.dao.model.UpmsPermissionExample" resultMap="BaseResultMap">
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.zheng.upms.dao.model.UpmsPermissionExample" >
select
<if test="distinct">
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from upms_permission
<if test="_parameter != null">
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
<if test="limit != null">
<if test="offset != null">
<if test="limit != null" >
<if test="offset != null" >
limit ${offset}, ${limit}
</if>
<if test="offset == null">
<if test="offset == null" >
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from upms_permission
where permission_id = #{permissionId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from upms_permission
where permission_id = #{permissionId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.upms.dao.model.UpmsPermissionExample">
<delete id="deleteByExample" parameterType="com.zheng.upms.dao.model.UpmsPermissionExample" >
delete from upms_permission
<if test="_parameter != null">
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsPermission">
<selectKey keyProperty="permissionId" order="AFTER" resultType="java.lang.Integer">
<insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsPermission" >
<selectKey resultType="java.lang.Integer" keyProperty="permissionId" order="AFTER" >
SELECT LAST_INSERT_ID()
</selectKey>
insert into upms_permission (system_id)
values (#{systemId,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsPermission">
<selectKey keyProperty="permissionId" order="AFTER" resultType="java.lang.Integer">
<insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsPermission" >
<selectKey resultType="java.lang.Integer" keyProperty="permissionId" order="AFTER" >
SELECT LAST_INSERT_ID()
</selectKey>
insert into upms_permission
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="systemId != null">
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="systemId != null" >
system_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="systemId != null">
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="systemId != null" >
#{systemId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsPermissionExample" resultType="java.lang.Integer">
<select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsPermissionExample" resultType="java.lang.Integer" >
select count(*) from upms_permission
<if test="_parameter != null">
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
<update id="updateByExampleSelective" parameterType="map" >
update upms_permission
<set>
<if test="record.permissionId != null">
<set >
<if test="record.permissionId != null" >
permission_id = #{record.permissionId,jdbcType=INTEGER},
</if>
<if test="record.systemId != null">
<if test="record.systemId != null" >
system_id = #{record.systemId,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
<update id="updateByExample" parameterType="map" >
update upms_permission
set permission_id = #{record.permissionId,jdbcType=INTEGER},
system_id = #{record.systemId,jdbcType=INTEGER}
<if test="_parameter != null">
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsPermission">
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsPermission" >
update upms_permission
<set>
<if test="systemId != null">
<set >
<if test="systemId != null" >
system_id = #{systemId,jdbcType=INTEGER},
</if>
</set>
where permission_id = #{permissionId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsPermission">
<update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsPermission" >
update upms_permission
set system_id = #{systemId,jdbcType=INTEGER}
where permission_id = #{permissionId,jdbcType=INTEGER}

View File

@ -0,0 +1,30 @@
package com.zheng.upms.dao.mapper;
import com.zheng.upms.dao.model.UpmsUserOrganization;
import com.zheng.upms.dao.model.UpmsUserOrganizationExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface UpmsUserOrganizationMapper {
int countByExample(UpmsUserOrganizationExample example);
int deleteByExample(UpmsUserOrganizationExample example);
int deleteByPrimaryKey(Integer userOrganizationId);
int insert(UpmsUserOrganization record);
int insertSelective(UpmsUserOrganization record);
List<UpmsUserOrganization> selectByExample(UpmsUserOrganizationExample example);
UpmsUserOrganization selectByPrimaryKey(Integer userOrganizationId);
int updateByExampleSelective(@Param("record") UpmsUserOrganization record, @Param("example") UpmsUserOrganizationExample example);
int updateByExample(@Param("record") UpmsUserOrganization record, @Param("example") UpmsUserOrganizationExample example);
int updateByPrimaryKeySelective(UpmsUserOrganization record);
int updateByPrimaryKey(UpmsUserOrganization record);
}

View File

@ -0,0 +1,190 @@
<?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.zheng.upms.dao.mapper.UpmsUserOrganizationMapper" >
<resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsUserOrganization" >
<id column="user_organization_id" property="userOrganizationId" jdbcType="INTEGER" />
<result column="user_id" property="userId" jdbcType="INTEGER" />
<result column="organization_id" property="organizationId" jdbcType="INTEGER" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="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="Update_By_Example_Where_Clause" >
<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" >
user_organization_id, user_id, organization_id
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.zheng.upms.dao.model.UpmsUserOrganizationExample" >
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from upms_user_organization
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
<if test="limit != null" >
<if test="offset != null" >
limit ${offset}, ${limit}
</if>
<if test="offset == null" >
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from upms_user_organization
where user_organization_id = #{userOrganizationId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from upms_user_organization
where user_organization_id = #{userOrganizationId,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.zheng.upms.dao.model.UpmsUserOrganizationExample" >
delete from upms_user_organization
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsUserOrganization" >
insert into upms_user_organization (user_organization_id, user_id, organization_id
)
values (#{userOrganizationId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{organizationId,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsUserOrganization" >
insert into upms_user_organization
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="userOrganizationId != null" >
user_organization_id,
</if>
<if test="userId != null" >
user_id,
</if>
<if test="organizationId != null" >
organization_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="userOrganizationId != null" >
#{userOrganizationId,jdbcType=INTEGER},
</if>
<if test="userId != null" >
#{userId,jdbcType=INTEGER},
</if>
<if test="organizationId != null" >
#{organizationId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsUserOrganizationExample" resultType="java.lang.Integer" >
select count(*) from upms_user_organization
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
update upms_user_organization
<set >
<if test="record.userOrganizationId != null" >
user_organization_id = #{record.userOrganizationId,jdbcType=INTEGER},
</if>
<if test="record.userId != null" >
user_id = #{record.userId,jdbcType=INTEGER},
</if>
<if test="record.organizationId != null" >
organization_id = #{record.organizationId,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
update upms_user_organization
set user_organization_id = #{record.userOrganizationId,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=INTEGER},
organization_id = #{record.organizationId,jdbcType=INTEGER}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsUserOrganization" >
update upms_user_organization
<set >
<if test="userId != null" >
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="organizationId != null" >
organization_id = #{organizationId,jdbcType=INTEGER},
</if>
</set>
where user_organization_id = #{userOrganizationId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsUserOrganization" >
update upms_user_organization
set user_id = #{userId,jdbcType=INTEGER},
organization_id = #{organizationId,jdbcType=INTEGER}
where user_organization_id = #{userOrganizationId,jdbcType=INTEGER}
</update>
<cache />
</mapper>

View File

@ -3,36 +3,26 @@ package com.zheng.upms.dao.model;
import java.io.Serializable;
public class UpmsPermission implements Serializable {
private Integer userOrganizationId;
private Integer permissionId;
private Integer userId;
private Integer organizationId;
private Integer systemId;
private static final long serialVersionUID = 1L;
public Integer getUserOrganizationId() {
return userOrganizationId;
public Integer getPermissionId() {
return permissionId;
}
public void setUserOrganizationId(Integer userOrganizationId) {
this.userOrganizationId = userOrganizationId;
public void setPermissionId(Integer permissionId) {
this.permissionId = permissionId;
}
public Integer getUserId() {
return userId;
public Integer getSystemId() {
return systemId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public Integer getOrganizationId() {
return organizationId;
}
public void setOrganizationId(Integer organizationId) {
this.organizationId = organizationId;
public void setSystemId(Integer systemId) {
this.systemId = systemId;
}
@Override
@ -41,9 +31,8 @@ public class UpmsPermission implements Serializable {
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", userOrganizationId=").append(userOrganizationId);
sb.append(", userId=").append(userId);
sb.append(", organizationId=").append(organizationId);
sb.append(", permissionId=").append(permissionId);
sb.append(", systemId=").append(systemId);
sb.append("]");
return sb.toString();
}
@ -60,18 +49,16 @@ public class UpmsPermission implements Serializable {
return false;
}
UpmsPermission other = (UpmsPermission) that;
return (this.getUserOrganizationId() == null ? other.getUserOrganizationId() == null : this.getUserOrganizationId().equals(other.getUserOrganizationId()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
&& (this.getOrganizationId() == null ? other.getOrganizationId() == null : this.getOrganizationId().equals(other.getOrganizationId()));
return (this.getPermissionId() == null ? other.getPermissionId() == null : this.getPermissionId().equals(other.getPermissionId()))
&& (this.getSystemId() == null ? other.getSystemId() == null : this.getSystemId().equals(other.getSystemId()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getUserOrganizationId() == null) ? 0 : getUserOrganizationId().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getOrganizationId() == null) ? 0 : getOrganizationId().hashCode());
result = prime * result + ((getPermissionId() == null) ? 0 : getPermissionId().hashCode());
result = prime * result + ((getSystemId() == null) ? 0 : getSystemId().hashCode());
return result;
}
}

View File

@ -127,183 +127,123 @@ public class UpmsPermissionExample implements Serializable {
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andUserOrganizationIdIsNull() {
addCriterion("user_organization_id is null");
public Criteria andPermissionIdIsNull() {
addCriterion("permission_id is null");
return (Criteria) this;
}
public Criteria andUserOrganizationIdIsNotNull() {
addCriterion("user_organization_id is not null");
public Criteria andPermissionIdIsNotNull() {
addCriterion("permission_id is not null");
return (Criteria) this;
}
public Criteria andUserOrganizationIdEqualTo(Integer value) {
addCriterion("user_organization_id =", value, "userOrganizationId");
public Criteria andPermissionIdEqualTo(Integer value) {
addCriterion("permission_id =", value, "permissionId");
return (Criteria) this;
}
public Criteria andUserOrganizationIdNotEqualTo(Integer value) {
addCriterion("user_organization_id <>", value, "userOrganizationId");
public Criteria andPermissionIdNotEqualTo(Integer value) {
addCriterion("permission_id <>", value, "permissionId");
return (Criteria) this;
}
public Criteria andUserOrganizationIdGreaterThan(Integer value) {
addCriterion("user_organization_id >", value, "userOrganizationId");
public Criteria andPermissionIdGreaterThan(Integer value) {
addCriterion("permission_id >", value, "permissionId");
return (Criteria) this;
}
public Criteria andUserOrganizationIdGreaterThanOrEqualTo(Integer value) {
addCriterion("user_organization_id >=", value, "userOrganizationId");
public Criteria andPermissionIdGreaterThanOrEqualTo(Integer value) {
addCriterion("permission_id >=", value, "permissionId");
return (Criteria) this;
}
public Criteria andUserOrganizationIdLessThan(Integer value) {
addCriterion("user_organization_id <", value, "userOrganizationId");
public Criteria andPermissionIdLessThan(Integer value) {
addCriterion("permission_id <", value, "permissionId");
return (Criteria) this;
}
public Criteria andUserOrganizationIdLessThanOrEqualTo(Integer value) {
addCriterion("user_organization_id <=", value, "userOrganizationId");
public Criteria andPermissionIdLessThanOrEqualTo(Integer value) {
addCriterion("permission_id <=", value, "permissionId");
return (Criteria) this;
}
public Criteria andUserOrganizationIdIn(List<Integer> values) {
addCriterion("user_organization_id in", values, "userOrganizationId");
public Criteria andPermissionIdIn(List<Integer> values) {
addCriterion("permission_id in", values, "permissionId");
return (Criteria) this;
}
public Criteria andUserOrganizationIdNotIn(List<Integer> values) {
addCriterion("user_organization_id not in", values, "userOrganizationId");
public Criteria andPermissionIdNotIn(List<Integer> values) {
addCriterion("permission_id not in", values, "permissionId");
return (Criteria) this;
}
public Criteria andUserOrganizationIdBetween(Integer value1, Integer value2) {
addCriterion("user_organization_id between", value1, value2, "userOrganizationId");
public Criteria andPermissionIdBetween(Integer value1, Integer value2) {
addCriterion("permission_id between", value1, value2, "permissionId");
return (Criteria) this;
}
public Criteria andUserOrganizationIdNotBetween(Integer value1, Integer value2) {
addCriterion("user_organization_id not between", value1, value2, "userOrganizationId");
public Criteria andPermissionIdNotBetween(Integer value1, Integer value2) {
addCriterion("permission_id not between", value1, value2, "permissionId");
return (Criteria) this;
}
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
public Criteria andSystemIdIsNull() {
addCriterion("system_id is null");
return (Criteria) this;
}
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
public Criteria andSystemIdIsNotNull() {
addCriterion("system_id is not null");
return (Criteria) this;
}
public Criteria andUserIdEqualTo(Integer value) {
addCriterion("user_id =", value, "userId");
public Criteria andSystemIdEqualTo(Integer value) {
addCriterion("system_id =", value, "systemId");
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(Integer value) {
addCriterion("user_id <>", value, "userId");
public Criteria andSystemIdNotEqualTo(Integer value) {
addCriterion("system_id <>", value, "systemId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(Integer value) {
addCriterion("user_id >", value, "userId");
public Criteria andSystemIdGreaterThan(Integer value) {
addCriterion("system_id >", value, "systemId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(Integer value) {
addCriterion("user_id >=", value, "userId");
public Criteria andSystemIdGreaterThanOrEqualTo(Integer value) {
addCriterion("system_id >=", value, "systemId");
return (Criteria) this;
}
public Criteria andUserIdLessThan(Integer value) {
addCriterion("user_id <", value, "userId");
public Criteria andSystemIdLessThan(Integer value) {
addCriterion("system_id <", value, "systemId");
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(Integer value) {
addCriterion("user_id <=", value, "userId");
public Criteria andSystemIdLessThanOrEqualTo(Integer value) {
addCriterion("system_id <=", value, "systemId");
return (Criteria) this;
}
public Criteria andUserIdIn(List<Integer> values) {
addCriterion("user_id in", values, "userId");
public Criteria andSystemIdIn(List<Integer> values) {
addCriterion("system_id in", values, "systemId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<Integer> values) {
addCriterion("user_id not in", values, "userId");
public Criteria andSystemIdNotIn(List<Integer> values) {
addCriterion("system_id not in", values, "systemId");
return (Criteria) this;
}
public Criteria andUserIdBetween(Integer value1, Integer value2) {
addCriterion("user_id between", value1, value2, "userId");
public Criteria andSystemIdBetween(Integer value1, Integer value2) {
addCriterion("system_id between", value1, value2, "systemId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(Integer value1, Integer value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andOrganizationIdIsNull() {
addCriterion("organization_id is null");
return (Criteria) this;
}
public Criteria andOrganizationIdIsNotNull() {
addCriterion("organization_id is not null");
return (Criteria) this;
}
public Criteria andOrganizationIdEqualTo(Integer value) {
addCriterion("organization_id =", value, "organizationId");
return (Criteria) this;
}
public Criteria andOrganizationIdNotEqualTo(Integer value) {
addCriterion("organization_id <>", value, "organizationId");
return (Criteria) this;
}
public Criteria andOrganizationIdGreaterThan(Integer value) {
addCriterion("organization_id >", value, "organizationId");
return (Criteria) this;
}
public Criteria andOrganizationIdGreaterThanOrEqualTo(Integer value) {
addCriterion("organization_id >=", value, "organizationId");
return (Criteria) this;
}
public Criteria andOrganizationIdLessThan(Integer value) {
addCriterion("organization_id <", value, "organizationId");
return (Criteria) this;
}
public Criteria andOrganizationIdLessThanOrEqualTo(Integer value) {
addCriterion("organization_id <=", value, "organizationId");
return (Criteria) this;
}
public Criteria andOrganizationIdIn(List<Integer> values) {
addCriterion("organization_id in", values, "organizationId");
return (Criteria) this;
}
public Criteria andOrganizationIdNotIn(List<Integer> values) {
addCriterion("organization_id not in", values, "organizationId");
return (Criteria) this;
}
public Criteria andOrganizationIdBetween(Integer value1, Integer value2) {
addCriterion("organization_id between", value1, value2, "organizationId");
return (Criteria) this;
}
public Criteria andOrganizationIdNotBetween(Integer value1, Integer value2) {
addCriterion("organization_id not between", value1, value2, "organizationId");
public Criteria andSystemIdNotBetween(Integer value1, Integer value2) {
addCriterion("system_id not between", value1, value2, "systemId");
return (Criteria) this;
}
}

View File

@ -0,0 +1,77 @@
package com.zheng.upms.dao.model;
import java.io.Serializable;
public class UpmsUserOrganization implements Serializable {
private Integer userOrganizationId;
private Integer userId;
private Integer organizationId;
private static final long serialVersionUID = 1L;
public Integer getUserOrganizationId() {
return userOrganizationId;
}
public void setUserOrganizationId(Integer userOrganizationId) {
this.userOrganizationId = userOrganizationId;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public Integer getOrganizationId() {
return organizationId;
}
public void setOrganizationId(Integer organizationId) {
this.organizationId = organizationId;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", userOrganizationId=").append(userOrganizationId);
sb.append(", userId=").append(userId);
sb.append(", organizationId=").append(organizationId);
sb.append("]");
return sb.toString();
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
UpmsUserOrganization other = (UpmsUserOrganization) that;
return (this.getUserOrganizationId() == null ? other.getUserOrganizationId() == null : this.getUserOrganizationId().equals(other.getUserOrganizationId()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
&& (this.getOrganizationId() == null ? other.getOrganizationId() == null : this.getOrganizationId().equals(other.getOrganizationId()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getUserOrganizationId() == null) ? 0 : getUserOrganizationId().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getOrganizationId() == null) ? 0 : getOrganizationId().hashCode());
return result;
}
}

View File

@ -0,0 +1,403 @@
package com.zheng.upms.dao.model;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
public class UpmsUserOrganizationExample implements Serializable {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
private static final long serialVersionUID = 1L;
private Integer limit;
private Integer offset;
public UpmsUserOrganizationExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setLimit(Integer limit) {
this.limit = limit;
}
public Integer getLimit() {
return limit;
}
public void setOffset(Integer offset) {
this.offset = offset;
}
public Integer getOffset() {
return offset;
}
protected abstract static class GeneratedCriteria implements Serializable {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andUserOrganizationIdIsNull() {
addCriterion("user_organization_id is null");
return (Criteria) this;
}
public Criteria andUserOrganizationIdIsNotNull() {
addCriterion("user_organization_id is not null");
return (Criteria) this;
}
public Criteria andUserOrganizationIdEqualTo(Integer value) {
addCriterion("user_organization_id =", value, "userOrganizationId");
return (Criteria) this;
}
public Criteria andUserOrganizationIdNotEqualTo(Integer value) {
addCriterion("user_organization_id <>", value, "userOrganizationId");
return (Criteria) this;
}
public Criteria andUserOrganizationIdGreaterThan(Integer value) {
addCriterion("user_organization_id >", value, "userOrganizationId");
return (Criteria) this;
}
public Criteria andUserOrganizationIdGreaterThanOrEqualTo(Integer value) {
addCriterion("user_organization_id >=", value, "userOrganizationId");
return (Criteria) this;
}
public Criteria andUserOrganizationIdLessThan(Integer value) {
addCriterion("user_organization_id <", value, "userOrganizationId");
return (Criteria) this;
}
public Criteria andUserOrganizationIdLessThanOrEqualTo(Integer value) {
addCriterion("user_organization_id <=", value, "userOrganizationId");
return (Criteria) this;
}
public Criteria andUserOrganizationIdIn(List<Integer> values) {
addCriterion("user_organization_id in", values, "userOrganizationId");
return (Criteria) this;
}
public Criteria andUserOrganizationIdNotIn(List<Integer> values) {
addCriterion("user_organization_id not in", values, "userOrganizationId");
return (Criteria) this;
}
public Criteria andUserOrganizationIdBetween(Integer value1, Integer value2) {
addCriterion("user_organization_id between", value1, value2, "userOrganizationId");
return (Criteria) this;
}
public Criteria andUserOrganizationIdNotBetween(Integer value1, Integer value2) {
addCriterion("user_organization_id not between", value1, value2, "userOrganizationId");
return (Criteria) this;
}
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andUserIdEqualTo(Integer value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(Integer value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(Integer value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(Integer value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThan(Integer value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(Integer value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdIn(List<Integer> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<Integer> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(Integer value1, Integer value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(Integer value1, Integer value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andOrganizationIdIsNull() {
addCriterion("organization_id is null");
return (Criteria) this;
}
public Criteria andOrganizationIdIsNotNull() {
addCriterion("organization_id is not null");
return (Criteria) this;
}
public Criteria andOrganizationIdEqualTo(Integer value) {
addCriterion("organization_id =", value, "organizationId");
return (Criteria) this;
}
public Criteria andOrganizationIdNotEqualTo(Integer value) {
addCriterion("organization_id <>", value, "organizationId");
return (Criteria) this;
}
public Criteria andOrganizationIdGreaterThan(Integer value) {
addCriterion("organization_id >", value, "organizationId");
return (Criteria) this;
}
public Criteria andOrganizationIdGreaterThanOrEqualTo(Integer value) {
addCriterion("organization_id >=", value, "organizationId");
return (Criteria) this;
}
public Criteria andOrganizationIdLessThan(Integer value) {
addCriterion("organization_id <", value, "organizationId");
return (Criteria) this;
}
public Criteria andOrganizationIdLessThanOrEqualTo(Integer value) {
addCriterion("organization_id <=", value, "organizationId");
return (Criteria) this;
}
public Criteria andOrganizationIdIn(List<Integer> values) {
addCriterion("organization_id in", values, "organizationId");
return (Criteria) this;
}
public Criteria andOrganizationIdNotIn(List<Integer> values) {
addCriterion("organization_id not in", values, "organizationId");
return (Criteria) this;
}
public Criteria andOrganizationIdBetween(Integer value1, Integer value2) {
addCriterion("organization_id between", value1, value2, "organizationId");
return (Criteria) this;
}
public Criteria andOrganizationIdNotBetween(Integer value1, Integer value2) {
addCriterion("organization_id not between", value1, value2, "organizationId");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria implements Serializable {
protected Criteria() {
super();
}
}
public static class Criterion implements Serializable {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

View File

@ -69,7 +69,7 @@
<table tableName="upms_permission" domainObjectName="UpmsPermission">
<generatedKey column="permission_id" sqlStatement="MySql" identity="true" />
</table>
<table tableName="upms_user_organization" domainObjectName="UpmsPermission"></table>
<table tableName="upms_user_organization" domainObjectName="UpmsUserOrganization"></table>
<table tableName="upms_user_role" domainObjectName="UpmsUserRole"></table>
<table tableName="upms_user_permission" domainObjectName="UpmsUserPermission"></table>
<table tableName="upms_role_permission" domainObjectName="UpmsRolePermission"></table>