package com.cyksj.model.views;

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

/**
 * 项目名: yhlxj2
 * 文件名: OrderCustomerServiceDataView
 * 创建者: JavaZou
 * 创建时间:2024/4/1 15:30
 */
@Getter
@Setter
@SearchBean(tables = "order_don_customer_service_relate odr inner join order_don od on odr.order_id = od.id and od.status not in ('close','noPayment','refund')" +
		" inner join cms_user cu on cu.id = odr.cms_user_id",
		groupBy = "odr.cms_user_id,od.goods_id")
public class OrderCustomerServiceDataView {
	@DbField("count(*)")
	private Integer orders;

	@DbField("odr.cms_user_id")
	private Long cmsUserId;

	@DbField("any_value(cu.nickname)")
	private String nickname;

	@DbField("select title from goods_don where id = od.goods_id limit 1")
	private String goodsName;
}
