新增退款申请用户详情接口
This commit is contained in:
parent
6df85e7ca8
commit
bba222e730
@ -42,7 +42,7 @@ public class EbikeWxPaymentController {
|
||||
@GetMapping("/prepay")
|
||||
public JsonResult<?> prepay(@RequestParam(name = "orderId") String orderId) {
|
||||
JSONObject r = wxPayService.prepay(orderId);
|
||||
return r.containsKey("error")?JsonResult.failed("下单失败: "+ r.getString("error")):JsonResult.success(r);
|
||||
return r.containsKey("error") ? JsonResult.failed("下单失败: " + r.getString("error")) : JsonResult.success(r);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -54,7 +54,7 @@ public class EbikeWxPaymentController {
|
||||
@GetMapping("/queryOrder/{orderId}")
|
||||
public JsonResult<?> queryOrderByOrderId(@PathVariable(name = "orderId") String orderId) {
|
||||
Transaction r = wxPayService.queryOrderByOrderId(orderId);
|
||||
return r == null?JsonResult.failed(String.format("骑行订单号{%s}查询支付订单失败", orderId)):JsonResult.success(r);
|
||||
return r == null ? JsonResult.failed(String.format("骑行订单号{%s}查询支付订单失败", orderId)) : JsonResult.success(r);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -70,6 +70,7 @@ public class EbikeWxPaymentController {
|
||||
}
|
||||
|
||||
// 拆分为两个接口,一个是退款申请(生成退款记录),一个是提交退款(调用微信退款接口)
|
||||
|
||||
/**
|
||||
* 退款申请
|
||||
*
|
||||
@ -79,7 +80,7 @@ public class EbikeWxPaymentController {
|
||||
@PostMapping("/refundApply")
|
||||
public JsonResult<?> refundApply(@RequestBody EbikeRefundDto refundDto) {
|
||||
String r = wxPayService.refundApply(refundDto.getOrderId(), refundDto.getReason());
|
||||
return r == null?JsonResult.failed("退款申请失败"):JsonResult.success((Object) r);
|
||||
return r == null ? JsonResult.failed("退款申请失败") : JsonResult.success((Object) r);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -99,7 +100,7 @@ public class EbikeWxPaymentController {
|
||||
userId = String.valueOf(staffFeign.getStaffId());
|
||||
}
|
||||
HandleNotifyResult r = wxPayService.refund(refundDto, userId);
|
||||
return r.isSuccess()?JsonResult.success(true):JsonResult.failed(r.getMessage());
|
||||
return r.isSuccess() ? JsonResult.success(true) : JsonResult.failed(r.getMessage());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -119,7 +120,7 @@ public class EbikeWxPaymentController {
|
||||
userId = String.valueOf(staffFeign.getStaffId());
|
||||
}
|
||||
boolean r = wxPayService.refundReview(processDto, userId);
|
||||
return r?JsonResult.success(true):JsonResult.failed("审核失败");
|
||||
return r ? JsonResult.success(true) : JsonResult.failed("审核失败");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -131,7 +132,7 @@ public class EbikeWxPaymentController {
|
||||
@GetMapping("/queryRefund/{refundId}")
|
||||
public JsonResult<?> refundQuery(@PathVariable(name = "refundId") String refundId) {
|
||||
Refund r = wxPayService.queryRefundByOutNo(refundId);
|
||||
return r == null?JsonResult.failed(String.format("退款单号{%s}查询退款失败", refundId)):JsonResult.success(r);
|
||||
return r == null ? JsonResult.failed(String.format("退款单号{%s}查询退款失败", refundId)) : JsonResult.success(r);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -155,7 +156,7 @@ public class EbikeWxPaymentController {
|
||||
@GetMapping("/refundOrderDetail/{refundId}")
|
||||
public JsonResult<?> refundOrderDetail(@PathVariable(name = "refundId") String refundId) {
|
||||
ResOrderInfoDto r = wxPayService.queryRefundOrderById(refundId);
|
||||
return r == null?JsonResult.failed(String.format("退款单号{%s}查询订单详情失败", refundId)):JsonResult.success(r);
|
||||
return r == null ? JsonResult.failed(String.format("退款单号{%s}查询订单详情失败", refundId)) : JsonResult.success(r);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -167,6 +168,18 @@ public class EbikeWxPaymentController {
|
||||
@GetMapping("/refundApplyOrderDetail/{orderId}")
|
||||
public JsonResult<?> refundApplyOrderDetail(@PathVariable(name = "orderId") String orderId) {
|
||||
ResRefundOrderInfo r = wxPayService.queryRefundApplyOrderById(orderId);
|
||||
return r == null?JsonResult.failed(String.format("订单号{%s}查询订单详情失败", orderId)):JsonResult.success(r);
|
||||
return r == null ? JsonResult.failed(String.format("订单号{%s}查询订单详情失败", orderId)) : JsonResult.success(r);
|
||||
}
|
||||
|
||||
/**
|
||||
* 退款申请
|
||||
*
|
||||
* @param refundId 退款id
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/refundApplyUserDetail/{refundId}")
|
||||
public JsonResult<?> refundApplyUserDetail(@PathVariable(name = "refundId") String refundId) {
|
||||
UserBasicInformation r = wxPayService.queryRefundUserInfoById(refundId);
|
||||
return r == null ? JsonResult.failed(String.format("退款单号{%s}查询订单详情失败", refundId)) : JsonResult.success(r);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
package com.cdzy.payment.model.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author:Ding
|
||||
* @ClassName:OrderFaultReport
|
||||
* @Package:com.cdzy.payment.model.dto.OrderFaultReport
|
||||
* @Description:订单故障上报记录
|
||||
* @CreateDate:2025年05月21日
|
||||
* @Version:V1.0
|
||||
**/
|
||||
@Data
|
||||
public class OrderFaultReport {
|
||||
|
||||
/**
|
||||
* 反馈用户
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 坐标
|
||||
*/
|
||||
private String coordinate;
|
||||
|
||||
/**
|
||||
* 故障类型
|
||||
*/
|
||||
private String faultType;
|
||||
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
private String image;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
@ -0,0 +1,132 @@
|
||||
package com.cdzy.payment.model.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author:Ding
|
||||
* @ClassName:OrderRecord
|
||||
* @Package:com.cdzy.payment.model.dto.OrderRecord
|
||||
* @Description:订单记录
|
||||
* @CreateDate:2025年05月21日
|
||||
* @Version:V1.0
|
||||
**/
|
||||
@Data
|
||||
public class OrderRecord {
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderId;
|
||||
|
||||
/**
|
||||
* 运营区域
|
||||
*/
|
||||
private String operate;
|
||||
|
||||
/**
|
||||
* 车辆编号
|
||||
*/
|
||||
private String bikeCode;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 骑行时长
|
||||
*/
|
||||
private String cyclingDuration;
|
||||
|
||||
/**
|
||||
* 实付金额
|
||||
*/
|
||||
private Double actualAmount = 0.0;
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private Double totalAmount = 0.0;
|
||||
|
||||
/**
|
||||
* 骑行卡抵扣金额
|
||||
*/
|
||||
private Double cyclingCardAmount = 0.0;
|
||||
|
||||
/**
|
||||
* 优惠卷抵扣金额
|
||||
*/
|
||||
private Double couponAmount = 0.0;
|
||||
|
||||
/**
|
||||
* 优惠金额
|
||||
*/
|
||||
private Double discountAmount = 0.0;
|
||||
|
||||
/**
|
||||
* 起步费用
|
||||
*/
|
||||
private Double startupCost = 0.0;
|
||||
|
||||
/**
|
||||
* 时长费
|
||||
*/
|
||||
private Double durationCost = 0.0;
|
||||
|
||||
/**
|
||||
* 车辆状态
|
||||
*/
|
||||
private String bikeState;
|
||||
|
||||
/**
|
||||
* 还车类型
|
||||
*/
|
||||
private String returnCarType;
|
||||
|
||||
/**
|
||||
* 锁车时间
|
||||
*/
|
||||
private LocalDateTime lockCarTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private LocalDateTime endTime;
|
||||
|
||||
/**
|
||||
* 支付方式
|
||||
*/
|
||||
private String payMethod;
|
||||
|
||||
/**
|
||||
* 支付状态
|
||||
*/
|
||||
private String payState;
|
||||
|
||||
/**
|
||||
* 支付时间
|
||||
*/
|
||||
private LocalDateTime payTime;
|
||||
|
||||
/**
|
||||
* 交易流水号
|
||||
*/
|
||||
private String tradeSerialNumber;
|
||||
|
||||
/**
|
||||
* 订单来源
|
||||
*/
|
||||
private String orderSource;
|
||||
|
||||
/**
|
||||
* 是否上报故障
|
||||
*/
|
||||
private String hasFaultReport;
|
||||
|
||||
/**
|
||||
* 订单备注
|
||||
*/
|
||||
private String orderRemark;
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package com.cdzy.payment.model.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author:Ding
|
||||
* @ClassName:TransactionRecord
|
||||
* @Package:com.cdzy.payment.model.dto.TransactionRecord
|
||||
* @Description:交易记录
|
||||
* @CreateDate:2025年05月21日
|
||||
* @Version:V1.0
|
||||
**/
|
||||
@Data
|
||||
public class TransactionRecord {
|
||||
|
||||
/**
|
||||
* 交易类型
|
||||
*/
|
||||
private String transactionType;
|
||||
|
||||
/**
|
||||
* 金额
|
||||
*/
|
||||
private Double amount;
|
||||
|
||||
/**
|
||||
* 交易内容
|
||||
*/
|
||||
private String transactionContent;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package com.cdzy.payment.model.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author:Ding
|
||||
* @ClassName:UserBasicInformation
|
||||
* @Package:com.cdzy.orders.model.dto.res.UserBasicInformation
|
||||
* @Description:退款申请用户详情基本信息
|
||||
* @CreateDate:2025年05月20日
|
||||
* @Version:V1.0
|
||||
**/
|
||||
@Data
|
||||
public class UserBasicInformation {
|
||||
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 用户手机号
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 实名状态
|
||||
*/
|
||||
private String realNameState;
|
||||
|
||||
/**
|
||||
* 用户真实姓名
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 注册区域
|
||||
*/
|
||||
private String registrationArea;
|
||||
|
||||
/**
|
||||
* 注册来源
|
||||
*/
|
||||
private String registrationSource;
|
||||
|
||||
/**
|
||||
* 注册时间
|
||||
*/
|
||||
private LocalDateTime registrationTime;
|
||||
|
||||
/**
|
||||
* 最近登录时间
|
||||
*/
|
||||
private LocalDateTime lastLoginTime;
|
||||
|
||||
/**
|
||||
* 最近登录ip
|
||||
*/
|
||||
private String lastLoginIp;
|
||||
|
||||
/**
|
||||
* 最近登录终端
|
||||
*/
|
||||
private String lastLoginTerminal;
|
||||
|
||||
/**
|
||||
* 历史消费金额
|
||||
*/
|
||||
private Double totalConsumption;
|
||||
|
||||
/**
|
||||
* 历史骑行次数
|
||||
*/
|
||||
private Integer totalCyclingNumber;
|
||||
|
||||
/**
|
||||
* 历史骑行时长
|
||||
*/
|
||||
private String totalCyclingDuration;
|
||||
}
|
||||
@ -72,7 +72,7 @@ public interface WxPayService {
|
||||
* 退款申请
|
||||
*
|
||||
* @param outTradeNo 商户(骑行)订单号
|
||||
* @param reason 退款原因
|
||||
* @param reason 退款原因
|
||||
* @return 退款信息id
|
||||
*/
|
||||
String refundApply(String outTradeNo, String reason);
|
||||
@ -81,8 +81,8 @@ public interface WxPayService {
|
||||
* 审核退款申请
|
||||
*
|
||||
* @param processDto 退款审核信息
|
||||
* @operator 操作人id
|
||||
* @return 退款信息id
|
||||
* @operator 操作人id
|
||||
*/
|
||||
Boolean refundReview(ReqRefundProcessDto processDto, String operator);
|
||||
|
||||
@ -90,7 +90,7 @@ public interface WxPayService {
|
||||
* 调用微信退款接口
|
||||
*
|
||||
* @param refundDto 退款请求
|
||||
* @param operator 操作人id
|
||||
* @param operator 操作人id
|
||||
* @return 退款信息id
|
||||
*/
|
||||
HandleNotifyResult refund(ReqRefundDto refundDto, String operator);
|
||||
@ -143,4 +143,12 @@ public interface WxPayService {
|
||||
* @return 退款申请详情
|
||||
*/
|
||||
ResRefundOrderInfo queryRefundApplyOrderById(String orderId);
|
||||
|
||||
/**
|
||||
* 获取退款申请用户详情
|
||||
*
|
||||
* @param refundId 退款id
|
||||
* @return
|
||||
*/
|
||||
UserBasicInformation queryRefundUserInfoById(String refundId);
|
||||
}
|
||||
|
||||
@ -598,6 +598,12 @@ public class WxPayServiceImpl implements WxPayService {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserBasicInformation queryRefundUserInfoById(String refundId) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 打印日志
|
||||
*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user