mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
Merge branch 'dev' of http://192.168.2.2:8099/jsowell/jsowell-charger-web into dev
This commit is contained in:
@@ -35,6 +35,11 @@ public class OrderPayRecord {
|
||||
*/
|
||||
private BigDecimal payAmount;
|
||||
|
||||
/**
|
||||
* 支付id
|
||||
*/
|
||||
private String paymentId;
|
||||
|
||||
/**
|
||||
* 收单机构(0-本账户余额;1-微信支付;2-汇付支付)
|
||||
*/
|
||||
|
||||
@@ -38,9 +38,5 @@ public interface OrderPayRecordMapper {
|
||||
|
||||
int insertOrUpdateSelective(OrderPayRecord record);
|
||||
|
||||
// int deleteByPrimaryKey(Integer id);
|
||||
|
||||
// int updateByPrimaryKey(OrderPayRecord record);
|
||||
|
||||
List<OrderPayRecord> getOrderPayRecordList(@Param("orderCode") String orderCode);
|
||||
}
|
||||
@@ -5,7 +5,9 @@ import com.alibaba.fastjson2.JSONArray;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.jsowell.adapay.vo.PaymentInfo;
|
||||
import com.jsowell.common.constant.CacheConstants;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.core.redis.RedisCache;
|
||||
import com.jsowell.common.core.text.Convert;
|
||||
import com.jsowell.common.enums.ykc.OrderPayModeEnum;
|
||||
import com.jsowell.common.enums.ykc.OrderPayRecordEnum;
|
||||
import com.jsowell.common.enums.ykc.PaymentInstitutionsEnum;
|
||||
@@ -106,10 +108,10 @@ public class OrderPayRecordServiceImpl implements OrderPayRecordService {
|
||||
for (OrderPayRecord orderPayRecord : orderPayRecordList) {
|
||||
OrderDetailInfoVO.PayRecord payInfo = new OrderDetailInfoVO.PayRecord();
|
||||
|
||||
payInfo.setPayAmount(orderPayRecord.getPayAmount().toString());
|
||||
payInfo.setPayAmount(Convert.toStr(orderPayRecord.getPayAmount(), Constants.ZERO));
|
||||
payInfo.setPayStatus(orderBasicInfo.getPayStatus());
|
||||
payInfo.setPayTime(DateUtils.formatDateTime(orderBasicInfo.getPayTime()));
|
||||
payInfo.setRefundAmount(String.valueOf(orderPayRecord.getRefundAmount()));
|
||||
payInfo.setRefundAmount(Convert.toStr(orderPayRecord.getRefundAmount(), Constants.ZERO));
|
||||
|
||||
// 支付方式(1-本金余额支付;2-赠送余额支付;3-白名单支付;4-微信支付;5-支付宝支付)
|
||||
String payMode = orderPayRecord.getPayMode();
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<result column="order_code" jdbcType="VARCHAR" property="orderCode" />
|
||||
<result column="pay_mode" jdbcType="VARCHAR" property="payMode" />
|
||||
<result column="pay_amount" jdbcType="DECIMAL" property="payAmount" />
|
||||
<result column="payment_id" jdbcType="VARCHAR" property="paymentId" />
|
||||
<result column="acquirer" jdbcType="VARCHAR" property="acquirer" />
|
||||
<result column="refund_amount" jdbcType="DECIMAL" property="refundAmount" />
|
||||
<result column="deduction_record" jdbcType="VARCHAR" property="deductionRecord" />
|
||||
@@ -19,7 +20,7 @@
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, order_code, pay_mode, pay_amount, acquirer, refund_amount, deduction_record,
|
||||
id, order_code, pay_mode, pay_amount, payment_id, acquirer, refund_amount, deduction_record,
|
||||
create_by, create_time, update_by, update_time, del_flag
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
@@ -42,6 +43,9 @@
|
||||
<if test="payAmount != null">
|
||||
pay_amount,
|
||||
</if>
|
||||
<if test="paymentId != null">
|
||||
payment_id,
|
||||
</if>
|
||||
<if test="acquirer != null">
|
||||
acquirer,
|
||||
</if>
|
||||
@@ -77,6 +81,9 @@
|
||||
<if test="payAmount != null">
|
||||
#{payAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="paymentId != null">
|
||||
#{paymentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="acquirer != null">
|
||||
#{acquirer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -116,6 +123,9 @@
|
||||
<if test="payAmount != null">
|
||||
pay_amount = #{payAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="paymentId != null">
|
||||
payment_id = #{paymentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="acquirer != null">
|
||||
acquirer = #{acquirer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -162,6 +172,11 @@
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.payAmount,jdbcType=DECIMAL}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="payment_id = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.paymentId,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="acquirer = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.acquirer,jdbcType=VARCHAR}
|
||||
@@ -211,14 +226,15 @@
|
||||
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into order_pay_record
|
||||
(order_code, pay_mode, pay_amount, acquirer, refund_amount, deduction_record, create_by,
|
||||
create_time, update_by, update_time, del_flag)
|
||||
(order_code, pay_mode, pay_amount, payment_id, acquirer, refund_amount, deduction_record,
|
||||
create_by, create_time, update_by, update_time, del_flag)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.orderCode,jdbcType=VARCHAR}, #{item.payMode,jdbcType=VARCHAR}, #{item.payAmount,jdbcType=DECIMAL},
|
||||
#{item.acquirer,jdbcType=VARCHAR}, #{item.refundAmount,jdbcType=DECIMAL}, #{item.deductionRecord,jdbcType=VARCHAR},
|
||||
#{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=VARCHAR},
|
||||
#{item.updateTime,jdbcType=TIMESTAMP}, #{item.delFlag,jdbcType=CHAR})
|
||||
#{item.paymentId,jdbcType=VARCHAR}, #{item.acquirer,jdbcType=VARCHAR}, #{item.refundAmount,jdbcType=DECIMAL},
|
||||
#{item.deductionRecord,jdbcType=VARCHAR}, #{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
|
||||
#{item.updateBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.delFlag,jdbcType=CHAR}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.OrderPayRecord" useGeneratedKeys="true">
|
||||
@@ -231,6 +247,7 @@
|
||||
order_code,
|
||||
pay_mode,
|
||||
pay_amount,
|
||||
payment_id,
|
||||
acquirer,
|
||||
refund_amount,
|
||||
deduction_record,
|
||||
@@ -248,6 +265,7 @@
|
||||
#{orderCode,jdbcType=VARCHAR},
|
||||
#{payMode,jdbcType=VARCHAR},
|
||||
#{payAmount,jdbcType=DECIMAL},
|
||||
#{paymentId,jdbcType=VARCHAR},
|
||||
#{acquirer,jdbcType=VARCHAR},
|
||||
#{refundAmount,jdbcType=DECIMAL},
|
||||
#{deductionRecord,jdbcType=VARCHAR},
|
||||
@@ -265,6 +283,7 @@
|
||||
order_code = #{orderCode,jdbcType=VARCHAR},
|
||||
pay_mode = #{payMode,jdbcType=VARCHAR},
|
||||
pay_amount = #{payAmount,jdbcType=DECIMAL},
|
||||
payment_id = #{paymentId,jdbcType=VARCHAR},
|
||||
acquirer = #{acquirer,jdbcType=VARCHAR},
|
||||
refund_amount = #{refundAmount,jdbcType=DECIMAL},
|
||||
deduction_record = #{deductionRecord,jdbcType=VARCHAR},
|
||||
@@ -291,6 +310,9 @@
|
||||
<if test="payAmount != null">
|
||||
pay_amount,
|
||||
</if>
|
||||
<if test="paymentId != null">
|
||||
payment_id,
|
||||
</if>
|
||||
<if test="acquirer != null">
|
||||
acquirer,
|
||||
</if>
|
||||
@@ -330,6 +352,9 @@
|
||||
<if test="payAmount != null">
|
||||
#{payAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="paymentId != null">
|
||||
#{paymentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="acquirer != null">
|
||||
#{acquirer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -369,6 +394,9 @@
|
||||
<if test="payAmount != null">
|
||||
pay_amount = #{payAmount,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="paymentId != null">
|
||||
payment_id = #{paymentId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="acquirer != null">
|
||||
acquirer = #{acquirer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user