占桩订单表 实体类update

This commit is contained in:
2023-08-07 14:35:13 +08:00
parent 067f8a31e3
commit ea3cc04ecd
4 changed files with 217 additions and 88 deletions

View File

@@ -1,15 +1,12 @@
package com.jsowell.pile.domain;
import lombok.*;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* 占桩订单表
*/
* 占桩订单表
*/
@Getter
@Setter
@Builder
@@ -17,62 +14,77 @@ import lombok.Setter;
@NoArgsConstructor
public class OrderPileOccupy {
/**
* 主键
*/
* 主键
*/
private Integer id;
/**
* 状态0-占桩中1-待支付2-无需支付3订单完成
*/
* 状态0-占桩中1-待支付2-无需支付3订单完成
*/
private String status;
/**
* 订单号
*/
private String orderCode;
/**
* 交易流水号
*/
private String transactionCode;
/**
* 会员id
*/
* 会员id
*/
private String memberId;
/**
* 开始时间
*/
* 订单号
*/
private String orderCode;
/**
* 交易流水号
*/
private String transactionCode;
/**
* 占桩开始时间
*/
private Date startTime;
/**
* 结束时间
*/
* 占桩结束时间
*/
private Date endTime;
/**
* 创建时间
*/
* 充电桩编号
*/
private String pileSn;
/**
* 充电桩枪口号
*/
private String connectorCode;
/**
* 充电桩枪口编号
*/
private String pileConnectorCode;
/**
* 创建时间
*/
private Date createTime;
/**
* 创建人
*/
* 创建人
*/
private String createBy;
/**
* 修改时间
*/
* 修改时间
*/
private Date updateTime;
/**
* 修改人
*/
* 修改人
*/
private String updateBy;
/**
* 删除标识0-否1-是)
*/
* 删除标识0-否1-是)
*/
private String delFlag;
}

View File

