mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-19 06:39:50 +08:00
update 生成占桩订单
This commit is contained in:
@@ -24,7 +24,7 @@ public class OrderPileOccupy {
|
|||||||
private String occupyCode;
|
private String occupyCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态(0-占桩中;1-待支付;2-无需支付;3;订单完成)
|
* 状态(0-占桩中;1-订单完成)
|
||||||
*/
|
*/
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
@@ -53,6 +53,11 @@ public class OrderPileOccupy {
|
|||||||
*/
|
*/
|
||||||
private Date endTime;
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付状态(0-未支付;1-支付完成;2-无需支付)
|
||||||
|
*/
|
||||||
|
private String payStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 充电桩编号
|
* 充电桩编号
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -109,7 +109,8 @@ public class OrderPileOccupyServiceImpl implements OrderPileOccupyService{
|
|||||||
String occupyCode = "OP" + IdUtils.getOrderCode();
|
String occupyCode = "OP" + IdUtils.getOrderCode();
|
||||||
orderPileOccupy.setOccupyCode(occupyCode);
|
orderPileOccupy.setOccupyCode(occupyCode);
|
||||||
orderPileOccupy.setMemberId(memberId);
|
orderPileOccupy.setMemberId(memberId);
|
||||||
orderPileOccupy.setStatus(Constants.ZERO);
|
orderPileOccupy.setStatus(Constants.ZERO); // 占桩中
|
||||||
|
orderPileOccupy.setPayStatus(Constants.ZERO); // 未支付
|
||||||
orderPileOccupy.setPileSn(pileSn);
|
orderPileOccupy.setPileSn(pileSn);
|
||||||
orderPileOccupy.setConnectorCode(connectorCode);
|
orderPileOccupy.setConnectorCode(connectorCode);
|
||||||
orderPileOccupy.setPileConnectorCode(pileSn + connectorCode);
|
orderPileOccupy.setPileConnectorCode(pileSn + connectorCode);
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
<result column="transaction_code" jdbcType="VARCHAR" property="transactionCode" />
|
<result column="transaction_code" jdbcType="VARCHAR" property="transactionCode" />
|
||||||
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
||||||
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
||||||
|
<result column="pay_status" jdbcType="VARCHAR" property="payStatus" />
|
||||||
<result column="pile_sn" jdbcType="VARCHAR" property="pileSn" />
|
<result column="pile_sn" jdbcType="VARCHAR" property="pileSn" />
|
||||||
<result column="connector_code" jdbcType="VARCHAR" property="connectorCode" />
|
<result column="connector_code" jdbcType="VARCHAR" property="connectorCode" />
|
||||||
<result column="pile_connector_code" jdbcType="VARCHAR" property="pileConnectorCode" />
|
<result column="pile_connector_code" jdbcType="VARCHAR" property="pileConnectorCode" />
|
||||||
@@ -24,8 +25,8 @@
|
|||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
id, occupy_code, `status`, member_id, order_code, transaction_code, start_time, end_time,
|
id, occupy_code, `status`, member_id, order_code, transaction_code, start_time, end_time,
|
||||||
pile_sn, connector_code, pile_connector_code, create_time, create_by, update_time,
|
pay_status, pile_sn, connector_code, pile_connector_code, create_time, create_by,
|
||||||
update_by, del_flag
|
update_time, update_by, del_flag
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
@@ -43,16 +44,16 @@
|
|||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
insert into order_pile_occupy (occupy_code, `status`, member_id,
|
insert into order_pile_occupy (occupy_code, `status`, member_id,
|
||||||
order_code, transaction_code, start_time,
|
order_code, transaction_code, start_time,
|
||||||
end_time, pile_sn, connector_code,
|
end_time, pay_status, pile_sn,
|
||||||
pile_connector_code, create_time, create_by,
|
connector_code, pile_connector_code, create_time,
|
||||||
update_time, update_by, del_flag
|
create_by, update_time, update_by,
|
||||||
)
|
del_flag)
|
||||||
values (#{occupyCode,jdbcType=VARCHAR}, #{status,jdbcType=CHAR}, #{memberId,jdbcType=VARCHAR},
|
values (#{occupyCode,jdbcType=VARCHAR}, #{status,jdbcType=CHAR}, #{memberId,jdbcType=VARCHAR},
|
||||||
#{orderCode,jdbcType=VARCHAR}, #{transactionCode,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP},
|
#{orderCode,jdbcType=VARCHAR}, #{transactionCode,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP},
|
||||||
#{endTime,jdbcType=TIMESTAMP}, #{pileSn,jdbcType=VARCHAR}, #{connectorCode,jdbcType=VARCHAR},
|
#{endTime,jdbcType=TIMESTAMP}, #{payStatus,jdbcType=VARCHAR}, #{pileSn,jdbcType=VARCHAR},
|
||||||
#{pileConnectorCode,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR},
|
#{connectorCode,jdbcType=VARCHAR}, #{pileConnectorCode,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
||||||
#{updateTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{delFlag,jdbcType=CHAR}
|
#{createBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
|
||||||
)
|
#{delFlag,jdbcType=CHAR})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.OrderPileOccupy" useGeneratedKeys="true">
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.OrderPileOccupy" useGeneratedKeys="true">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
@@ -79,6 +80,9 @@
|
|||||||
<if test="endTime != null">
|
<if test="endTime != null">
|
||||||
end_time,
|
end_time,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="payStatus != null">
|
||||||
|
pay_status,
|
||||||
|
</if>
|
||||||
<if test="pileSn != null">
|
<if test="pileSn != null">
|
||||||
pile_sn,
|
pile_sn,
|
||||||
</if>
|
</if>
|
||||||
@@ -126,6 +130,9 @@
|
|||||||
<if test="endTime != null">
|
<if test="endTime != null">
|
||||||
#{endTime,jdbcType=TIMESTAMP},
|
#{endTime,jdbcType=TIMESTAMP},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="payStatus != null">
|
||||||
|
#{payStatus,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
<if test="pileSn != null">
|
<if test="pileSn != null">
|
||||||
#{pileSn,jdbcType=VARCHAR},
|
#{pileSn,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
@@ -177,6 +184,9 @@
|
|||||||
<if test="endTime != null">
|
<if test="endTime != null">
|
||||||
end_time = #{endTime,jdbcType=TIMESTAMP},
|
end_time = #{endTime,jdbcType=TIMESTAMP},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="payStatus != null">
|
||||||
|
pay_status = #{payStatus,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
<if test="pileSn != null">
|
<if test="pileSn != null">
|
||||||
pile_sn = #{pileSn,jdbcType=VARCHAR},
|
pile_sn = #{pileSn,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
@@ -214,6 +224,7 @@
|
|||||||
transaction_code = #{transactionCode,jdbcType=VARCHAR},
|
transaction_code = #{transactionCode,jdbcType=VARCHAR},
|
||||||
start_time = #{startTime,jdbcType=TIMESTAMP},
|
start_time = #{startTime,jdbcType=TIMESTAMP},
|
||||||
end_time = #{endTime,jdbcType=TIMESTAMP},
|
end_time = #{endTime,jdbcType=TIMESTAMP},
|
||||||
|
pay_status = #{payStatus,jdbcType=VARCHAR},
|
||||||
pile_sn = #{pileSn,jdbcType=VARCHAR},
|
pile_sn = #{pileSn,jdbcType=VARCHAR},
|
||||||
connector_code = #{connectorCode,jdbcType=VARCHAR},
|
connector_code = #{connectorCode,jdbcType=VARCHAR},
|
||||||
pile_connector_code = #{pileConnectorCode,jdbcType=VARCHAR},
|
pile_connector_code = #{pileConnectorCode,jdbcType=VARCHAR},
|
||||||
@@ -263,6 +274,11 @@
|
|||||||
when id = #{item.id,jdbcType=INTEGER} then #{item.endTime,jdbcType=TIMESTAMP}
|
when id = #{item.id,jdbcType=INTEGER} then #{item.endTime,jdbcType=TIMESTAMP}
|
||||||
</foreach>
|
</foreach>
|
||||||
</trim>
|
</trim>
|
||||||
|
<trim prefix="pay_status = case" suffix="end,">
|
||||||
|
<foreach collection="list" index="index" item="item">
|
||||||
|
when id = #{item.id,jdbcType=INTEGER} then #{item.payStatus,jdbcType=VARCHAR}
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
<trim prefix="pile_sn = case" suffix="end,">
|
<trim prefix="pile_sn = case" suffix="end,">
|
||||||
<foreach collection="list" index="index" item="item">
|
<foreach collection="list" index="index" item="item">
|
||||||
when id = #{item.id,jdbcType=INTEGER} then #{item.pileSn,jdbcType=VARCHAR}
|
when id = #{item.id,jdbcType=INTEGER} then #{item.pileSn,jdbcType=VARCHAR}
|
||||||
@@ -362,6 +378,13 @@
|
|||||||
</if>
|
</if>
|
||||||
</foreach>
|
</foreach>
|
||||||
</trim>
|
</trim>
|
||||||
|
<trim prefix="pay_status = case" suffix="end,">
|
||||||
|
<foreach collection="list" index="index" item="item">
|
||||||
|
<if test="item.payStatus != null">
|
||||||
|
when id = #{item.id,jdbcType=INTEGER} then #{item.payStatus,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
<trim prefix="pile_sn = case" suffix="end,">
|
<trim prefix="pile_sn = case" suffix="end,">
|
||||||
<foreach collection="list" index="index" item="item">
|
<foreach collection="list" index="index" item="item">
|
||||||
<if test="item.pileSn != null">
|
<if test="item.pileSn != null">
|
||||||
@@ -428,16 +451,16 @@
|
|||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
insert into order_pile_occupy
|
insert into order_pile_occupy
|
||||||
(occupy_code, `status`, member_id, order_code, transaction_code, start_time, end_time,
|
(occupy_code, `status`, member_id, order_code, transaction_code, start_time, end_time,
|
||||||
pile_sn, connector_code, pile_connector_code, create_time, create_by, update_time,
|
pay_status, pile_sn, connector_code, pile_connector_code, create_time, create_by,
|
||||||
update_by, del_flag)
|
update_time, update_by, del_flag)
|
||||||
values
|
values
|
||||||
<foreach collection="list" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
(#{item.occupyCode,jdbcType=VARCHAR}, #{item.status,jdbcType=CHAR}, #{item.memberId,jdbcType=VARCHAR},
|
(#{item.occupyCode,jdbcType=VARCHAR}, #{item.status,jdbcType=CHAR}, #{item.memberId,jdbcType=VARCHAR},
|
||||||
#{item.orderCode,jdbcType=VARCHAR}, #{item.transactionCode,jdbcType=VARCHAR}, #{item.startTime,jdbcType=TIMESTAMP},
|
#{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.endTime,jdbcType=TIMESTAMP}, #{item.payStatus,jdbcType=VARCHAR}, #{item.pileSn,jdbcType=VARCHAR},
|
||||||
#{item.pileConnectorCode,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
|
#{item.connectorCode,jdbcType=VARCHAR}, #{item.pileConnectorCode,jdbcType=VARCHAR},
|
||||||
#{item.createBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=VARCHAR},
|
#{item.createTime,jdbcType=TIMESTAMP}, #{item.createBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
|
||||||
#{item.delFlag,jdbcType=CHAR})
|
#{item.updateBy,jdbcType=VARCHAR}, #{item.delFlag,jdbcType=CHAR})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.OrderPileOccupy" useGeneratedKeys="true">
|
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.OrderPileOccupy" useGeneratedKeys="true">
|
||||||
@@ -454,6 +477,7 @@
|
|||||||
transaction_code,
|
transaction_code,
|
||||||
start_time,
|
start_time,
|
||||||
end_time,
|
end_time,
|
||||||
|
pay_status,
|
||||||
pile_sn,
|
pile_sn,
|
||||||
connector_code,
|
connector_code,
|
||||||
pile_connector_code,
|
pile_connector_code,
|
||||||
@@ -475,6 +499,7 @@
|
|||||||
#{transactionCode,jdbcType=VARCHAR},
|
#{transactionCode,jdbcType=VARCHAR},
|
||||||
#{startTime,jdbcType=TIMESTAMP},
|
#{startTime,jdbcType=TIMESTAMP},
|
||||||
#{endTime,jdbcType=TIMESTAMP},
|
#{endTime,jdbcType=TIMESTAMP},
|
||||||
|
#{payStatus,jdbcType=VARCHAR},
|
||||||
#{pileSn,jdbcType=VARCHAR},
|
#{pileSn,jdbcType=VARCHAR},
|
||||||
#{connectorCode,jdbcType=VARCHAR},
|
#{connectorCode,jdbcType=VARCHAR},
|
||||||
#{pileConnectorCode,jdbcType=VARCHAR},
|
#{pileConnectorCode,jdbcType=VARCHAR},
|
||||||
@@ -496,6 +521,7 @@
|
|||||||
transaction_code = #{transactionCode,jdbcType=VARCHAR},
|
transaction_code = #{transactionCode,jdbcType=VARCHAR},
|
||||||
start_time = #{startTime,jdbcType=TIMESTAMP},
|
start_time = #{startTime,jdbcType=TIMESTAMP},
|
||||||
end_time = #{endTime,jdbcType=TIMESTAMP},
|
end_time = #{endTime,jdbcType=TIMESTAMP},
|
||||||
|
pay_status = #{payStatus,jdbcType=VARCHAR},
|
||||||
pile_sn = #{pileSn,jdbcType=VARCHAR},
|
pile_sn = #{pileSn,jdbcType=VARCHAR},
|
||||||
connector_code = #{connectorCode,jdbcType=VARCHAR},
|
connector_code = #{connectorCode,jdbcType=VARCHAR},
|
||||||
pile_connector_code = #{pileConnectorCode,jdbcType=VARCHAR},
|
pile_connector_code = #{pileConnectorCode,jdbcType=VARCHAR},
|
||||||
@@ -534,6 +560,9 @@
|
|||||||
<if test="endTime != null">
|
<if test="endTime != null">
|
||||||
end_time,
|
end_time,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="payStatus != null">
|
||||||
|
pay_status,
|
||||||
|
</if>
|
||||||
<if test="pileSn != null">
|
<if test="pileSn != null">
|
||||||
pile_sn,
|
pile_sn,
|
||||||
</if>
|
</if>
|
||||||
@@ -585,6 +614,9 @@
|
|||||||
<if test="endTime != null">
|
<if test="endTime != null">
|
||||||
#{endTime,jdbcType=TIMESTAMP},
|
#{endTime,jdbcType=TIMESTAMP},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="payStatus != null">
|
||||||
|
#{payStatus,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
<if test="pileSn != null">
|
<if test="pileSn != null">
|
||||||
#{pileSn,jdbcType=VARCHAR},
|
#{pileSn,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
@@ -636,6 +668,9 @@
|
|||||||
<if test="endTime != null">
|
<if test="endTime != null">
|
||||||
end_time = #{endTime,jdbcType=TIMESTAMP},
|
end_time = #{endTime,jdbcType=TIMESTAMP},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="payStatus != null">
|
||||||
|
pay_status = #{payStatus,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
<if test="pileSn != null">
|
<if test="pileSn != null">
|
||||||
pile_sn = #{pileSn,jdbcType=VARCHAR},
|
pile_sn = #{pileSn,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
Reference in New Issue
Block a user