加发起退款时间;订单金额相关;

This commit is contained in:
donqi 2022-10-17 23:22:06 +08:00
parent 42d8d3fad7
commit ead994fd89
5 changed files with 20 additions and 1 deletions

View File

@ -183,6 +183,7 @@ public class OrderMasterController extends BaseController {
orderListResponse.setTotalMoney(financialMaster.getTotalMoney());
orderListResponse.setPayMoney(totalPayMoney);
orderListResponse.setChangeMoney(totalChangeMoney);
orderListResponse.setPaidMoney(totalPayMoney.subtract(totalChangeMoney));
orderListResponse.setWorkerName(worker == null ? "" : worker.getName());
orderListResponse.setWorkerPhone(worker == null ? "" : worker.getPhone());
orderListResponse.setCustomerName(customerAddress.getName());

View File

@ -63,6 +63,8 @@ public class OrderListResponse {
private BigDecimal payMoney;
private BigDecimal paidMoney;
private BigDecimal changeMoney;
private BigDecimal discountMoney;

View File

@ -1,6 +1,7 @@
package com.ghy.order.domain;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import org.apache.commons.lang3.builder.ToStringBuilder;
@ -64,6 +65,8 @@ public class AfterServiceRecord extends BaseEntity
@Excel(name = "最终原路返还的金额")
private BigDecimal originalRefund;
private Date refundApplyTime;
private boolean excludeAfterServiceFinished;
private List<AfterServiceImgs> imgsList;
@ -193,6 +196,14 @@ public class AfterServiceRecord extends BaseEntity
this.excludeAfterServiceFinished = excludeAfterServiceFinished;
}
public Date getRefundApplyTime() {
return refundApplyTime;
}
public void setRefundApplyTime(Date refundApplyTime) {
this.refundApplyTime = refundApplyTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -207,6 +218,7 @@ public class AfterServiceRecord extends BaseEntity
.append("refund", getRefund())
.append("agreedRefund", getAgreedRefund())
.append("originalRefund", getOriginalRefund())
.append("refundApplyTime", getRefundApplyTime())
.append("customerFinalCheck", getCustomerFinalCheck())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())

View File

@ -1,6 +1,7 @@
package com.ghy.order.service.impl;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import com.alibaba.fastjson.JSONObject;
@ -164,6 +165,7 @@ public class AfterServiceRecordServiceImpl implements IAfterServiceRecordService
financialMasterService.updateFinancialMaster(financialMaster);
financialDetailService.updateFinancialDetail(financialDetail);
param.setOriginalRefund(refundMoney);
param.setRefundApplyTime(new Date());
} else if (AdapayStatusEnum.failed.code.equals(response.getString("status"))) {
if("reverse_amt_over".equals(response.getString("error_code"))){
throw new BaseException("退款金额大于最后一次支付,请撤销改金额再发起");

View File

@ -22,10 +22,11 @@
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="originalRefund" column="original_refund" />
<result property="refundApplyTime" column="refund_apply_time" />
</resultMap>
<sql id="selectAfterServiceRecordVo">
select id, customer_reason_type, customer_reason, order_detail_id, oper_type, worker_feedback_result, worker_feedback_reason_type, worker_feedback_reason, refund, agreed_refund, original_refund, customer_final_check, create_by, create_time, update_by, update_time, remark from after_service_record
select id, customer_reason_type, customer_reason, order_detail_id, oper_type, worker_feedback_result, worker_feedback_reason_type, worker_feedback_reason, refund, agreed_refund, original_refund, customer_final_check, create_by, create_time, update_by, update_time, remark, refund_apply_time from after_service_record
</sql>
<select id="selectAfterServiceRecordList" parameterType="AfterServiceRecord" resultMap="AfterServiceRecordResult">
@ -98,6 +99,7 @@
<if test="orderDetailId != null">order_detail_id = #{orderDetailId},</if>
<if test="operType != null">oper_type = #{operType},</if>
<if test="originalRefund != null">original_refund = #{originalRefund},</if>
<if test="refundApplyTime != null">refund_apply_time = #{refundApplyTime},</if>
<if test="workerFeedbackResult != null">worker_feedback_result = #{workerFeedbackResult},</if>
<if test="workerFeedbackReasonType != null">worker_feedback_reason_type = #{workerFeedbackReasonType},</if>
<if test="workerFeedbackReason != null">worker_feedback_reason = #{workerFeedbackReason},</if>