mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-13 03:39:55 +08:00
订单分账记录表, 添加运营商id, 站点id 字段
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
package com.jsowell.pile.domain;
|
package com.jsowell.pile.domain;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -7,9 +9,6 @@ import lombok.NoArgsConstructor;
|
|||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单分账记录表
|
* 订单分账记录表
|
||||||
*/
|
*/
|
||||||
@@ -30,6 +29,16 @@ public class OrderSplitRecord {
|
|||||||
*/
|
*/
|
||||||
private String orderCode;
|
private String orderCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单所属运营商id
|
||||||
|
*/
|
||||||
|
private String merchantId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单所属站点id
|
||||||
|
*/
|
||||||
|
private String stationId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分账状态
|
* 分账状态
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,26 +1,27 @@
|
|||||||
package com.jsowell.pile.mapper;
|
package com.jsowell.pile.mapper;
|
||||||
|
|
||||||
import com.jsowell.pile.domain.OrderSplitRecord;
|
import com.jsowell.pile.domain.OrderSplitRecord;
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
public interface OrderSplitRecordMapper {
|
public interface OrderSplitRecordMapper {
|
||||||
// int deleteByPrimaryKey(Integer id);
|
int deleteByPrimaryKey(Integer id);
|
||||||
|
|
||||||
// int insertSelective(OrderSplitRecord record);
|
int insertSelective(OrderSplitRecord record);
|
||||||
|
|
||||||
// OrderSplitRecord selectByPrimaryKey(Integer id);
|
OrderSplitRecord selectByPrimaryKey(Integer id);
|
||||||
|
|
||||||
// int updateByPrimaryKeySelective(OrderSplitRecord record);
|
int updateByPrimaryKeySelective(OrderSplitRecord record);
|
||||||
|
|
||||||
// int updateBatchSelective(List<OrderSplitRecord> list);
|
int updateBatchSelective(List<OrderSplitRecord> list);
|
||||||
|
|
||||||
int batchInsert(@Param("list") List<OrderSplitRecord> list);
|
int batchInsert(@Param("list") List<OrderSplitRecord> list);
|
||||||
|
|
||||||
// int insertOrUpdate(OrderSplitRecord record);
|
int insertOrUpdate(OrderSplitRecord record);
|
||||||
|
|
||||||
// int insertOrUpdateSelective(OrderSplitRecord record);
|
int insertOrUpdateSelective(OrderSplitRecord record);
|
||||||
|
|
||||||
List<OrderSplitRecord> selectByOrderCode(String orderCode);
|
List<OrderSplitRecord> selectByOrderCode(String orderCode);
|
||||||
}
|
}
|
||||||
@@ -80,6 +80,8 @@ public class OrderSplitRecordServiceImpl implements OrderSplitRecordService {
|
|||||||
orderSplitRecord.setSettleAmount(settleAmount);
|
orderSplitRecord.setSettleAmount(settleAmount);
|
||||||
orderSplitRecord.setTradeDate(DateUtils.getDate()); // 订单结算日期 yyyy-MM-dd
|
orderSplitRecord.setTradeDate(DateUtils.getDate()); // 订单结算日期 yyyy-MM-dd
|
||||||
if (orderInfoDetailVO != null) {
|
if (orderInfoDetailVO != null) {
|
||||||
|
orderSplitRecord.setMerchantId(orderInfoDetailVO.getMerchantId());
|
||||||
|
orderSplitRecord.setStationId(orderInfoDetailVO.getStationId());
|
||||||
orderSplitRecord.setElectricityAmount(orderInfoDetailVO.getTotalElectricityAmount());
|
orderSplitRecord.setElectricityAmount(orderInfoDetailVO.getTotalElectricityAmount());
|
||||||
orderSplitRecord.setServiceAmount(orderInfoDetailVO.getTotalServiceAmount());
|
orderSplitRecord.setServiceAmount(orderInfoDetailVO.getTotalServiceAmount());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
<!--@Table order_split_record-->
|
<!--@Table order_split_record-->
|
||||||
<id column="id" jdbcType="INTEGER" property="id" />
|
<id column="id" jdbcType="INTEGER" property="id" />
|
||||||
<result column="order_code" jdbcType="VARCHAR" property="orderCode" />
|
<result column="order_code" jdbcType="VARCHAR" property="orderCode" />
|
||||||
|
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
|
||||||
|
<result column="station_id" jdbcType="VARCHAR" property="stationId" />
|
||||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||||
<result column="settle_amount" jdbcType="DECIMAL" property="settleAmount" />
|
<result column="settle_amount" jdbcType="DECIMAL" property="settleAmount" />
|
||||||
<result column="electricity_amount" jdbcType="DECIMAL" property="electricityAmount" />
|
<result column="electricity_amount" jdbcType="DECIMAL" property="electricityAmount" />
|
||||||
@@ -27,10 +29,10 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
id, order_code, `status`, settle_amount, electricity_amount, service_amount, trade_date,
|
id, order_code, merchant_id, station_id, `status`, settle_amount, electricity_amount,
|
||||||
adapay_member_id, payment_id, payment_confirm_id, electricity_split_ratio, electricity_split_amount,
|
service_amount, trade_date, adapay_member_id, payment_id, payment_confirm_id, electricity_split_ratio,
|
||||||
service_split_ratio, service_split_amount, remark, create_by, create_time, update_by,
|
electricity_split_amount, service_split_ratio, service_split_amount, remark, create_by,
|
||||||
update_time, del_flag
|
create_time, update_by, update_time, 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-->
|
||||||
@@ -51,6 +53,12 @@
|
|||||||
<if test="orderCode != null">
|
<if test="orderCode != null">
|
||||||
order_code,
|
order_code,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="merchantId != null">
|
||||||
|
merchant_id,
|
||||||
|
</if>
|
||||||
|
<if test="stationId != null">
|
||||||
|
station_id,
|
||||||
|
</if>
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
`status`,
|
`status`,
|
||||||
</if>
|
</if>
|
||||||
@@ -110,6 +118,12 @@
|
|||||||
<if test="orderCode != null">
|
<if test="orderCode != null">
|
||||||
#{orderCode,jdbcType=VARCHAR},
|
#{orderCode,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="merchantId != null">
|
||||||
|
#{merchantId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="stationId != null">
|
||||||
|
#{stationId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
#{status,jdbcType=VARCHAR},
|
#{status,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
@@ -173,6 +187,12 @@
|
|||||||
<if test="orderCode != null">
|
<if test="orderCode != null">
|
||||||
order_code = #{orderCode,jdbcType=VARCHAR},
|
order_code = #{orderCode,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="merchantId != null">
|
||||||
|
merchant_id = #{merchantId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="stationId != null">
|
||||||
|
station_id = #{stationId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
`status` = #{status,jdbcType=VARCHAR},
|
`status` = #{status,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
@@ -241,6 +261,20 @@
|
|||||||
</if>
|
</if>
|
||||||
</foreach>
|
</foreach>
|
||||||
</trim>
|
</trim>
|
||||||
|
<trim prefix="merchant_id = case" suffix="end,">
|
||||||
|
<foreach collection="list" index="index" item="item">
|
||||||
|
<if test="item.merchantId != null">
|
||||||
|
when id = #{item.id,jdbcType=INTEGER} then #{item.merchantId,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="station_id = case" suffix="end,">
|
||||||
|
<foreach collection="list" index="index" item="item">
|
||||||
|
<if test="item.stationId != null">
|
||||||
|
when id = #{item.id,jdbcType=INTEGER} then #{item.stationId,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
<trim prefix="`status` = case" suffix="end,">
|
<trim prefix="`status` = case" suffix="end,">
|
||||||
<foreach collection="list" index="index" item="item">
|
<foreach collection="list" index="index" item="item">
|
||||||
<if test="item.status != null">
|
<if test="item.status != null">
|
||||||
@@ -376,20 +410,21 @@
|
|||||||
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
insert into order_split_record
|
insert into order_split_record
|
||||||
(order_code, `status`, settle_amount, electricity_amount, service_amount, trade_date,
|
(order_code, merchant_id, station_id, `status`, settle_amount, electricity_amount,
|
||||||
adapay_member_id, payment_id, payment_confirm_id, electricity_split_ratio, electricity_split_amount,
|
service_amount, trade_date, adapay_member_id, payment_id, payment_confirm_id, electricity_split_ratio,
|
||||||
service_split_ratio, service_split_amount, remark, create_by, create_time, update_by,
|
electricity_split_amount, service_split_ratio, service_split_amount, remark, create_by,
|
||||||
update_time, del_flag)
|
create_time, update_by, update_time, del_flag)
|
||||||
values
|
values
|
||||||
<foreach collection="list" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
(#{item.orderCode,jdbcType=VARCHAR}, #{item.status,jdbcType=VARCHAR}, #{item.settleAmount,jdbcType=DECIMAL},
|
(#{item.orderCode,jdbcType=VARCHAR}, #{item.merchantId,jdbcType=VARCHAR}, #{item.stationId,jdbcType=VARCHAR},
|
||||||
#{item.electricityAmount,jdbcType=DECIMAL}, #{item.serviceAmount,jdbcType=DECIMAL},
|
#{item.status,jdbcType=VARCHAR}, #{item.settleAmount,jdbcType=DECIMAL}, #{item.electricityAmount,jdbcType=DECIMAL},
|
||||||
#{item.tradeDate,jdbcType=VARCHAR}, #{item.adapayMemberId,jdbcType=VARCHAR}, #{item.paymentId,jdbcType=VARCHAR},
|
#{item.serviceAmount,jdbcType=DECIMAL}, #{item.tradeDate,jdbcType=VARCHAR}, #{item.adapayMemberId,jdbcType=VARCHAR},
|
||||||
#{item.paymentConfirmId,jdbcType=VARCHAR}, #{item.electricitySplitRatio,jdbcType=DECIMAL},
|
#{item.paymentId,jdbcType=VARCHAR}, #{item.paymentConfirmId,jdbcType=VARCHAR},
|
||||||
#{item.electricitySplitAmount,jdbcType=DECIMAL}, #{item.serviceSplitRatio,jdbcType=DECIMAL},
|
#{item.electricitySplitRatio,jdbcType=DECIMAL}, #{item.electricitySplitAmount,jdbcType=DECIMAL},
|
||||||
#{item.serviceSplitAmount,jdbcType=DECIMAL}, #{item.remark,jdbcType=VARCHAR}, #{item.createBy,jdbcType=VARCHAR},
|
#{item.serviceSplitRatio,jdbcType=DECIMAL}, #{item.serviceSplitAmount,jdbcType=DECIMAL},
|
||||||
#{item.createTime,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
|
#{item.remark,jdbcType=VARCHAR}, #{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
|
||||||
#{item.delFlag,jdbcType=VARCHAR})
|
#{item.updateBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.delFlag,jdbcType=VARCHAR}
|
||||||
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.OrderSplitRecord" useGeneratedKeys="true">
|
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.OrderSplitRecord" useGeneratedKeys="true">
|
||||||
@@ -400,6 +435,8 @@
|
|||||||
id,
|
id,
|
||||||
</if>
|
</if>
|
||||||
order_code,
|
order_code,
|
||||||
|
merchant_id,
|
||||||
|
station_id,
|
||||||
`status`,
|
`status`,
|
||||||
settle_amount,
|
settle_amount,
|
||||||
electricity_amount,
|
electricity_amount,
|
||||||
@@ -425,6 +462,8 @@
|
|||||||
#{id,jdbcType=INTEGER},
|
#{id,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
#{orderCode,jdbcType=VARCHAR},
|
#{orderCode,jdbcType=VARCHAR},
|
||||||
|
#{merchantId,jdbcType=VARCHAR},
|
||||||
|
#{stationId,jdbcType=VARCHAR},
|
||||||
#{status,jdbcType=VARCHAR},
|
#{status,jdbcType=VARCHAR},
|
||||||
#{settleAmount,jdbcType=DECIMAL},
|
#{settleAmount,jdbcType=DECIMAL},
|
||||||
#{electricityAmount,jdbcType=DECIMAL},
|
#{electricityAmount,jdbcType=DECIMAL},
|
||||||
@@ -450,6 +489,8 @@
|
|||||||
id = #{id,jdbcType=INTEGER},
|
id = #{id,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
order_code = #{orderCode,jdbcType=VARCHAR},
|
order_code = #{orderCode,jdbcType=VARCHAR},
|
||||||
|
merchant_id = #{merchantId,jdbcType=VARCHAR},
|
||||||
|
station_id = #{stationId,jdbcType=VARCHAR},
|
||||||
`status` = #{status,jdbcType=VARCHAR},
|
`status` = #{status,jdbcType=VARCHAR},
|
||||||
settle_amount = #{settleAmount,jdbcType=DECIMAL},
|
settle_amount = #{settleAmount,jdbcType=DECIMAL},
|
||||||
electricity_amount = #{electricityAmount,jdbcType=DECIMAL},
|
electricity_amount = #{electricityAmount,jdbcType=DECIMAL},
|
||||||
@@ -480,6 +521,12 @@
|
|||||||
<if test="orderCode != null">
|
<if test="orderCode != null">
|
||||||
order_code,
|
order_code,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="merchantId != null">
|
||||||
|
merchant_id,
|
||||||
|
</if>
|
||||||
|
<if test="stationId != null">
|
||||||
|
station_id,
|
||||||
|
</if>
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
`status`,
|
`status`,
|
||||||
</if>
|
</if>
|
||||||
@@ -543,6 +590,12 @@
|
|||||||
<if test="orderCode != null">
|
<if test="orderCode != null">
|
||||||
#{orderCode,jdbcType=VARCHAR},
|
#{orderCode,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="merchantId != null">
|
||||||
|
#{merchantId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="stationId != null">
|
||||||
|
#{stationId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
#{status,jdbcType=VARCHAR},
|
#{status,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
@@ -606,6 +659,12 @@
|
|||||||
<if test="orderCode != null">
|
<if test="orderCode != null">
|
||||||
order_code = #{orderCode,jdbcType=VARCHAR},
|
order_code = #{orderCode,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="merchantId != null">
|
||||||
|
merchant_id = #{merchantId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="stationId != null">
|
||||||
|
station_id = #{stationId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
<if test="status != null">
|
<if test="status != null">
|
||||||
`status` = #{status,jdbcType=VARCHAR},
|
`status` = #{status,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
Reference in New Issue
Block a user