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;

/*
 *项目名: netflix
 *文件名: PlatOrderDonBrokenLineView
 *创建者: JavaZou
 *创建时间:2023/3/8 15:22
 */
@Getter
@Setter
@SearchBean(tables = "order_don od",
		where = "od.status not in ('noPayment','close','refund')"
		, groupBy = "od.goods_id,:date:")
public class PlatOrderDonBrokenLineView {
	@DbField("od.goods_id")
	private Long goodsId;

	/**
	 * 平台名称
	 */
	@DbField("select title from goods_don where id = od.goods_id")
	private String goodsTitle;

	/**
	 * 当前日期订单金额
	 */
	@DbField("cast(sum(od.money)/100 as decimal(10,2))")
	private BigDecimal money;

	/**
	 * 日期
	 */
	@DbField(":date:")
	private String date;
}
