feat:订单查询,同步免押字段
This commit is contained in:
@@ -80,8 +80,19 @@ public class OrderPayController extends BaseController {
|
||||
PageParam<OrderPay, OrderPayParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
//return success(orderPayService.list(page.getOrderWrapper()));
|
||||
List<OrderPay> orderPays = orderPayService.listRel(param);
|
||||
|
||||
if (null != param.getRentOrderId() && 0 != param.getRentOrderId()) {//如果是单个查询
|
||||
Order order = orderService.getById(param.getRentOrderId());
|
||||
if (null != order && !orderPays.isEmpty()) {
|
||||
orderPays.forEach(orderPay -> {
|
||||
orderPay.setIsCreditAuth(order.getIsCreditAuth());//小程序端用于判断是否显示芝麻信用免押
|
||||
orderPay.setIsFreeze(order.getIsFreeze());
|
||||
});
|
||||
}
|
||||
}
|
||||
// 使用关联查询
|
||||
return success(orderPayService.listRel(param));
|
||||
return success(orderPays);
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
@@ -166,6 +177,7 @@ public class OrderPayController extends BaseController {
|
||||
orderPayService.save(one);
|
||||
}
|
||||
one.setIsFreeze(order.getIsFreeze());
|
||||
one.setIsCreditAuth(order.getIsCreditAuth());
|
||||
one.setIsRenew(isRenew);
|
||||
|
||||
if (isRenew == null || isRenew == 0) {
|
||||
@@ -236,9 +248,9 @@ public class OrderPayController extends BaseController {
|
||||
order.setExpirationTime(orderPay.getExpirationTime());
|
||||
orderService.updateById(order);
|
||||
|
||||
OrderPay olderPay = orderPayService.getOne(Wrappers.lambdaQuery(OrderPay.class).eq(OrderPay::getOrderNo,orderPay.getOrderNo()));
|
||||
OrderPay olderPay = orderPayService.getOne(Wrappers.lambdaQuery(OrderPay.class).eq(OrderPay::getOrderNo, orderPay.getOrderNo()));
|
||||
OrderPay newOrderPay = new OrderPay();
|
||||
BeanCopier.create(olderPay, newOrderPay, CopyOptions.create().ignoreNullValue().setIgnoreProperties("id","orderNo")).copy();
|
||||
BeanCopier.create(olderPay, newOrderPay, CopyOptions.create().ignoreNullValue().setIgnoreProperties("id", "orderNo")).copy();
|
||||
|
||||
|
||||
newOrderPay.setOrderPrice(BigDecimal.valueOf(orderPay.getOrderPriceInt()));
|
||||
|
||||
@@ -184,6 +184,10 @@ public class OrderPay implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private Integer isFreeze;
|
||||
|
||||
@ApiModelProperty(value = "信用预授权,即免押模式,0:非免押,1免押")
|
||||
@TableField(exist = false)
|
||||
private Integer isCreditAuth;
|
||||
|
||||
@ApiModelProperty(value = "是否续费单")
|
||||
@TableField(exist = false)
|
||||
private Integer isRenew;
|
||||
|
||||
Reference in New Issue
Block a user