记得上下班打卡 | git大法好,push需谨慎

Commit 3faf53ec authored by jiangxiulong's avatar jiangxiulong

前端提交退款接口新增纸质票号字段、增加票全退完退快递费的逻辑

parent ebca4978
......@@ -64,6 +64,9 @@ public class KylinOrderRefundsVo implements Serializable,Cloneable {
@ApiModelProperty(value = "退款扣除的手续费金额")
private BigDecimal priceCharges;
@ApiModelProperty(value = "纸质票号")
private String ticketNum;
@ApiModelProperty(value = "退款状态: 0请求退款 2取消退款 1审核通过 5驳回退款 7等待退款 3正在退款 4完成退款 6退款失败")
private Integer status;
......
......@@ -72,6 +72,11 @@ public class KylinOrderRefunds implements Serializable, Cloneable{
private BigDecimal priceExpress;
private BigDecimal priceCharges;
/**
* 纸质票号
*/
private String ticketNum;
/**
* 退款状态: 0请求退款 2取消退款 1审核通过 5驳回退款 7等待退款 3正在退款 4完成退款 6退款失败
*/
......
......@@ -46,6 +46,7 @@ public class KylinOrderTicketsRefundController {
@ApiImplicitParam(type = "form", dataType = "String", name = "orderTicketEntitiesId", value = "订单入场人ID", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "reason", value = "退款申请备注", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "picList", value = "图片"),
@ApiImplicitParam(type = "form", dataType = "String", name = "ticketNum", value = "纸质票号"),
@ApiImplicitParam(type = "form", dataType = "Integer", name = "sendExpressType", value = "快递方式 1上门取件 2自主发货"),
@ApiImplicitParam(type = "form", dataType = "String", name = "expressNumber", value = "自主发货的顺丰订单号"),
@ApiImplicitParam(type = "form", dataType = "String", name = "expressContacts", value = "发货人姓名"),
......@@ -58,6 +59,7 @@ public class KylinOrderTicketsRefundController {
@RequestParam(value = "orderTicketEntitiesId", required = true) @NotNull(message = "票单ID不能为空") String orderTicketEntitiesId,
@RequestParam(value = "reason", required = true) @NotNull(message = "退款原因不能为空") String reason,
@RequestParam(value = "picList", required = false) String picList,
@RequestParam(value = "ticketNum", required = false) String ticketNum,
@RequestParam(value = "sendExpressType", required = false) Integer sendExpressType,
@RequestParam(value = "expressNumber", required = false) String expressNumber,
......@@ -69,7 +71,7 @@ public class KylinOrderTicketsRefundController {
) {
// 退款
return kylinOrderTicketsRefundService.sendOrderRefund(
orderId, orderTicketEntitiesId, reason, picList,
orderId, orderTicketEntitiesId, reason, picList, ticketNum,
sendExpressType, expressNumber, expressContacts, expressPhone, sendExpressAddress, appointmentTime
);
}
......
......@@ -12,7 +12,6 @@ import com.liquidnet.service.kylin.utils.DataUtils;
import com.liquidnet.service.kylin.utils.OrderUtils;
import com.liquidnet.service.kylin.utils.QueueUtils;
import com.mongodb.BasicDBObject;
import com.mongodb.client.result.UpdateResult;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
......@@ -25,7 +24,6 @@ import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.LinkedList;
import java.util.List;
/**
* <p>
......@@ -58,6 +56,7 @@ public class KylinRefundsStatusServiceImpl {
String orderEntitiesId,
String reason,
String picList,
String ticketNum,
String uid,
String username,
int refundCount,
......@@ -110,6 +109,7 @@ public class KylinRefundsStatusServiceImpl {
kylinOrderRefunds.setPrice(refundPrice);
kylinOrderRefunds.setPriceExpress(priceExpress);
kylinOrderRefunds.setPriceCharges(priceCharges);
kylinOrderRefunds.setTicketNum(ticketNum);
kylinOrderRefunds.setStatus(KylinTableStatusConst.ORDER_REFUND_STATUS_APPLY);
if (orderInfo.getGetTicketType().equals("express") && sendExpressType > 0) {// 快递票
kylinOrderRefunds.setType(KylinTableStatusConst.ORDER_REFUND_TYPE_APPLY3);
......@@ -180,7 +180,7 @@ public class KylinRefundsStatusServiceImpl {
});
sqlsDataC.add(new Object[]{
kylinOrderRefunds.getOrderRefundsId(), kylinOrderRefunds.getOrderTicketsId(), kylinOrderRefunds.getOrderRefundCode(),
kylinOrderRefunds.getPrice(), kylinOrderRefunds.getPriceExpress(), kylinOrderRefunds.getPriceCharges(), kylinOrderRefunds.getStatus(),
kylinOrderRefunds.getPrice(), kylinOrderRefunds.getPriceExpress(), kylinOrderRefunds.getPriceCharges(), ticketNum, kylinOrderRefunds.getStatus(),
kylinOrderRefunds.getType(), kylinOrderRefunds.getApplicantId(), kylinOrderRefunds.getApplicantName(),
kylinOrderRefunds.getApplicantAt(), kylinOrderRefunds.getReason(), kylinOrderRefunds.getCreatedAt()
});
......@@ -356,4 +356,4 @@ public class KylinRefundsStatusServiceImpl {
}
}
}
}
\ No newline at end of file
......@@ -25,6 +25,7 @@ import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.time.LocalDateTime;
......@@ -799,4 +800,18 @@ public class DataUtils {
// return data.get(0);
// }
}
/**
* 获取已经退了的快递费
* @return
*/
public BigDecimal getCanRefundPriceExpress(List<KylinOrderRefundsVo> kylinOrderRefundsVoBaseList) {
BigDecimal priceExpress = BigDecimal.valueOf(0);
if (!CollectionUtils.isEmpty(kylinOrderRefundsVoBaseList)) {
kylinOrderRefundsVoBaseList.forEach(r -> {
priceExpress.add(r.getPriceExpress());
});
}
return priceExpress;
}
}
......@@ -16,7 +16,7 @@ kylin_order_ticket_entities.synPay=UPDATE kylin_order_ticket_entities SET is_pay
# ------------------------用户发起订单退款----------------------------
kylin_order_ticket_status.refund=UPDATE kylin_order_ticket_status SET status = ? ,updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
kylin_order_ticket_entities.refund=UPDATE kylin_order_ticket_entities SET is_payment = ? ,updated_at = ? WHERE order_ticket_entities_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
kylin_order_refund.refund=INSERT INTO kylin_order_refunds (order_refunds_id,order_tickets_id,order_refund_code,price,price_express,price_charges,status,type,applicant_id,applicant_name,applicant_at,reason,created_at) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)
kylin_order_refund.refund=INSERT INTO kylin_order_refunds (order_refunds_id,order_tickets_id,order_refund_code,price,price_express,price_charges,ticket_num,status,type,applicant_id,applicant_name,applicant_at,reason,created_at) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?)
kylin_order_refund_entities.refund=INSERT INTO kylin_order_refund_entities (order_refunds_entities_id,order_refunds_id,refund_price,order_ticket_entities_id,created_at) VALUES(?,?,?,?,?)
kylin_order_refund_pic.refund=INSERT INTO kylin_order_refund_pic (refund_pic_id,order_refunds_id,pic_url,created_at) VALUES (?,?,?,?)
kylin_order_refund.refundOrderExpress=INSERT INTO kylin_order_express (order_express_id,performances_id,order_tickets_id,order_refunds_id,order_express_code,mailno,express_type,filter_result,remark,express_status,send_type,send_express_type,express_contacts,express_phone,send_express_address,appointment_time,pro_name,cargo_type_code,limit_type_code,express_type_code,goods_value_total,goods_number,created_at) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment