InformationView.java 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. package com.cyksj.model.views;
  2. import com.ejlchina.searcher.bean.DbField;
  3. import com.ejlchina.searcher.bean.DbIgnore;
  4. import com.ejlchina.searcher.bean.SearchBean;
  5. import lombok.Getter;
  6. import lombok.Setter;
  7. import java.util.Date;
  8. import java.util.List;
  9. /**
  10. * @author zwhui
  11. * @date 2023/10/12 14:58
  12. */
  13. @Getter
  14. @Setter
  15. @SearchBean(tables = "information i",where = "i.deleted is true :ct:")
  16. public class InformationView {
  17. @DbField("i.id")
  18. private Long id;
  19. /**
  20. * 文章标题
  21. */
  22. @DbField("i.title")
  23. private String title;
  24. /**
  25. * 文章标题
  26. */
  27. @DbField("i.sub_title")
  28. private String subTitle;
  29. /**
  30. * 文章标题
  31. */
  32. @DbField("i.logo")
  33. private String logo;
  34. @DbField("i.is_black_font")
  35. private Boolean isBlackFont;
  36. /**
  37. * 缩略图
  38. */
  39. @DbField("i.thumbnail")
  40. private String thumbnail;
  41. /**
  42. * 文章类型
  43. */
  44. @DbField("i.category_ids")
  45. private String categoryIds;
  46. /**
  47. * 文章类型名
  48. */
  49. @DbIgnore
  50. private List<String> categoryNames;
  51. /**
  52. * 内容
  53. */
  54. @DbField("i.content")
  55. private String content;
  56. /**
  57. * true 上架 || false 下架
  58. */
  59. @DbField("i.status")
  60. private Boolean status;
  61. /**
  62. * true 推荐 || false
  63. */
  64. @DbField("i.recommend")
  65. private Boolean recommend;
  66. /**
  67. * true 置顶 || false
  68. */
  69. @DbField("i.top")
  70. private Boolean top;
  71. @DbField("i.sorted")
  72. private Integer sorted;
  73. /**
  74. * 推荐商品id
  75. */
  76. @DbField("i.goods_ids")
  77. private String goodsIds;
  78. @DbField("i.created_time")
  79. private Date createdTime;
  80. /**
  81. * 推荐商品名
  82. */
  83. @DbIgnore
  84. private List<String> goodsTitles;
  85. /**
  86. * 点击数
  87. */
  88. @DbField("select count(*) from information_click_user_record ir where ir.info_id = i.id and ir.goods_id is not null")
  89. private Integer click;
  90. /**
  91. * 下单数
  92. */
  93. @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','refund')")
  94. private Integer orderNum;
  95. /**
  96. * 浏览量
  97. */
  98. @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")
  99. private Integer visit;
  100. }