@ -94,6 +94,7 @@ public interface HighOrderMapperExt {
@Select({"<script>"+
@Select({"<script>"+
" SELECT"+
" SELECT"+
" (select mer.merchant_name from high_merchant mer where EXISTS (select 1 from high_coupon cou where cou.id = a.goods_id and mer.id = cou.merchant_id)) merchantName,"+
" case a.goods_type when 1 then '卡券' when 2 then '金币充值' end goodsType, "+
" case a.goods_type when 1 then '卡券' when 2 then '金币充值' end goodsType, "+
" a.goods_name goodsName, "+
" a.goods_name goodsName, "+
" case a.giveaway_type when 1 then '赠送' when 0 then '购买' end giveawayType,"+
" case a.giveaway_type when 1 then '赠送' when 0 then '购买' end giveawayType,"+
@ -103,12 +104,12 @@ public interface HighOrderMapperExt {
" case b.pay_model when 1 then '金币' when 2 then '第三方' end payModel, "+
" case b.pay_model when 1 then '金币' when 2 then '第三方' end payModel, "+
" case b.pay_type when 1 then '支付宝' when 2 then '微信' when 3 then '金币' end payType,"+
" case b.pay_type when 1 then '支付宝' when 2 then '微信' when 3 then '金币' end payType,"+
" b.pay_serial_no paySerialNo,"+
" b.pay_serial_no paySerialNo,"+
" b.total_price totalPrice,"+
" case a.giveaway_type when 0 then b.total_price when 1 then 0 end totalPrice,"+
" b.mem_discount_name memDiscountName,"+
" b.mem_discount_name memDiscountName,"+
" b.deduction_price deductionPrice,"+
" b.deduction_price deductionPrice,"+
" case when b.pay_gold is null then 0 else pay_gold end payGold,"+
" case a.giveaway_type when 0 then case when b.pay_gold is null then 0 else pay_gold end when 1 then 0 end payGold,"+
" b.pay_price payPrice,"+
" case a.giveaway_type when 0 then b.pay_price when 1 then 0 end payPrice,"+
" b.pay_real_price payRealPrice,"+
" case a.giveaway_type when 0 then case when b.pay_gold is not null then convert(b.pay_gold / 100,decimal(10,2)) else b.pay_real_price end when 1 then 0 end payRealPrice,"+
" case b.order_status when 1 then '待支付' when 2 then '已支付' when 3 then '已完成' when 4 then '已退款' when 5 then '已取消' end orderStatus, "+
" case b.order_status when 1 then '待支付' when 2 then '已支付' when 3 then '已完成' when 4 then '已退款' when 5 then '已取消' end orderStatus, "+
" b.create_time createTime,"+
" b.create_time createTime,"+
" b.pay_time payTime,"+
" b.pay_time payTime,"+
@ -120,7 +121,9 @@ public interface HighOrderMapperExt {
" a.order_id = b.id"+
" a.order_id = b.id"+
" and a.goods_type = 1"+
" and a.goods_type = 1"+
" and a.giveaway_type = 0"+
" and a.giveaway_type = 0"+
"<if test='map.companyId != null'> and EXISTS (select 1 from high_coupon c where c.company_id = #{map.companyId} and c.id = a.goods_id)</if>",
" and EXISTS (select 1 from high_coupon c where c.id = a.goods_id "+