parent
08926a892b
commit
999f083d6a
@ -1,7 +1,60 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.model.order.OrderCouponModel; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.apache.ibatis.annotations.Select; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface BsOrderCouponMapperExt { |
||||
|
||||
@Select("<script>" + |
||||
" SELECT" + |
||||
" b.order_no orderNo," + |
||||
" b.child_order_no childOrderNo," + |
||||
" b.user_phone userPhone," + |
||||
" b.goods_vpd_key goodsKey," + |
||||
" b.goods_name goodsName," + |
||||
" b.goods_specs_name goodsSpecsName, " + |
||||
" b.goods_spesc_original_price goodsPrice," + |
||||
" b.goods_count goodsCount," + |
||||
" b.total_price totalPrice," + |
||||
" b.total_deduction_price totalDeductionPrice," + |
||||
" b.coupon_discount_price couponDiscountPrice," + |
||||
" b.integral_discount_price integralDiscountPrice," + |
||||
" b.pay_real_price payRealPrice," + |
||||
" b.pay_channel payChannel," + |
||||
" b.pay_type payType," + |
||||
" b.pay_serial_no paySerialNo," + |
||||
" b.`status` tradeStatus," + |
||||
" b.create_time createTime," + |
||||
" b.pay_time payTime," + |
||||
" a.channel_order_no channelOrderNo," + |
||||
" a.goods_vpd_source_cou_no couNo," + |
||||
" a.`status` couStatus," + |
||||
" a.expire_time expireTime," + |
||||
" a.exception_status exceptionStatus," + |
||||
" a.finish_time finishTime" + |
||||
" FROM" + |
||||
" bs_order_coupon_no a" + |
||||
" LEFT JOIN bs_order_coupon b on a.coupon_order_id = b.id" + |
||||
" WHERE 1 = 1" + |
||||
" <if test='param.orderNo != null'> and b.order_no like concat('%',#{param.orderNo},'%') </if>" + |
||||
" <if test='param.userPhone != null'> and b.user_phone like concat('%',#{param.userPhone},'%') </if>" + |
||||
" <if test='param.payType != null'> and b.pay_type = #{param.payType}</if>" + |
||||
" <if test='param.tradeStatus != null'> and b.status = #{param.tradeStatus}</if>" + |
||||
" <if test='param.goodsName != null'> and b.goods_name like concat('%',#{param.goodsName},'%') </if>" + |
||||
" <if test='param.channelOrderNo != null'> and a.channel_order_no like concat('%',#{param.channelOrderNo},'%') </if>" + |
||||
" <if test='param.couNo != null'> and a.goods_vpd_source_cou_no like concat('%',#{param.couNo},'%') </if>" + |
||||
" <if test='param.couStatus != null'> and a.status = #{param.couStatus} </if>" + |
||||
" <if test='param.createTimeS != null'><![CDATA[ and b.create_time >= #{param.createTimeS} ]]></if>" + |
||||
" <if test='param.createTimeE != null'><![CDATA[ and b.create_time <= #{param.createTimeE} ]]></if>" + |
||||
" GROUP BY a.id" + |
||||
" ORDER BY b.create_time desc,b.order_no" + |
||||
"</script>") |
||||
List<OrderCouponModel> getOrderList(@Param("param") Map<String,Object> param); |
||||
} |
@ -0,0 +1,43 @@ |
||||
package com.hfkj.model.order; |
||||
|
||||
import lombok.Data; |
||||
|
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* 卡券订单模型 |
||||
* @className: BsOrderCouponModel |
||||
* @author: HuRui |
||||
* @date: 2024/5/13 |
||||
**/ |
||||
@Data |
||||
public class OrderCouponModel { |
||||
|
||||
public String orderNo; |
||||
public String childOrderNo; |
||||
public String userPhone; |
||||
public String goodsKey; |
||||
public String goodsName; |
||||
public String goodsSpecsName; |
||||
public String goodsPrice; |
||||
public String goodsCount; |
||||
public BigDecimal totalPrice; |
||||
public BigDecimal totalDeductionPrice; |
||||
public BigDecimal couponDiscountPrice; |
||||
public BigDecimal integralDiscountPrice; |
||||
public BigDecimal payRealPrice; |
||||
public Integer payChannel; |
||||
public Integer payType; |
||||
public String paySerialNo; |
||||
public Integer tradeStatus; |
||||
public Date createTime; |
||||
public Date payTime; |
||||
public String channelOrderNo; |
||||
public String couNo; |
||||
public Integer couStatus; |
||||
public Date expireTime; |
||||
public String exceptionStatus; |
||||
public Date finishTime; |
||||
|
||||
} |
Loading…
Reference in new issue