Commit 99887760 by zhengxj

finish 订单相关的mapper,实体类 on 20190123 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@16945 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent e35bb8d8
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.8.0_171"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
...@@ -22,5 +22,10 @@ ...@@ -22,5 +22,10 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/> <classpathentry kind="output" path="target/classes"/>
</classpath> </classpath>
package com.glsx.ordercenter.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.glsx.ordercenter.pojo.SysOrder;
import com.glsx.ordercenter.pojo.SysOrderExample;
public interface SysOrderMapper {
long countByExample(SysOrderExample example);
int deleteByPrimaryKey(@Param("id") Integer id, @Param("orderSn") String orderSn);
int insert(SysOrder record);
int insertSelective(SysOrder record);
List<SysOrder> selectByExample(SysOrderExample example);
SysOrder selectByPrimaryKey(@Param("id") Integer id, @Param("orderSn") String orderSn);
int updateByPrimaryKeySelective(SysOrder record);
int updateByPrimaryKey(SysOrder record);
}
\ No newline at end of file \ No newline at end of file
package com.glsx.ordercenter.mapper;
import java.util.List;
import com.glsx.ordercenter.pojo.SysOrderRepair;
import com.glsx.ordercenter.pojo.SysOrderRepairExample;
public interface SysOrderRepairMapper {
long countByExample(SysOrderRepairExample example);
int deleteByPrimaryKey(Integer id);
int insert(SysOrderRepair record);
int insertSelective(SysOrderRepair record);
List<SysOrderRepair> selectByExample(SysOrderRepairExample example);
SysOrderRepair selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(SysOrderRepair record);
int updateByPrimaryKey(SysOrderRepair record);
}
\ No newline at end of file \ No newline at end of file
package com.glsx.ordercenter.pojo;
import java.util.Date;
public class SysOrder {
private Integer id;
private String orderSn;
private Byte activeStatus;
private Byte canceled;
private Byte orderType;
private Integer shopId;
private String contact;
private Integer phoneNumber;
private String carBrand;
private String carType;
private String vinNo;
private String carColor;
private Date installDate;
private String serviceType;
private String carOwner;
private Integer carOwnerPhone;
private Date cancelTime;
private String activeStatusArray;
private Integer merchantId;
private Integer mechanicId;
private String repairReason;
private String remark;
private Date createTime;
private Date updateTime;
private String createBy;
private String updateBy;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getOrderSn() {
return orderSn;
}
public void setOrderSn(String orderSn) {
this.orderSn = orderSn == null ? null : orderSn.trim();
}
public Byte getActiveStatus() {
return activeStatus;
}
public void setActiveStatus(Byte activeStatus) {
this.activeStatus = activeStatus;
}
public Byte getCanceled() {
return canceled;
}
public void setCanceled(Byte canceled) {
this.canceled = canceled;
}
public Byte getOrderType() {
return orderType;
}
public void setOrderType(Byte orderType) {
this.orderType = orderType;
}
public Integer getShopId() {
return shopId;
}
public void setShopId(Integer shopId) {
this.shopId = shopId;
}
public String getContact() {
return contact;
}
public void setContact(String contact) {
this.contact = contact == null ? null : contact.trim();
}
public Integer getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(Integer phoneNumber) {
this.phoneNumber = phoneNumber;
}
public String getCarBrand() {
return carBrand;
}
public void setCarBrand(String carBrand) {
this.carBrand = carBrand == null ? null : carBrand.trim();
}
public String getCarType() {
return carType;
}
public void setCarType(String carType) {
this.carType = carType == null ? null : carType.trim();
}
public String getVinNo() {
return vinNo;
}
public void setVinNo(String vinNo) {
this.vinNo = vinNo == null ? null : vinNo.trim();
}
public String getCarColor() {
return carColor;
}
public void setCarColor(String carColor) {
this.carColor = carColor == null ? null : carColor.trim();
}
public Date getInstallDate() {
return installDate;
}
public void setInstallDate(Date installDate) {
this.installDate = installDate;
}
public String getServiceType() {
return serviceType;
}
public void setServiceType(String serviceType) {
this.serviceType = serviceType == null ? null : serviceType.trim();
}
public String getCarOwner() {
return carOwner;
}
public void setCarOwner(String carOwner) {
this.carOwner = carOwner == null ? null : carOwner.trim();
}
public Integer getCarOwnerPhone() {
return carOwnerPhone;
}
public void setCarOwnerPhone(Integer carOwnerPhone) {
this.carOwnerPhone = carOwnerPhone;
}
public Date getCancelTime() {
return cancelTime;
}
public void setCancelTime(Date cancelTime) {
this.cancelTime = cancelTime;
}
public String getActiveStatusArray() {
return activeStatusArray;
}
public void setActiveStatusArray(String activeStatusArray) {
this.activeStatusArray = activeStatusArray == null ? null : activeStatusArray.trim();
}
public Integer getMerchantId() {
return merchantId;
}
public void setMerchantId(Integer merchantId) {
this.merchantId = merchantId;
}
public Integer getMechanicId() {
return mechanicId;
}
public void setMechanicId(Integer mechanicId) {
this.mechanicId = mechanicId;
}
public String getRepairReason() {
return repairReason;
}
public void setRepairReason(String repairReason) {
this.repairReason = repairReason == null ? null : repairReason.trim();
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy == null ? null : createBy.trim();
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy == null ? null : updateBy.trim();
}
}
\ No newline at end of file \ No newline at end of file
package com.glsx.ordercenter.pojo;
public class SysOrderRepair {
private Integer id;
private Integer orderId;
private Integer subOrderId;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getOrderId() {
return orderId;
}
public void setOrderId(Integer orderId) {
this.orderId = orderId;
}
public Integer getSubOrderId() {
return subOrderId;
}
public void setSubOrderId(Integer subOrderId) {
this.subOrderId = subOrderId;
}
}
\ 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.manager.dao.SysOrderRepairMapper">
<resultMap id="BaseResultMap" type="com.glsx.manager.entity.SysOrderRepair">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="order_id" jdbcType="INTEGER" property="orderId" />
<result column="sub_order_id" jdbcType="INTEGER" property="subOrderId" />
</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">
id, order_id, sub_order_id
</sql>
<select id="selectByExample" parameterType="com.glsx.manager.entity.SysOrderRepairExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'false' as QUERYID,
<include refid="Base_Column_List" />
from sys_order_repair
<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_repair
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from sys_order_repair
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.glsx.manager.entity.SysOrderRepair">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into sys_order_repair (order_id, sub_order_id)
values (#{orderId,jdbcType=INTEGER}, #{subOrderId,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.glsx.manager.entity.SysOrderRepair">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into sys_order_repair
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orderId != null">
order_id,
</if>
<if test="subOrderId != null">
sub_order_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderId != null">
#{orderId,jdbcType=INTEGER},
</if>
<if test="subOrderId != null">
#{subOrderId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.glsx.manager.entity.SysOrderRepairExample" resultType="java.lang.Long">
select count(*) from sys_order_repair
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByPrimaryKeySelective" parameterType="com.glsx.manager.entity.SysOrderRepair">
update sys_order_repair
<set>
<if test="orderId != null">
order_id = #{orderId,jdbcType=INTEGER},
</if>
<if test="subOrderId != null">
sub_order_id = #{subOrderId,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.glsx.manager.entity.SysOrderRepair">
update sys_order_repair
set order_id = #{orderId,jdbcType=INTEGER},
sub_order_id = #{subOrderId,jdbcType=INTEGER}
where id = #{id,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!