Commit a72f8aae authored by 周健威's avatar 周健威

修改代码

parent 266e20ce
package com.xxfc.platform.order.pojo.pay;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class NotifyUrlDTO {
public static final int TYPE_APP = 1;
public static final int TYPE_WX = 2;
//订单号
@ApiModelProperty(value = "订单号")
private String orderNo;
//订单号
@ApiModelProperty(value = "支付订单(流水)号")
private String tradeNo;
//支付类型
@ApiModelProperty(value = "支付类型")
private Integer type;
}
\ No newline at end of file
...@@ -375,13 +375,17 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> { ...@@ -375,13 +375,17 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
* @param refundStatus * @param refundStatus
*/ */
public void refundSubProcess(BaseOrder baseOrder, String refundDesc, BigDecimal refundAmount, Integer refundType, Integer refundStatus) { public void refundSubProcess(BaseOrder baseOrder, String refundDesc, BigDecimal refundAmount, Integer refundType, Integer refundStatus) {
String refundTradeNo = null;
//0 小于 退款金额
if(BigDecimal.ZERO.compareTo(refundAmount) < 0) {
OrderRefundVo orv = new OrderRefundVo(){{ OrderRefundVo orv = new OrderRefundVo(){{
setAmount(baseOrder.getRealAmount().multiply(new BigDecimal("100")).intValue()); setAmount(baseOrder.getRealAmount().multiply(new BigDecimal("100")).intValue());
setOrderNo(baseOrder.getNo()); setOrderNo(baseOrder.getNo());
}}; }};
orv.setRefundDesc(refundDesc+ refundAmount.toString()); orv.setRefundDesc(refundDesc+ refundAmount.toString());
orv.setRefundAmount(refundAmount.multiply(new BigDecimal("100")).intValue()); orv.setRefundAmount(refundAmount.multiply(new BigDecimal("100")).intValue());
String refundTradeNo = thirdFeign.refund(orv).getData(); refundTradeNo = thirdFeign.refund(orv).getData();
}
//记录订单退款记录 //记录订单退款记录
Integer flag = addOrderRefund(baseOrder.getId(), refundDesc, refundAmount, refundTradeNo, refundType); Integer flag = addOrderRefund(baseOrder.getId(), refundDesc, refundAmount, refundTradeNo, refundType);
......
...@@ -28,6 +28,7 @@ import com.xxfc.platform.order.entity.BaseOrder; ...@@ -28,6 +28,7 @@ import com.xxfc.platform.order.entity.BaseOrder;
import com.xxfc.platform.order.entity.OrderUserLicense; import com.xxfc.platform.order.entity.OrderUserLicense;
import com.xxfc.platform.order.mqhandler.RabbitProduct; import com.xxfc.platform.order.mqhandler.RabbitProduct;
import com.xxfc.platform.order.pojo.order.*; import com.xxfc.platform.order.pojo.order.*;
import com.xxfc.platform.order.pojo.pay.NotifyUrlDTO;
import com.xxfc.platform.order.pojo.pay.OrderPayDTO; import com.xxfc.platform.order.pojo.pay.OrderPayDTO;
import com.xxfc.platform.universal.constant.DictionaryKey; import com.xxfc.platform.universal.constant.DictionaryKey;
import com.xxfc.platform.universal.entity.Dictionary; import com.xxfc.platform.universal.entity.Dictionary;
...@@ -470,19 +471,4 @@ public class BaseOrderController extends CommonBaseController implements UserRes ...@@ -470,19 +471,4 @@ public class BaseOrderController extends CommonBaseController implements UserRes
@ApiModelProperty("每页限制") @ApiModelProperty("每页限制")
Integer limit; Integer limit;
} }
@Data
public class NotifyUrlDTO {
//订单号
@ApiModelProperty(value = "订单号")
private String orderNo;
//订单号
@ApiModelProperty(value = "支付订单(流水)号")
private String tradeNo;
//支付类型
@ApiModelProperty(value = "支付类型")
private Integer type;
}
} }
...@@ -14,6 +14,7 @@ import com.xxfc.platform.order.contant.enumerate.OrderTypeEnum; ...@@ -14,6 +14,7 @@ import com.xxfc.platform.order.contant.enumerate.OrderTypeEnum;
import com.xxfc.platform.order.entity.BaseOrder; import com.xxfc.platform.order.entity.BaseOrder;
import com.xxfc.platform.order.entity.inter.OrderDetail; import com.xxfc.platform.order.entity.inter.OrderDetail;
import com.xxfc.platform.order.mqhandler.RabbitProduct; import com.xxfc.platform.order.mqhandler.RabbitProduct;
import com.xxfc.platform.order.pojo.pay.NotifyUrlDTO;
import com.xxfc.platform.order.pojo.price.OrderPriceVO; import com.xxfc.platform.order.pojo.price.OrderPriceVO;
import com.xxfc.platform.universal.entity.Dictionary; import com.xxfc.platform.universal.entity.Dictionary;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -120,13 +121,13 @@ public abstract class AbstractOrderHandle<Biz extends BaseBiz, Detail extends Or ...@@ -120,13 +121,13 @@ public abstract class AbstractOrderHandle<Biz extends BaseBiz, Detail extends Or
} }
//判断是否价格为0 //判断是否价格为0
// BigDecimal realAmount = detail.getOrder().getRealAmount(); BigDecimal realAmount = detail.getOrder().getRealAmount();
// if(BigDecimal.ZERO.compareTo(realAmount) > 0) { if(BigDecimal.ZERO.compareTo(realAmount) > 0) {
// throw new BaseException(ResultCode.FAILED_CODE); throw new BaseException(ResultCode.FAILED_CODE);
// }else if(BigDecimal.ZERO.compareTo(realAmount) = 0) { }else if(BigDecimal.ZERO.compareTo(realAmount) == 0) {
// //直接支付 //直接支付
// baseOrderBiz.payNotifyHandle(); baseOrderBiz.payNotifyHandle(detail.getOrder().getNo(), null, detail.getOrderOrigin());
// } }
} }
/** /**
* 计算价格 * 计算价格
......
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