feat:增加缴费记录关联查询
This commit is contained in:
@@ -66,9 +66,9 @@ public class OrderPayController extends BaseController {
|
||||
public ApiResult<PageResult<OrderPay>> page(OrderPayParam param) {
|
||||
PageParam<OrderPay, OrderPayParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return success(orderPayService.page(page, page.getWrapper()));
|
||||
//return success(orderPayService.page(page, page.getWrapper()));
|
||||
// 使用关联查询
|
||||
//return success(orderPayService.pageRel(param));
|
||||
return success(orderPayService.pageRel(param));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -49,6 +49,8 @@ public class OrderPay implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "商品总金额(不含优惠折扣)")
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
@ApiModelProperty(value = " 订单来源(10普通订单 20砍价订单 30秒杀订单)")
|
||||
private Integer orderSource;
|
||||
|
||||
@ApiModelProperty(value = "订单金额(含优惠折扣)")
|
||||
@@ -104,7 +106,6 @@ public class OrderPay implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "商家备注")
|
||||
private String merchantRemark;
|
||||
private String merchantName;
|
||||
|
||||
@ApiModelProperty(value = "订单是否已结算(0未结算 1已结算)")
|
||||
private Integer isSettled;
|
||||
@@ -199,6 +200,26 @@ public class OrderPay implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private String orderStr;
|
||||
|
||||
@ApiModelProperty(value = "用户实名")
|
||||
@TableField(exist = false)
|
||||
private String realName;
|
||||
|
||||
@ApiModelProperty("设备名称")
|
||||
@TableField(exist = false)
|
||||
private String equipmentName;
|
||||
|
||||
@ApiModelProperty(value = "电池型号")
|
||||
@TableField(exist = false)
|
||||
private String batteryModel;
|
||||
|
||||
@ApiModelProperty(value = "设备编码")
|
||||
@TableField(exist = false)
|
||||
private String equipmentCode;
|
||||
|
||||
@ApiModelProperty(value = "商户名称")
|
||||
@TableField(exist = false)
|
||||
private String merchantName;
|
||||
|
||||
public Long getExpirationDay() {
|
||||
switch(payStatus){
|
||||
case OrderConstants.PAY_STATUS_NO_PAY:
|
||||
|
||||
@@ -4,8 +4,11 @@
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
SELECT a.*,b.real_name,c.equipment_name,c.battery_model,d.merchant_name
|
||||
FROM shop_order_pay a
|
||||
LEFT JOIN sys_user b ON a.user_id = b.user_id
|
||||
LEFT JOIN apps_equipment c ON a.equipment_id = c.equipment_id
|
||||
LEFT JOIN shop_merchant d ON a.merchant_code = d.merchant_code
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
@@ -16,129 +19,12 @@
|
||||
<if test="param.orderNo != null">
|
||||
AND a.order_no LIKE CONCAT('%', #{param.orderNo}, '%')
|
||||
</if>
|
||||
<if test="param.totalPrice != null">
|
||||
AND a.total_price = #{param.totalPrice}
|
||||
</if>
|
||||
<if test="param.orderPrice != null">
|
||||
AND a.order_price = #{param.orderPrice}
|
||||
</if>
|
||||
<if test="param.couponId != null">
|
||||
AND a.coupon_id = #{param.couponId}
|
||||
</if>
|
||||
<if test="param.couponMoney != null">
|
||||
AND a.coupon_money = #{param.couponMoney}
|
||||
</if>
|
||||
<if test="param.pointsMoney != null">
|
||||
AND a.points_money = #{param.pointsMoney}
|
||||
</if>
|
||||
<if test="param.pointsNum != null">
|
||||
AND a.points_num = #{param.pointsNum}
|
||||
</if>
|
||||
<if test="param.payPrice != null">
|
||||
AND a.pay_price = #{param.payPrice}
|
||||
</if>
|
||||
<if test="param.receiptAmount != null">
|
||||
AND a.receipt_amount = #{param.receiptAmount}
|
||||
</if>
|
||||
<if test="param.updatePrice != null">
|
||||
AND a.update_price = #{param.updatePrice}
|
||||
</if>
|
||||
<if test="param.buyerRemark != null">
|
||||
AND a.buyer_remark LIKE CONCAT('%', #{param.buyerRemark}, '%')
|
||||
</if>
|
||||
<if test="param.payType != null">
|
||||
AND a.pay_type = #{param.payType}
|
||||
</if>
|
||||
<if test="param.payMethod != null">
|
||||
AND a.pay_method LIKE CONCAT('%', #{param.payMethod}, '%')
|
||||
</if>
|
||||
<if test="param.payStatus != null">
|
||||
AND a.pay_status = #{param.payStatus}
|
||||
</if>
|
||||
<if test="param.payTime != null">
|
||||
AND a.pay_time LIKE CONCAT('%', #{param.payTime}, '%')
|
||||
</if>
|
||||
<if test="param.tradeId != null">
|
||||
AND a.trade_id LIKE CONCAT('%', #{param.tradeId}, '%')
|
||||
</if>
|
||||
<if test="param.periodsStatus != null">
|
||||
AND a.periods_status = #{param.periodsStatus}
|
||||
</if>
|
||||
<if test="param.periods != null">
|
||||
AND a.periods = #{param.periods}
|
||||
</if>
|
||||
<if test="param.currPeriods != null">
|
||||
AND a.curr_periods = #{param.currPeriods}
|
||||
</if>
|
||||
<if test="param.merchantRemark != null">
|
||||
AND a.merchant_remark LIKE CONCAT('%', #{param.merchantRemark}, '%')
|
||||
</if>
|
||||
<if test="param.isSettled != null">
|
||||
AND a.is_settled = #{param.isSettled}
|
||||
</if>
|
||||
<if test="param.settledTime != null">
|
||||
AND a.settled_time LIKE CONCAT('%', #{param.settledTime}, '%')
|
||||
</if>
|
||||
<if test="param.rentOrderId != null">
|
||||
AND a.rent_order_id = #{param.rentOrderId}
|
||||
</if>
|
||||
<if test="param.batteryRent != null">
|
||||
AND a.battery_rent = #{param.batteryRent}
|
||||
</if>
|
||||
<if test="param.batteryDeposit != null">
|
||||
AND a.battery_deposit = #{param.batteryDeposit}
|
||||
</if>
|
||||
<if test="param.batteryInsurance != null">
|
||||
AND a.battery_insurance = #{param.batteryInsurance}
|
||||
</if>
|
||||
<if test="param.month != null">
|
||||
AND a.month = #{param.month}
|
||||
</if>
|
||||
<if test="param.startTime != null">
|
||||
AND a.start_time LIKE CONCAT('%', #{param.startTime}, '%')
|
||||
</if>
|
||||
<if test="param.expirationTime != null">
|
||||
AND a.expiration_time LIKE CONCAT('%', #{param.expirationTime}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.shopId != null">
|
||||
AND a.shop_id = #{param.shopId}
|
||||
</if>
|
||||
<if test="param.goodsId != null">
|
||||
AND a.goods_id = #{param.goodsId}
|
||||
</if>
|
||||
<if test="param.outRequestNo != null">
|
||||
AND a.out_request_no LIKE CONCAT('%', #{param.outRequestNo}, '%')
|
||||
</if>
|
||||
<if test="param.equipmentId != null">
|
||||
AND a.equipment_id = #{param.equipmentId}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.merchantCode != null">
|
||||
AND a.merchant_code LIKE CONCAT('%', #{param.merchantCode}, '%')
|
||||
</if>
|
||||
<if test="param.dealerPhone != null">
|
||||
AND a.dealer_phone LIKE CONCAT('%', #{param.dealerPhone}, '%')
|
||||
</if>
|
||||
<if test="param.expirationDay != null">
|
||||
AND a.expiration_day = #{param.expirationDay}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user