package com.cyksj.model.views;

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

/*
 *项目名: netflix
 *文件名: CorpInteractiveReaderOrderDetailView
 *创建者: JavaZou
 *创建时间:2023/8/8 16:19
 */
@Getter
@Setter
@SearchBean(tables = "(select * from corp_interactive_user_order_relation where :id:) cor inner join order_don o on cor.order_id = o.id and o.status not in ('close','noPayment','refund')")
public class CorpInteractiveReaderOrderDetailView {
	@DbField("count(distinct cor.user_id)")
	private Integer total;

	@DbField("count(distinct if(is_new,cor.user_id,NUll))")
	private Integer numOfNewUser;

	@DbField("count(distinct if(is_new,NUll,cor.user_id))")
	private Integer numOfOldUser;
}