@@ -1,12 +1,14 @@
package com.jsowell.pile.mapper;
import com.jsowell.pile.domain.OrderPileOccupy;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface OrderPileOccupyMapper {
/**
* delete by primary key
*
* @param id primaryKey
* @return deleteCount
*/
@@ -14,6 +16,7 @@ public interface OrderPileOccupyMapper {
/**
* insert record to table
*
* @param record the record
* @return insert count
*/
@@ -25,6 +28,7 @@ public interface OrderPileOccupyMapper {
/**
* insert record to table selective
*
* @param record the record
* @return insert count
*/
@@ -32,6 +36,7 @@ public interface OrderPileOccupyMapper {
/**
* select by primary key
*
* @param id primary key
* @return object by primary key
*/
@@ -39,6 +44,7 @@ public interface OrderPileOccupyMapper {
/**
* update record selective
*
* @param record the updated record
* @return update count
*/
@@ -46,6 +52,7 @@ public interface OrderPileOccupyMapper {
/**
* update record
*
* @param record the updated record
* @return update count
*/

View File

@@ -1,10 +1,9 @@
package com.jsowell.pile.service;
import java.util.List;
import com.jsowell.pile.domain.OrderPileOccupy;
import java.util.List;
public interface OrderPileOccupyService{
int deleteByPrimaryKey(Integer id);
int insert(OrderPileOccupy record);

View File

@@ -6,11 +6,14 @@
<!--@Table order_pile_occupy-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="status" jdbcType="CHAR" property="status" />
<result column="member_id" jdbcType="VARCHAR" property="memberId" />
<result column="order_code" jdbcType="VARCHAR" property="orderCode" />
<result column="transaction_code" jdbcType="VARCHAR" property="transactionCode" />
<result column="member_id" jdbcType="VARCHAR" property="memberId" />
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
<result column="pile_sn" jdbcType="VARCHAR" property="pileSn" />
<result column="connector_code" jdbcType="VARCHAR" property="connectorCode" />
<result column="pile_connector_code" jdbcType="VARCHAR" property="pileConnectorCode" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
@@ -19,8 +22,9 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, `status`, order_code, transaction_code, member_id, start_time, end_time, create_time,
create_by, update_time, update_by, del_flag
id, `status`, member_id, order_code, transaction_code, start_time, end_time, pile_sn,
connector_code, pile_connector_code, create_time, create_by, update_time, update_by,
del_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--@mbg.generated-->
@@ -36,12 +40,14 @@
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.OrderPileOccupy" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into order_pile_occupy (`status`, order_code, transaction_code,
member_id, start_time, end_time,
insert into order_pile_occupy (`status`, member_id, order_code,
transaction_code, start_time, end_time,
pile_sn, connector_code, pile_connector_code,
create_time, create_by, update_time,
update_by, del_flag)
values (#{status,jdbcType=CHAR}, #{orderCode,jdbcType=VARCHAR}, #{transactionCode,jdbcType=VARCHAR},
#{memberId,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
values (#{status,jdbcType=CHAR}, #{memberId,jdbcType=VARCHAR}, #{orderCode,jdbcType=VARCHAR},
#{transactionCode,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
#{pileSn,jdbcType=VARCHAR}, #{connectorCode,jdbcType=VARCHAR}, #{pileConnectorCode,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{updateBy,jdbcType=VARCHAR}, #{delFlag,jdbcType=CHAR})
</insert>
@@ -52,21 +58,30 @@
<if test="status != null">
`status`,
</if>
<if test="memberId != null">
member_id,
</if>
<if test="orderCode != null">
order_code,
</if>
<if test="transactionCode != null">
transaction_code,
</if>
<if test="memberId != null">
member_id,
</if>
<if test="startTime != null">
start_time,
</if>
<if test="endTime != null">
end_time,
</if>
<if test="pileSn != null">
pile_sn,
</if>
<if test="connectorCode != null">
connector_code,
</if>
<if test="pileConnectorCode != null">
pile_connector_code,
</if>
<if test="createTime != null">
create_time,
</if>
@@ -87,21 +102,30 @@
<if test="status != null">
#{status,jdbcType=CHAR},
</if>
<if test="memberId != null">
#{memberId,jdbcType=VARCHAR},
</if>
<if test="orderCode != null">
#{orderCode,jdbcType=VARCHAR},
</if>
<if test="transactionCode != null">
#{transactionCode,jdbcType=VARCHAR},
</if>
<if test="memberId != null">
#{memberId,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
#{startTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
#{endTime,jdbcType=TIMESTAMP},
</if>
<if test="pileSn != null">
#{pileSn,jdbcType=VARCHAR},
</if>
<if test="connectorCode != null">
#{connectorCode,jdbcType=VARCHAR},
</if>
<if test="pileConnectorCode != null">
#{pileConnectorCode,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
@@ -126,21 +150,30 @@
<if test="status != null">
`status` = #{status,jdbcType=CHAR},
</if>
<if test="memberId != null">
member_id = #{memberId,jdbcType=VARCHAR},
</if>
<if test="orderCode != null">
order_code = #{orderCode,jdbcType=VARCHAR},
</if>
<if test="transactionCode != null">
transaction_code = #{transactionCode,jdbcType=VARCHAR},
</if>
<if test="memberId != null">
member_id = #{memberId,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
start_time = #{startTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
end_time = #{endTime,jdbcType=TIMESTAMP},
</if>
<if test="pileSn != null">
pile_sn = #{pileSn,jdbcType=VARCHAR},
</if>
<if test="connectorCode != null">
connector_code = #{connectorCode,jdbcType=VARCHAR},
</if>
<if test="pileConnectorCode != null">
pile_connector_code = #{pileConnectorCode,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
@@ -163,11 +196,14 @@
<!--@mbg.generated-->
update order_pile_occupy
set `status` = #{status,jdbcType=CHAR},
member_id = #{memberId,jdbcType=VARCHAR},
order_code = #{orderCode,jdbcType=VARCHAR},
transaction_code = #{transactionCode,jdbcType=VARCHAR},
member_id = #{memberId,jdbcType=VARCHAR},
start_time = #{startTime,jdbcType=TIMESTAMP},
end_time = #{endTime,jdbcType=TIMESTAMP},
pile_sn = #{pileSn,jdbcType=VARCHAR},
connector_code = #{connectorCode,jdbcType=VARCHAR},
pile_connector_code = #{pileConnectorCode,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
create_by = #{createBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
@@ -184,6 +220,11 @@
when id = #{item.id,jdbcType=INTEGER} then #{item.status,jdbcType=CHAR}
</foreach>
</trim>
<trim prefix="member_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.memberId,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="order_code = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.orderCode,jdbcType=VARCHAR}
@@ -194,11 +235,6 @@
when id = #{item.id,jdbcType=INTEGER} then #{item.transactionCode,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="member_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.memberId,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="start_time = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.startTime,jdbcType=TIMESTAMP}
@@ -209,6 +245,21 @@
when id = #{item.id,jdbcType=INTEGER} then #{item.endTime,jdbcType=TIMESTAMP}
</foreach>
</trim>
<trim prefix="pile_sn = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.pileSn,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="connector_code = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.connectorCode,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="pile_connector_code = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.pileConnectorCode,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="create_time = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP}
@@ -251,6 +302,13 @@
</if>
</foreach>
</trim>
<trim prefix="member_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.memberId != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.memberId,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="order_code = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.orderCode != null">
@@ -265,13 +323,6 @@
</if>
</foreach>
</trim>
<trim prefix="member_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.memberId != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.memberId,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="start_time = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.startTime != null">
@@ -286,6 +337,27 @@
</if>
</foreach>
</trim>
<trim prefix="pile_sn = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.pileSn != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.pileSn,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="connector_code = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.connectorCode != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.connectorCode,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="pile_connector_code = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.pileConnectorCode != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.pileConnectorCode,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="create_time = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.createTime != null">
@@ -330,14 +402,17 @@
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into order_pile_occupy
(`status`, order_code, transaction_code, member_id, start_time, end_time, create_time,
create_by, update_time, update_by, del_flag)
(`status`, member_id, order_code, transaction_code, start_time, end_time, pile_sn,
connector_code, pile_connector_code, create_time, create_by, update_time, update_by,
del_flag)
values
<foreach collection="list" item="item" separator=",">
(#{item.status,jdbcType=CHAR}, #{item.orderCode,jdbcType=VARCHAR}, #{item.transactionCode,jdbcType=VARCHAR},
#{item.memberId,jdbcType=VARCHAR}, #{item.startTime,jdbcType=TIMESTAMP}, #{item.endTime,jdbcType=TIMESTAMP},
#{item.createTime,jdbcType=TIMESTAMP}, #{item.createBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
#{item.updateBy,jdbcType=VARCHAR}, #{item.delFlag,jdbcType=CHAR})
(#{item.status,jdbcType=CHAR}, #{item.memberId,jdbcType=VARCHAR}, #{item.orderCode,jdbcType=VARCHAR},
#{item.transactionCode,jdbcType=VARCHAR}, #{item.startTime,jdbcType=TIMESTAMP},
#{item.endTime,jdbcType=TIMESTAMP}, #{item.pileSn,jdbcType=VARCHAR}, #{item.connectorCode,jdbcType=VARCHAR},
#{item.pileConnectorCode,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
#{item.createBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=VARCHAR},
#{item.delFlag,jdbcType=CHAR})
</foreach>
</insert>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.OrderPileOccupy" useGeneratedKeys="true">
@@ -348,11 +423,14 @@
id,
</if>
`status`,
member_id,
order_code,
transaction_code,
member_id,
start_time,
end_time,
pile_sn,
connector_code,
pile_connector_code,
create_time,
create_by,
update_time,
@@ -365,11 +443,14 @@
#{id,jdbcType=INTEGER},
</if>
#{status,jdbcType=CHAR},
#{memberId,jdbcType=VARCHAR},
#{orderCode,jdbcType=VARCHAR},
#{transactionCode,jdbcType=VARCHAR},
#{memberId,jdbcType=VARCHAR},
#{startTime,jdbcType=TIMESTAMP},
#{endTime,jdbcType=TIMESTAMP},
#{pileSn,jdbcType=VARCHAR},
#{connectorCode,jdbcType=VARCHAR},
#{pileConnectorCode,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP},
#{createBy,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP},
@@ -382,11 +463,14 @@
id = #{id,jdbcType=INTEGER},
</if>
`status` = #{status,jdbcType=CHAR},
member_id = #{memberId,jdbcType=VARCHAR},
order_code = #{orderCode,jdbcType=VARCHAR},
transaction_code = #{transactionCode,jdbcType=VARCHAR},
member_id = #{memberId,jdbcType=VARCHAR},
start_time = #{startTime,jdbcType=TIMESTAMP},
end_time = #{endTime,jdbcType=TIMESTAMP},
pile_sn = #{pileSn,jdbcType=VARCHAR},
connector_code = #{connectorCode,jdbcType=VARCHAR},
pile_connector_code = #{pileConnectorCode,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
create_by = #{createBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
@@ -404,21 +488,30 @@
<if test="status != null">
`status`,
</if>
<if test="memberId != null">
member_id,
</if>
<if test="orderCode != null">
order_code,
</if>
<if test="transactionCode != null">
transaction_code,
</if>
<if test="memberId != null">
member_id,
</if>
<if test="startTime != null">
start_time,
</if>
<if test="endTime != null">
end_time,
</if>
<if test="pileSn != null">
pile_sn,
</if>
<if test="connectorCode != null">
connector_code,
</if>
<if test="pileConnectorCode != null">
pile_connector_code,
</if>
<if test="createTime != null">
create_time,
</if>
@@ -443,21 +536,30 @@
<if test="status != null">
#{status,jdbcType=CHAR},
</if>
<if test="memberId != null">
#{memberId,jdbcType=VARCHAR},
</if>
<if test="orderCode != null">
#{orderCode,jdbcType=VARCHAR},
</if>
<if test="transactionCode != null">
#{transactionCode,jdbcType=VARCHAR},
</if>
<if test="memberId != null">
#{memberId,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
#{startTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
#{endTime,jdbcType=TIMESTAMP},
</if>
<if test="pileSn != null">
#{pileSn,jdbcType=VARCHAR},
</if>
<if test="connectorCode != null">
#{connectorCode,jdbcType=VARCHAR},
</if>
<if test="pileConnectorCode != null">
#{pileConnectorCode,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
@@ -482,21 +584,30 @@
<if test="status != null">
`status` = #{status,jdbcType=CHAR},
</if>
<if test="memberId != null">
member_id = #{memberId,jdbcType=VARCHAR},
</if>
<if test="orderCode != null">
order_code = #{orderCode,jdbcType=VARCHAR},
</if>
<if test="transactionCode != null">
transaction_code = #{transactionCode,jdbcType=VARCHAR},
</if>
<if test="memberId != null">
member_id = #{memberId,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
start_time = #{startTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
end_time = #{endTime,jdbcType=TIMESTAMP},
</if>
<if test="pileSn != null">
pile_sn = #{pileSn,jdbcType=VARCHAR},
</if>
<if test="connectorCode != null">
connector_code = #{connectorCode,jdbcType=VARCHAR},
</if>
<if test="pileConnectorCode != null">
pile_connector_code = #{pileConnectorCode,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>