|
|
@@ -16,7 +16,7 @@ import java.math.BigDecimal;
|
|
|
@Getter
|
|
|
@Setter
|
|
|
@SearchBean(tables = "(select * from distribute_waiting_send_points where :sharedId: :time:) dw left join order_don od on od.id = dw.order_id and dw.is_vip = false and od.status not in ('close','noPayment')" +
|
|
|
- " left join vip_order_don vod on vod.id = dw.oder_id and dw.is_vip = true and vod.status not in ('close','noPayment')" +
|
|
|
+ " left join vip_order_don vod on vod.id = dw.order_id and dw.is_vip = true and vod.status not in ('close','noPayment')" +
|
|
|
" left join goods_don g on g.id = ifnull(od.goods_id,vod.goods_id)",
|
|
|
groupBy = "ifnull(od.goods_id,vod.goods_id),g.title")
|
|
|
public class UserDistributeOrdersStatisticsView {
|
|
|
@@ -24,18 +24,18 @@ public class UserDistributeOrdersStatisticsView {
|
|
|
@DbField("g.title")
|
|
|
private String title;
|
|
|
|
|
|
- @DbField("cast(sum(if(od.id is null,vod.money,if(od.is_dp and od.ori_money != 0,od.ori_money,od.money))/100 as decimal(10,2)))")
|
|
|
+ @DbField("cast(sum(if(od.id is null,vod.money,if(od.is_dp and od.ori_money != 0,od.ori_money,od.money))/100) as decimal(10,2))")
|
|
|
private BigDecimal distributeOrderMoney;
|
|
|
|
|
|
@DbField("count(dw.order_id)")
|
|
|
private Integer orders;
|
|
|
|
|
|
- @DbField("TRUNCATE(sum(if(dp.send_status != 'close',dp.points,0))/1000,2)")
|
|
|
+ @DbField("TRUNCATE(sum(if(dw.send_status != 'close',dw.points,0))/1000,2)")
|
|
|
private BigDecimal takeMoney;
|
|
|
|
|
|
@DbField("count(if(ifnull(od.status,vod.status) = 'refund',1,NULL))")
|
|
|
private Integer refundOrders;
|
|
|
|
|
|
- @DbField("cast(sum(if(od.id is null,vod.refund_money,ifnull(if(od.is_dp and od.ori_money != 0 and od.refund_money > od.ori_money,od.ori_money,od.refund_money),0))/100 as decimal(10,2)))")
|
|
|
+ @DbField("cast(sum(if(od.id is null,vod.refund_money,ifnull(if(od.is_dp and od.ori_money != 0 and od.refund_money > od.ori_money,od.ori_money,od.refund_money),0)))/100 as decimal(10,2))")
|
|
|
private BigDecimal refundMoney;
|
|
|
}
|