| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- package com.cyksj.model.views;
- import com.baomidou.mybatisplus.core.toolkit.Wrappers;
- import com.cyksj.model.entity.InformationClickUserRecord;
- import com.cyksj.model.entity.OrderDon;
- import com.ejlchina.searcher.bean.DbField;
- import com.ejlchina.searcher.bean.DbIgnore;
- import com.ejlchina.searcher.bean.SearchBean;
- import lombok.Getter;
- import lombok.Setter;
- import java.util.Date;
- import java.util.List;
- /**
- * @author zwhui
- * @date 2023/10/12 14:58
- */
- @Getter
- @Setter
- @SearchBean(tables = "information i",where = "i.deleted is true")
- public class InformationView {
- @DbField("i.id")
- private Long id;
- /**
- * 文章标题
- */
- @DbField("i.title")
- private String title;
- /**
- * 缩略图
- */
- @DbField("i.thumbnail")
- private String thumbnail;
- /**
- * 文章类型
- */
- @DbField("i.category_ids")
- private String categoryIds;
- /**
- * 文章类型名
- */
- @DbIgnore
- private List<String> categoryNames;
- /**
- * 内容
- */
- @DbField("i.content")
- private String content;
- /**
- * true 上架 || false 下架
- */
- @DbField("i.status")
- private Boolean status;
- /**
- * true 推荐 || false
- */
- @DbField("i.recommend")
- private Boolean recommend;
- /**
- * true 置顶 || false
- */
- @DbField("i.top")
- private Boolean top;
- /**
- * 推荐商品id
- */
- @DbField("i.goods_ids")
- private String goodsIds;
- @DbField("i.created_time")
- private Date createdTime;
- /**
- * 推荐商品名
- */
- @DbIgnore
- private List<String> goodsTitles;
- /**
- * 点击数
- */
- @DbField("select count(*) from information_click_user_record ir where ir.info_id = i.id and ir.goods_id is not null")
- private Integer click;
- /**
- * 下单数
- */
- @DbField("select count(*) from information_click_user_record ir left join order_don o on o.id = ir.order_id where ir.info_id = i.id and o.status not in ('close','noPayment')")
- private Integer order;
- /**
- * 浏览量
- */
- @DbField("select count(*) from information_click_user_record ir where ir.info_id = i.id and ir.goods_id is null and ir.order_id is null")
- private Integer visit;
- }
|