Commit dc115796 by zhengxj

finish 订单流转状态记录 on 20190216 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@17404 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 1a6f3bf0
package com.glsx.ordercenter.mapper;
import java.util.List;
import com.glsx.ordercenter.pojo.SysOrderStatus;
import com.glsx.ordercenter.pojo.SysOrderStatusExample;
public interface SysOrderStatusMapper {
long countByExample(SysOrderStatusExample example);
int deleteByPrimaryKey(Integer orderId);
int insert(SysOrderStatus record);
int insertSelective(SysOrderStatus record);
List<SysOrderStatus> selectByExample(SysOrderStatusExample example);
SysOrderStatus selectByPrimaryKey(Integer orderId);
int updateByPrimaryKeySelective(SysOrderStatus record);
int updateByPrimaryKey(SysOrderStatus record);
}
\ No newline at end of file \ No newline at end of file
package com.glsx.ordercenter.pojo;
public class SysOrderStatus {
private Integer orderId;
private String activeStatusArray;
public Integer getOrderId() {
return orderId;
}
public void setOrderId(Integer orderId) {
this.orderId = orderId;
}
public String getActiveStatusArray() {
return activeStatusArray;
}
public void setActiveStatusArray(String activeStatusArray) {
this.activeStatusArray = activeStatusArray == null ? null : activeStatusArray.trim();
}
}
\ No newline at end of file \ No newline at end of file
package com.glsx.ordercenter.pojo;
import java.util.ArrayList;
import java.util.List;
public class SysOrderStatusExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public SysOrderStatusExample() {
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;
}
protected abstract static class GeneratedCriteria {
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 andOrderIdIsNull() {
addCriterion("order_id is null");
return (Criteria) this;
}
public Criteria andOrderIdIsNotNull() {
addCriterion("order_id is not null");
return (Criteria) this;
}
public Criteria andOrderIdEqualTo(Integer value) {
addCriterion("order_id =", value, "orderId");
return (Criteria) this;
}
public Criteria andOrderIdNotEqualTo(Integer value) {
addCriterion("order_id <>", value, "orderId");
return (Criteria) this;
}
public Criteria andOrderIdGreaterThan(Integer value) {
addCriterion("order_id >", value, "orderId");
return (Criteria) this;
}
public Criteria andOrderIdGreaterThanOrEqualTo(Integer value) {
addCriterion("order_id >=", value, "orderId");
return (Criteria) this;
}
public Criteria andOrderIdLessThan(Integer value) {
addCriterion("order_id <", value, "orderId");
return (Criteria) this;
}
public Criteria andOrderIdLessThanOrEqualTo(Integer value) {
addCriterion("order_id <=", value, "orderId");
return (Criteria) this;
}
public Criteria andOrderIdIn(List<Integer> values) {
addCriterion("order_id in", values, "orderId");
return (Criteria) this;
}
public Criteria andOrderIdNotIn(List<Integer> values) {
addCriterion("order_id not in", values, "orderId");
return (Criteria) this;
}
public Criteria andOrderIdBetween(Integer value1, Integer value2) {
addCriterion("order_id between", value1, value2, "orderId");
return (Criteria) this;
}
public Criteria andOrderIdNotBetween(Integer value1, Integer value2) {
addCriterion("order_id not between", value1, value2, "orderId");
return (Criteria) this;
}
public Criteria andActiveStatusArrayIsNull() {
addCriterion("active_status_array is null");
return (Criteria) this;
}
public Criteria andActiveStatusArrayIsNotNull() {
addCriterion("active_status_array is not null");
return (Criteria) this;
}
public Criteria andActiveStatusArrayEqualTo(String value) {
addCriterion("active_status_array =", value, "activeStatusArray");
return (Criteria) this;
}
public Criteria andActiveStatusArrayNotEqualTo(String value) {
addCriterion("active_status_array <>", value, "activeStatusArray");
return (Criteria) this;
}
public Criteria andActiveStatusArrayGreaterThan(String value) {
addCriterion("active_status_array >", value, "activeStatusArray");
return (Criteria) this;
}
public Criteria andActiveStatusArrayGreaterThanOrEqualTo(String value) {
addCriterion("active_status_array >=", value, "activeStatusArray");
return (Criteria) this;
}
public Criteria andActiveStatusArrayLessThan(String value) {
addCriterion("active_status_array <", value, "activeStatusArray");
return (Criteria) this;
}
public Criteria andActiveStatusArrayLessThanOrEqualTo(String value) {
addCriterion("active_status_array <=", value, "activeStatusArray");
return (Criteria) this;
}
public Criteria andActiveStatusArrayLike(String value) {
addCriterion("active_status_array like", value, "activeStatusArray");
return (Criteria) this;
}
public Criteria andActiveStatusArrayNotLike(String value) {
addCriterion("active_status_array not like", value, "activeStatusArray");
return (Criteria) this;
}
public Criteria andActiveStatusArrayIn(List<String> values) {
addCriterion("active_status_array in", values, "activeStatusArray");
return (Criteria) this;
}
public Criteria andActiveStatusArrayNotIn(List<String> values) {
addCriterion("active_status_array not in", values, "activeStatusArray");
return (Criteria) this;
}
public Criteria andActiveStatusArrayBetween(String value1, String value2) {
addCriterion("active_status_array between", value1, value2, "activeStatusArray");
return (Criteria) this;
}
public Criteria andActiveStatusArrayNotBetween(String value1, String value2) {
addCriterion("active_status_array not between", value1, value2, "activeStatusArray");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
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);
}
}
}
\ No newline at end of file \ No newline at end of file
<?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.glsx.ordercenter.mapper.SysOrderStatusMapper">
<resultMap id="BaseResultMap" type="com.glsx.ordercenter.pojo.SysOrderStatus">
<id column="order_id" jdbcType="INTEGER" property="orderId" />
<result column="active_status_array" jdbcType="VARCHAR" property="activeStatusArray" />
</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="Base_Column_List">
order_id, active_status_array
</sql>
<select id="selectByExample" parameterType="com.glsx.ordercenter.pojo.SysOrderStatusExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'false' as QUERYID,
<include refid="Base_Column_List" />
from sys_order_status
<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.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sys_order_status
where order_id = #{orderId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from sys_order_status
where order_id = #{orderId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.glsx.ordercenter.pojo.SysOrderStatus">
insert into sys_order_status (order_id, active_status_array)
values (#{orderId,jdbcType=INTEGER}, #{activeStatusArray,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.glsx.ordercenter.pojo.SysOrderStatus">
insert into sys_order_status
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orderId != null">
order_id,
</if>
<if test="activeStatusArray != null">
active_status_array,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderId != null">
#{orderId,jdbcType=INTEGER},
</if>
<if test="activeStatusArray != null">
#{activeStatusArray,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.glsx.ordercenter.pojo.SysOrderStatusExample" resultType="java.lang.Long">
select count(*) from sys_order_status
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByPrimaryKeySelective" parameterType="com.glsx.ordercenter.pojo.SysOrderStatus">
update sys_order_status
<set>
<if test="activeStatusArray != null">
active_status_array = #{activeStatusArray,jdbcType=VARCHAR},
</if>
</set>
where order_id = #{orderId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.glsx.ordercenter.pojo.SysOrderStatus">
update sys_order_status
set active_status_array = #{activeStatusArray,jdbcType=VARCHAR}
where order_id = #{orderId,jdbcType=INTEGER}
</update>
<resultMap id="BaseResultMap" type="com.glsx.ordercenter.pojo.SysOrderStatus">
<id column="order_id" jdbcType="INTEGER" property="orderId" />
<result column="active_status_array" jdbcType="VARCHAR" property="activeStatusArray" />
</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="Base_Column_List">
order_id, active_status_array
</sql>
<select id="selectByExample" parameterType="com.glsx.ordercenter.pojo.SysOrderStatusExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'false' as QUERYID,
<include refid="Base_Column_List" />
from sys_order_status
<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.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sys_order_status
where order_id = #{orderId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from sys_order_status
where order_id = #{orderId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.glsx.ordercenter.pojo.SysOrderStatus">
insert into sys_order_status (order_id, active_status_array)
values (#{orderId,jdbcType=INTEGER}, #{activeStatusArray,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.glsx.ordercenter.pojo.SysOrderStatus">
insert into sys_order_status
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orderId != null">
order_id,
</if>
<if test="activeStatusArray != null">
active_status_array,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderId != null">
#{orderId,jdbcType=INTEGER},
</if>
<if test="activeStatusArray != null">
#{activeStatusArray,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.glsx.ordercenter.pojo.SysOrderStatusExample" resultType="java.lang.Long">
select count(*) from sys_order_status
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByPrimaryKeySelective" parameterType="com.glsx.ordercenter.pojo.SysOrderStatus">
update sys_order_status
<set>
<if test="activeStatusArray != null">
active_status_array = #{activeStatusArray,jdbcType=VARCHAR},
</if>
</set>
where order_id = #{orderId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.glsx.ordercenter.pojo.SysOrderStatus">
update sys_order_status
set active_status_array = #{activeStatusArray,jdbcType=VARCHAR}
where order_id = #{orderId,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!