14 changed files with 1456 additions and 1615 deletions
@ -1,150 +1,139 @@ |
|||
package com.ccsens.carbasics.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
public class Organization implements Serializable { |
|||
private Long id; |
|||
|
|||
private Byte organizationType; |
|||
|
|||
private String code; |
|||
|
|||
private String name; |
|||
|
|||
private String shortName; |
|||
|
|||
private String introduce; |
|||
|
|||
private Byte level; |
|||
|
|||
private Long parentId; |
|||
|
|||
private Long operator; |
|||
|
|||
private Date createdAt; |
|||
|
|||
private Date updatedAt; |
|||
|
|||
private Byte recStatus; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
public Long getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(Long id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public Byte getOrganizationType() { |
|||
return organizationType; |
|||
} |
|||
|
|||
public void setOrganizationType(Byte organizationType) { |
|||
this.organizationType = organizationType; |
|||
} |
|||
|
|||
public String getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public void setCode(String code) { |
|||
this.code = code == null ? null : code.trim(); |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name == null ? null : name.trim(); |
|||
} |
|||
|
|||
public String getShortName() { |
|||
return shortName; |
|||
} |
|||
|
|||
public void setShortName(String shortName) { |
|||
this.shortName = shortName == null ? null : shortName.trim(); |
|||
} |
|||
|
|||
public String getIntroduce() { |
|||
return introduce; |
|||
} |
|||
|
|||
public void setIntroduce(String introduce) { |
|||
this.introduce = introduce == null ? null : introduce.trim(); |
|||
} |
|||
|
|||
public Byte getLevel() { |
|||
return level; |
|||
} |
|||
|
|||
public void setLevel(Byte level) { |
|||
this.level = level; |
|||
} |
|||
|
|||
public Long getParentId() { |
|||
return parentId; |
|||
} |
|||
|
|||
public void setParentId(Long parentId) { |
|||
this.parentId = parentId; |
|||
} |
|||
|
|||
public Long getOperator() { |
|||
return operator; |
|||
} |
|||
|
|||
public void setOperator(Long operator) { |
|||
this.operator = operator; |
|||
} |
|||
|
|||
public Date getCreatedAt() { |
|||
return createdAt; |
|||
} |
|||
|
|||
public void setCreatedAt(Date createdAt) { |
|||
this.createdAt = createdAt; |
|||
} |
|||
|
|||
public Date getUpdatedAt() { |
|||
return updatedAt; |
|||
} |
|||
|
|||
public void setUpdatedAt(Date updatedAt) { |
|||
this.updatedAt = updatedAt; |
|||
} |
|||
|
|||
public Byte getRecStatus() { |
|||
return recStatus; |
|||
} |
|||
|
|||
public void setRecStatus(Byte recStatus) { |
|||
this.recStatus = recStatus; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
StringBuilder sb = new StringBuilder(); |
|||
sb.append(getClass().getSimpleName()); |
|||
sb.append(" ["); |
|||
sb.append("Hash = ").append(hashCode()); |
|||
sb.append(", id=").append(id); |
|||
sb.append(", organizationType=").append(organizationType); |
|||
sb.append(", code=").append(code); |
|||
sb.append(", name=").append(name); |
|||
sb.append(", shortName=").append(shortName); |
|||
sb.append(", introduce=").append(introduce); |
|||
sb.append(", level=").append(level); |
|||
sb.append(", parentId=").append(parentId); |
|||
sb.append(", operator=").append(operator); |
|||
sb.append(", createdAt=").append(createdAt); |
|||
sb.append(", updatedAt=").append(updatedAt); |
|||
sb.append(", recStatus=").append(recStatus); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
package com.ccsens.carbasics.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
public class Organization implements Serializable { |
|||
private Long id; |
|||
|
|||
private Byte organizationType; |
|||
|
|||
private String code; |
|||
|
|||
private String name; |
|||
|
|||
private String shortName; |
|||
|
|||
private String introduce; |
|||
|
|||
private Byte level; |
|||
|
|||
private Long operator; |
|||
|
|||
private Date createdAt; |
|||
|
|||
private Date updatedAt; |
|||
|
|||
private Byte recStatus; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
public Long getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(Long id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public Byte getOrganizationType() { |
|||
return organizationType; |
|||
} |
|||
|
|||
public void setOrganizationType(Byte organizationType) { |
|||
this.organizationType = organizationType; |
|||
} |
|||
|
|||
public String getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public void setCode(String code) { |
|||
this.code = code == null ? null : code.trim(); |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name == null ? null : name.trim(); |
|||
} |
|||
|
|||
public String getShortName() { |
|||
return shortName; |
|||
} |
|||
|
|||
public void setShortName(String shortName) { |
|||
this.shortName = shortName == null ? null : shortName.trim(); |
|||
} |
|||
|
|||
public String getIntroduce() { |
|||
return introduce; |
|||
} |
|||
|
|||
public void setIntroduce(String introduce) { |
|||
this.introduce = introduce == null ? null : introduce.trim(); |
|||
} |
|||
|
|||
public Byte getLevel() { |
|||
return level; |
|||
} |
|||
|
|||
public void setLevel(Byte level) { |
|||
this.level = level; |
|||
} |
|||
|
|||
public Long getOperator() { |
|||
return operator; |
|||
} |
|||
|
|||
public void setOperator(Long operator) { |
|||
this.operator = operator; |
|||
} |
|||
|
|||
public Date getCreatedAt() { |
|||
return createdAt; |
|||
} |
|||
|
|||
public void setCreatedAt(Date createdAt) { |
|||
this.createdAt = createdAt; |
|||
} |
|||
|
|||
public Date getUpdatedAt() { |
|||
return updatedAt; |
|||
} |
|||
|
|||
public void setUpdatedAt(Date updatedAt) { |
|||
this.updatedAt = updatedAt; |
|||
} |
|||
|
|||
public Byte getRecStatus() { |
|||
return recStatus; |
|||
} |
|||
|
|||
public void setRecStatus(Byte recStatus) { |
|||
this.recStatus = recStatus; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
StringBuilder sb = new StringBuilder(); |
|||
sb.append(getClass().getSimpleName()); |
|||
sb.append(" ["); |
|||
sb.append("Hash = ").append(hashCode()); |
|||
sb.append(", id=").append(id); |
|||
sb.append(", organizationType=").append(organizationType); |
|||
sb.append(", code=").append(code); |
|||
sb.append(", name=").append(name); |
|||
sb.append(", shortName=").append(shortName); |
|||
sb.append(", introduce=").append(introduce); |
|||
sb.append(", level=").append(level); |
|||
sb.append(", operator=").append(operator); |
|||
sb.append(", createdAt=").append(createdAt); |
|||
sb.append(", updatedAt=").append(updatedAt); |
|||
sb.append(", recStatus=").append(recStatus); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -1,30 +1,30 @@ |
|||
package com.ccsens.carbasics.persist.mapper; |
|||
|
|||
import com.ccsens.carbasics.bean.po.Organization; |
|||
import com.ccsens.carbasics.bean.po.OrganizationExample; |
|||
import java.util.List; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
public interface OrganizationMapper { |
|||
long countByExample(OrganizationExample example); |
|||
|
|||
int deleteByExample(OrganizationExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(Organization record); |
|||
|
|||
int insertSelective(Organization record); |
|||
|
|||
List<Organization> selectByExample(OrganizationExample example); |
|||
|
|||
Organization selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") Organization record, @Param("example") OrganizationExample example); |
|||
|
|||
int updateByExample(@Param("record") Organization record, @Param("example") OrganizationExample example); |
|||
|
|||
int updateByPrimaryKeySelective(Organization record); |
|||
|
|||
int updateByPrimaryKey(Organization record); |
|||
package com.ccsens.carbasics.persist.mapper; |
|||
|
|||
import com.ccsens.carbasics.bean.po.Organization; |
|||
import com.ccsens.carbasics.bean.po.OrganizationExample; |
|||
import java.util.List; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
public interface OrganizationMapper { |
|||
long countByExample(OrganizationExample example); |
|||
|
|||
int deleteByExample(OrganizationExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(Organization record); |
|||
|
|||
int insertSelective(Organization record); |
|||
|
|||
List<Organization> selectByExample(OrganizationExample example); |
|||
|
|||
Organization selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") Organization record, @Param("example") OrganizationExample example); |
|||
|
|||
int updateByExample(@Param("record") Organization record, @Param("example") OrganizationExample example); |
|||
|
|||
int updateByPrimaryKeySelective(Organization record); |
|||
|
|||
int updateByPrimaryKey(Organization record); |
|||
} |
@ -1,323 +1,306 @@ |
|||
<?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.ccsens.carbasics.persist.mapper.OrganizationMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.carbasics.bean.po.Organization"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="organization_type" jdbcType="TINYINT" property="organizationType" /> |
|||
<result column="code" jdbcType="VARCHAR" property="code" /> |
|||
<result column="name" jdbcType="VARCHAR" property="name" /> |
|||
<result column="short_name" jdbcType="VARCHAR" property="shortName" /> |
|||
<result column="introduce" jdbcType="VARCHAR" property="introduce" /> |
|||
<result column="level" jdbcType="TINYINT" property="level" /> |
|||
<result column="parent_id" jdbcType="BIGINT" property="parentId" /> |
|||
<result column="operator" jdbcType="BIGINT" property="operator" /> |
|||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|||
</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"> |
|||
id, organization_type, code, name, short_name, introduce, level, parent_id, operator, |
|||
created_at, updated_at, rec_status |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.carbasics.bean.po.OrganizationExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_organization |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_organization |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_organization |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.carbasics.bean.po.OrganizationExample"> |
|||
delete from t_organization |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.carbasics.bean.po.Organization"> |
|||
insert into t_organization (id, organization_type, code, |
|||
name, short_name, introduce, |
|||
level, parent_id, operator, |
|||
created_at, updated_at, rec_status |
|||
) |
|||
values (#{id,jdbcType=BIGINT}, #{organizationType,jdbcType=TINYINT}, #{code,jdbcType=VARCHAR}, |
|||
#{name,jdbcType=VARCHAR}, #{shortName,jdbcType=VARCHAR}, #{introduce,jdbcType=VARCHAR}, |
|||
#{level,jdbcType=TINYINT}, #{parentId,jdbcType=BIGINT}, #{operator,jdbcType=BIGINT}, |
|||
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} |
|||
) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="com.ccsens.carbasics.bean.po.Organization"> |
|||
insert into t_organization |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="organizationType != null"> |
|||
organization_type, |
|||
</if> |
|||
<if test="code != null"> |
|||
code, |
|||
</if> |
|||
<if test="name != null"> |
|||
name, |
|||
</if> |
|||
<if test="shortName != null"> |
|||
short_name, |
|||
</if> |
|||
<if test="introduce != null"> |
|||
introduce, |
|||
</if> |
|||
<if test="level != null"> |
|||
level, |
|||
</if> |
|||
<if test="parentId != null"> |
|||
parent_id, |
|||
</if> |
|||
<if test="operator != null"> |
|||
operator, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="organizationType != null"> |
|||
#{organizationType,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="code != null"> |
|||
#{code,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="name != null"> |
|||
#{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="shortName != null"> |
|||
#{shortName,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="introduce != null"> |
|||
#{introduce,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="level != null"> |
|||
#{level,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="parentId != null"> |
|||
#{parentId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="operator != null"> |
|||
#{operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
#{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
#{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
#{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.carbasics.bean.po.OrganizationExample" resultType="java.lang.Long"> |
|||
select count(*) from t_organization |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_organization |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.organizationType != null"> |
|||
organization_type = #{record.organizationType,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.code != null"> |
|||
code = #{record.code,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.name != null"> |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.shortName != null"> |
|||
short_name = #{record.shortName,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.introduce != null"> |
|||
introduce = #{record.introduce,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.level != null"> |
|||
level = #{record.level,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.parentId != null"> |
|||
parent_id = #{record.parentId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.operator != null"> |
|||
operator = #{record.operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.createdAt != null"> |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updatedAt != null"> |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.recStatus != null"> |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
update t_organization |
|||
set id = #{record.id,jdbcType=BIGINT}, |
|||
organization_type = #{record.organizationType,jdbcType=TINYINT}, |
|||
code = #{record.code,jdbcType=VARCHAR}, |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
short_name = #{record.shortName,jdbcType=VARCHAR}, |
|||
introduce = #{record.introduce,jdbcType=VARCHAR}, |
|||
level = #{record.level,jdbcType=TINYINT}, |
|||
parent_id = #{record.parentId,jdbcType=BIGINT}, |
|||
operator = #{record.operator,jdbcType=BIGINT}, |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.carbasics.bean.po.Organization"> |
|||
update t_organization |
|||
<set> |
|||
<if test="organizationType != null"> |
|||
organization_type = #{organizationType,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="code != null"> |
|||
code = #{code,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="name != null"> |
|||
name = #{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="shortName != null"> |
|||
short_name = #{shortName,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="introduce != null"> |
|||
introduce = #{introduce,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="level != null"> |
|||
level = #{level,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="parentId != null"> |
|||
parent_id = #{parentId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="operator != null"> |
|||
operator = #{operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.carbasics.bean.po.Organization"> |
|||
update t_organization |
|||
set organization_type = #{organizationType,jdbcType=TINYINT}, |
|||
code = #{code,jdbcType=VARCHAR}, |
|||
name = #{name,jdbcType=VARCHAR}, |
|||
short_name = #{shortName,jdbcType=VARCHAR}, |
|||
introduce = #{introduce,jdbcType=VARCHAR}, |
|||
level = #{level,jdbcType=TINYINT}, |
|||
parent_id = #{parentId,jdbcType=BIGINT}, |
|||
operator = #{operator,jdbcType=BIGINT}, |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{recStatus,jdbcType=TINYINT} |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<?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.ccsens.carbasics.persist.mapper.OrganizationMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.carbasics.bean.po.Organization"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="organization_type" jdbcType="TINYINT" property="organizationType" /> |
|||
<result column="code" jdbcType="VARCHAR" property="code" /> |
|||
<result column="name" jdbcType="VARCHAR" property="name" /> |
|||
<result column="short_name" jdbcType="VARCHAR" property="shortName" /> |
|||
<result column="introduce" jdbcType="VARCHAR" property="introduce" /> |
|||
<result column="level" jdbcType="TINYINT" property="level" /> |
|||
<result column="operator" jdbcType="BIGINT" property="operator" /> |
|||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|||
</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"> |
|||
id, organization_type, code, name, short_name, introduce, level, operator, created_at, |
|||
updated_at, rec_status |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.carbasics.bean.po.OrganizationExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_organization |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_organization |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_organization |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.carbasics.bean.po.OrganizationExample"> |
|||
delete from t_organization |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.carbasics.bean.po.Organization"> |
|||
insert into t_organization (id, organization_type, code, |
|||
name, short_name, introduce, |
|||
level, operator, created_at, |
|||
updated_at, rec_status) |
|||
values (#{id,jdbcType=BIGINT}, #{organizationType,jdbcType=TINYINT}, #{code,jdbcType=VARCHAR}, |
|||
#{name,jdbcType=VARCHAR}, #{shortName,jdbcType=VARCHAR}, #{introduce,jdbcType=VARCHAR}, |
|||
#{level,jdbcType=TINYINT}, #{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, |
|||
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="com.ccsens.carbasics.bean.po.Organization"> |
|||
insert into t_organization |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="organizationType != null"> |
|||
organization_type, |
|||
</if> |
|||
<if test="code != null"> |
|||
code, |
|||
</if> |
|||
<if test="name != null"> |
|||
name, |
|||
</if> |
|||
<if test="shortName != null"> |
|||
short_name, |
|||
</if> |
|||
<if test="introduce != null"> |
|||
introduce, |
|||
</if> |
|||
<if test="level != null"> |
|||
level, |
|||
</if> |
|||
<if test="operator != null"> |
|||
operator, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="organizationType != null"> |
|||
#{organizationType,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="code != null"> |
|||
#{code,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="name != null"> |
|||
#{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="shortName != null"> |
|||
#{shortName,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="introduce != null"> |
|||
#{introduce,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="level != null"> |
|||
#{level,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="operator != null"> |
|||
#{operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
#{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
#{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
#{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.carbasics.bean.po.OrganizationExample" resultType="java.lang.Long"> |
|||
select count(*) from t_organization |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_organization |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.organizationType != null"> |
|||
organization_type = #{record.organizationType,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.code != null"> |
|||
code = #{record.code,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.name != null"> |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.shortName != null"> |
|||
short_name = #{record.shortName,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.introduce != null"> |
|||
introduce = #{record.introduce,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.level != null"> |
|||
level = #{record.level,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="record.operator != null"> |
|||
operator = #{record.operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.createdAt != null"> |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.updatedAt != null"> |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="record.recStatus != null"> |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
update t_organization |
|||
set id = #{record.id,jdbcType=BIGINT}, |
|||
organization_type = #{record.organizationType,jdbcType=TINYINT}, |
|||
code = #{record.code,jdbcType=VARCHAR}, |
|||
name = #{record.name,jdbcType=VARCHAR}, |
|||
short_name = #{record.shortName,jdbcType=VARCHAR}, |
|||
introduce = #{record.introduce,jdbcType=VARCHAR}, |
|||
level = #{record.level,jdbcType=TINYINT}, |
|||
operator = #{record.operator,jdbcType=BIGINT}, |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.carbasics.bean.po.Organization"> |
|||
update t_organization |
|||
<set> |
|||
<if test="organizationType != null"> |
|||
organization_type = #{organizationType,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="code != null"> |
|||
code = #{code,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="name != null"> |
|||
name = #{name,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="shortName != null"> |
|||
short_name = #{shortName,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="introduce != null"> |
|||
introduce = #{introduce,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="level != null"> |
|||
level = #{level,jdbcType=TINYINT}, |
|||
</if> |
|||
<if test="operator != null"> |
|||
operator = #{operator,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.carbasics.bean.po.Organization"> |
|||
update t_organization |
|||
set organization_type = #{organizationType,jdbcType=TINYINT}, |
|||
code = #{code,jdbcType=VARCHAR}, |
|||
name = #{name,jdbcType=VARCHAR}, |
|||
short_name = #{shortName,jdbcType=VARCHAR}, |
|||
introduce = #{introduce,jdbcType=VARCHAR}, |
|||
level = #{level,jdbcType=TINYINT}, |
|||
operator = #{operator,jdbcType=BIGINT}, |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{recStatus,jdbcType=TINYINT} |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
</mapper> |
Loading…
Reference in new issue