package com.cyksj.model.views;

import com.ejlchina.searcher.bean.DbField;
import com.ejlchina.searcher.bean.SearchBean;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;

/**
 * 项目名: yhlxj
 * 文件名: DistributeWaitingOrderPointsRuleView
 * 创建者: JavaZou
 * 创建时间:2023/9/25 14:29
 */
@Getter
@Setter
@SearchBean(tables = "(select * from distribute_waiting_send_points :condition:) dp inner join order_don o on o.id = dp.order_id and o.status not in ('close','noPayment')")
public class DistributeWaitingOrderPointsRuleView {
	@DbField("count(dp.order_id)")
	private Integer numOfOrder;

	@DbField("sum(o.money) - sum(ifnull(o.refund_money,0))")
	private BigDecimal orderAmount;
}
