|
|
@@ -2,7 +2,6 @@ package com.cyksj.model.views;
|
|
|
|
|
|
import com.ejlchina.searcher.bean.DbField;
|
|
|
import com.ejlchina.searcher.bean.SearchBean;
|
|
|
-import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
|
import lombok.Getter;
|
|
|
import lombok.Setter;
|
|
|
|
|
|
@@ -14,28 +13,31 @@ import lombok.Setter;
|
|
|
*/
|
|
|
@Getter
|
|
|
@Setter
|
|
|
-@SearchBean(tables = "user_plat_distribute_rate up left join goods_don gd on gd.id = up.goods_id",
|
|
|
- where = "gd.deleted is true and gd.status is true")
|
|
|
+@SearchBean(tables = "goods_don gd left join user_plat_distribute_rate up on gd.id = up.goods_id :dis_id:" +
|
|
|
+ " left join business_distribute_default_rate_config bdc on bdc.goods_id = gd.id",
|
|
|
+ where = "gd.deleted is true and gd.status is true and gd.is_distribute is true")
|
|
|
public class UserDistributeView {
|
|
|
@DbField("up.id")
|
|
|
private Long id;
|
|
|
|
|
|
- @DbField("up.distribute_id")
|
|
|
- @JsonIgnore
|
|
|
- private Long distribute_id;
|
|
|
-
|
|
|
@DbField("gd.id")
|
|
|
private Long goodsId;
|
|
|
|
|
|
@DbField("gd.title")
|
|
|
private String title;
|
|
|
|
|
|
- @DbField("up.rate")
|
|
|
+ @DbField("ifnull(up.rate,bdc.rate)")
|
|
|
private Integer rate;
|
|
|
|
|
|
@DbField("gd.type")
|
|
|
private Integer type;
|
|
|
|
|
|
- @DbField("up.second_rate")
|
|
|
+ /**
|
|
|
+ * 默认选择一个分类
|
|
|
+ */
|
|
|
+ @DbField("select gc.name from goods_don_category_relate gcr inner join goods_don_category gc on gc.id = gcr.category where gcr.goods_id = gd.id order by gc.id limit 1")
|
|
|
+ private String categoryName;
|
|
|
+
|
|
|
+ @DbField("ifnull(up.second_rate,bdc.second_rate)")
|
|
|
private Integer secondRate;
|
|
|
}
|