Commit 27cb428ae76d89d95cef64184dc749829d1bd770
1 parent
2a57f425
初始化工程-接口定义
Showing
62 changed files
with
656 additions
and
2289 deletions
Too many changes to show.
To preserve performance only 62 of 153 files are displayed.
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/AddCartProduct.java
1 | package com.diligrp.mobsite.getway.domain.protocol; | 1 | package com.diligrp.mobsite.getway.domain.protocol; |
2 | 2 | ||
3 | -import java.util.List; | 3 | +import io.swagger.annotations.ApiModelProperty; |
4 | + | ||
5 | +import javax.validation.constraints.Min; | ||
6 | +import javax.validation.constraints.NotNull; | ||
4 | 7 | ||
5 | /** | 8 | /** |
6 | * <B>Description</B> 合并进货单商品信息 <br /> | 9 | * <B>Description</B> 合并进货单商品信息 <br /> |
@@ -18,131 +21,60 @@ public class AddCartProduct implements java.io.Serializable{ | @@ -18,131 +21,60 @@ public class AddCartProduct implements java.io.Serializable{ | ||
18 | /** | 21 | /** |
19 | * 商品id | 22 | * 商品id |
20 | */ | 23 | */ |
21 | - private Long productId; | ||
22 | - /** | ||
23 | - * Sku版本 | ||
24 | - */ | ||
25 | - private Integer version; | 24 | + @ApiModelProperty(value = "商品id",required = true) |
25 | + @NotNull(message = "商品id不能为空") | ||
26 | + private Long pid; | ||
27 | + | ||
26 | /** | 28 | /** |
27 | * SKU | 29 | * SKU |
28 | */ | 30 | */ |
29 | - private List<Long> sku; | ||
30 | - /** | ||
31 | - * 店铺ID | ||
32 | - */ | ||
33 | - private Long shopId; | ||
34 | - /** | ||
35 | - * 价格方式:1-普通价格方式,2-价格区间方式 | ||
36 | - */ | ||
37 | - private Integer priceType; | ||
38 | - /** | ||
39 | - * TODO 后期需要删除,价格区间 | ||
40 | - */ | ||
41 | - @Deprecated | ||
42 | - private List<Quotation> quotationList; | 31 | + @ApiModelProperty(value = "sku",required = true) |
32 | + @NotNull(message = "sku不能为空") | ||
33 | + private String sku; | ||
34 | + | ||
43 | /** | 35 | /** |
44 | * 普通价格 | 36 | * 普通价格 |
45 | */ | 37 | */ |
38 | + @ApiModelProperty(value = "价格",required = true) | ||
39 | + @NotNull(message = "价格不能为空") | ||
46 | private Long price; | 40 | private Long price; |
47 | /** | 41 | /** |
48 | * 购买数量 | 42 | * 购买数量 |
49 | */ | 43 | */ |
50 | - private Integer amount; | ||
51 | - | 44 | + @ApiModelProperty(value = "数量",required = true) |
45 | + @Min(value = 0,message = "数量必须大于0") | ||
46 | + private Integer quantity; | ||
52 | 47 | ||
53 | - public Long getPrice() { | ||
54 | - return price; | ||
55 | - } | ||
56 | 48 | ||
57 | - public void setPrice(Long price) { | ||
58 | - this.price = price; | ||
59 | - } | ||
60 | - | ||
61 | - public Integer getAmount() { | ||
62 | - return amount; | ||
63 | - } | ||
64 | - | ||
65 | - public void setAmount(Integer amount) { | ||
66 | - this.amount = amount; | ||
67 | - } | ||
68 | - | ||
69 | - /** | ||
70 | - * @return the sku | ||
71 | - */ | ||
72 | - public List<Long> getSku() { | ||
73 | - return sku; | 49 | + public Long getPid() { |
50 | + return pid; | ||
74 | } | 51 | } |
75 | 52 | ||
76 | - /** | ||
77 | - * @param sku the sku to set | ||
78 | - */ | ||
79 | - public void setSku(List<Long> sku) { | ||
80 | - this.sku = sku; | 53 | + public void setPid(Long pid) { |
54 | + this.pid = pid; | ||
81 | } | 55 | } |
82 | 56 | ||
83 | - /** | ||
84 | - * @return the productId | ||
85 | - */ | ||
86 | - public Long getProductId() { | ||
87 | - return productId; | ||
88 | - } | ||
89 | - | ||
90 | - /** | ||
91 | - * @param productId the productId to set | ||
92 | - */ | ||
93 | - public void setProductId(Long productId) { | ||
94 | - this.productId = productId; | 57 | + public String getSku() { |
58 | + return sku; | ||
95 | } | 59 | } |
96 | 60 | ||
97 | - /** | ||
98 | - * @return the priceType | ||
99 | - */ | ||
100 | - public Integer getPriceType() { | ||
101 | - return priceType; | 61 | + public void setSku(String sku) { |
62 | + this.sku = sku; | ||
102 | } | 63 | } |
103 | 64 | ||
104 | - /** | ||
105 | - * @param priceType the priceType to set | ||
106 | - */ | ||
107 | - public void setPriceType(Integer priceType) { | ||
108 | - this.priceType = priceType; | 65 | + public Long getPrice() { |
66 | + return price; | ||
109 | } | 67 | } |
110 | 68 | ||
111 | - /** | ||
112 | - * @return the quotationList | ||
113 | - */ | ||
114 | - public List<Quotation> getQuotationList() { | ||
115 | - return quotationList; | 69 | + public void setPrice(Long price) { |
70 | + this.price = price; | ||
116 | } | 71 | } |
117 | 72 | ||
118 | - /** | ||
119 | - * @param quotationList the quotationList to set | ||
120 | - */ | ||
121 | - public void setQuotationList(List<Quotation> quotationList) { | ||
122 | - this.quotationList = quotationList; | 73 | + public Integer getQuantity() { |
74 | + return quantity; | ||
123 | } | 75 | } |
124 | 76 | ||
125 | - /** | ||
126 | - * @return the version | ||
127 | - */ | ||
128 | - public Integer getVersion() { | ||
129 | - return version; | 77 | + public void setQuantity(Integer quantity) { |
78 | + this.quantity = quantity; | ||
130 | } | 79 | } |
131 | - | ||
132 | - /** | ||
133 | - * @param version the version to set | ||
134 | - */ | ||
135 | - public void setVersion(Integer version) { | ||
136 | - this.version = version; | ||
137 | - } | ||
138 | - | ||
139 | - | ||
140 | - public Long getShopId() { | ||
141 | - return shopId; | ||
142 | - } | ||
143 | - | ||
144 | - | ||
145 | - public void setShopId(Long shopId) { | ||
146 | - this.shopId = shopId; | ||
147 | - } | ||
148 | } | 80 | } |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/BaseReq.java
@@ -21,8 +21,8 @@ public class BaseReq implements java.io.Serializable { | @@ -21,8 +21,8 @@ public class BaseReq implements java.io.Serializable { | ||
21 | /** | 21 | /** |
22 | * 设备ID | 22 | * 设备ID |
23 | */ | 23 | */ |
24 | - @Deprecated | ||
25 | - private String deviceId; | 24 | + //@Deprecated |
25 | + //private String deviceId; | ||
26 | /** | 26 | /** |
27 | * get value of BaseReq.token | 27 | * get value of BaseReq.token |
28 | * @return the token | 28 | * @return the token |
@@ -43,30 +43,33 @@ public class BaseReq implements java.io.Serializable { | @@ -43,30 +43,33 @@ public class BaseReq implements java.io.Serializable { | ||
43 | this.token = token; | 43 | this.token = token; |
44 | } | 44 | } |
45 | 45 | ||
46 | - /** | ||
47 | - * get value of BaseReq.deviceId | ||
48 | - * @return the deviceId | ||
49 | - * @createTime Aug 12, 2014 4:47:24 PM | ||
50 | - * @author wujianjun | ||
51 | - */ | 46 | + ///** |
47 | + // * get value of BaseReq.deviceId | ||
48 | + // * @return the deviceId | ||
49 | + // * @createTime Aug 12, 2014 4:47:24 PM | ||
50 | + // * @author wujianjun | ||
51 | + // */ | ||
52 | + //public String getDeviceId() { | ||
53 | + // //TODO 后期需要删除 | ||
54 | + // if (this.deviceId != null) { | ||
55 | + // return deviceId; | ||
56 | + //}else { | ||
57 | + // return token == null ? null:this.getToken().getDeviceId(); | ||
58 | + //} | ||
59 | + //} | ||
60 | + // | ||
61 | + ///** | ||
62 | + // * set value of BaseReq.deviceId | ||
63 | + // * @param deviceId the deviceId to set | ||
64 | + // * @createTime Aug 12, 2014 4:47:24 PM | ||
65 | + // * @author wujianjun | ||
66 | + // */ | ||
67 | + //@Deprecated | ||
68 | + //public void setDeviceId(String deviceId) { | ||
69 | + // this.deviceId = deviceId; | ||
70 | + //} | ||
52 | public String getDeviceId() { | 71 | public String getDeviceId() { |
53 | - //TODO 后期需要删除 | ||
54 | - if (this.deviceId != null) { | ||
55 | - return deviceId; | ||
56 | - }else { | ||
57 | - return token == null ? null:this.getToken().getDeviceId(); | ||
58 | - } | ||
59 | - } | ||
60 | - | ||
61 | - /** | ||
62 | - * set value of BaseReq.deviceId | ||
63 | - * @param deviceId the deviceId to set | ||
64 | - * @createTime Aug 12, 2014 4:47:24 PM | ||
65 | - * @author wujianjun | ||
66 | - */ | ||
67 | - @Deprecated | ||
68 | - public void setDeviceId(String deviceId) { | ||
69 | - this.deviceId = deviceId; | 72 | + return token == null ? null:token.getDeviceId(); |
70 | } | 73 | } |
71 | 74 | ||
72 | /** | 75 | /** |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/Category.java
1 | package com.diligrp.mobsite.getway.domain.protocol; | 1 | package com.diligrp.mobsite.getway.domain.protocol; |
2 | 2 | ||
3 | 3 | ||
4 | +import io.swagger.annotations.ApiModelProperty; | ||
4 | 5 | ||
5 | /** | 6 | /** |
6 | * <B>Description</B> 商品分类 <br /> | 7 | * <B>Description</B> 商品分类 <br /> |
@@ -18,26 +19,29 @@ public class Category { | @@ -18,26 +19,29 @@ public class Category { | ||
18 | /** | 19 | /** |
19 | * 分类id | 20 | * 分类id |
20 | */ | 21 | */ |
22 | + @ApiModelProperty(value = "分类id") | ||
21 | private Long id; | 23 | private Long id; |
22 | - @Deprecated | ||
23 | - private Long Id; | 24 | + |
24 | /** | 25 | /** |
25 | * 分类名 | 26 | * 分类名 |
26 | */ | 27 | */ |
28 | + @ApiModelProperty(value = "分类名称") | ||
27 | private String name; | 29 | private String name; |
28 | - @Deprecated | ||
29 | - private String Name; | 30 | + |
30 | /** | 31 | /** |
31 | * 分类图标地址 | 32 | * 分类图标地址 |
32 | */ | 33 | */ |
34 | + @ApiModelProperty(value = "分类图标") | ||
33 | private String imgUrl; | 35 | private String imgUrl; |
34 | /** | 36 | /** |
35 | * 关联分类id | 37 | * 关联分类id |
36 | */ | 38 | */ |
39 | + @ApiModelProperty(value = "关联分类id") | ||
37 | private Long relateId; | 40 | private Long relateId; |
38 | /** | 41 | /** |
39 | * 分类级别 | 42 | * 分类级别 |
40 | */ | 43 | */ |
44 | + @ApiModelProperty(value = "分类级别") | ||
41 | private String level; | 45 | private String level; |
42 | 46 | ||
43 | public Long getId() { | 47 | public Long getId() { |
@@ -46,7 +50,7 @@ public class Category { | @@ -46,7 +50,7 @@ public class Category { | ||
46 | 50 | ||
47 | public void setId(Long id) { | 51 | public void setId(Long id) { |
48 | this.id = id; | 52 | this.id = id; |
49 | - this.Id = id; | 53 | + |
50 | } | 54 | } |
51 | 55 | ||
52 | public String getName() { | 56 | public String getName() { |
@@ -54,7 +58,7 @@ public class Category { | @@ -54,7 +58,7 @@ public class Category { | ||
54 | } | 58 | } |
55 | 59 | ||
56 | public void setName(String name) { | 60 | public void setName(String name) { |
57 | - this.Name = name; | 61 | + |
58 | this.name = name; | 62 | this.name = name; |
59 | } | 63 | } |
60 | 64 |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/ConsigneeInfo.java
1 | package com.diligrp.mobsite.getway.domain.protocol; | 1 | package com.diligrp.mobsite.getway.domain.protocol; |
2 | 2 | ||
3 | +import io.swagger.annotations.ApiModelProperty; | ||
4 | + | ||
3 | import java.io.Serializable; | 5 | import java.io.Serializable; |
4 | 6 | ||
5 | 7 | ||
@@ -19,86 +21,53 @@ public class ConsigneeInfo implements Serializable { | @@ -19,86 +21,53 @@ public class ConsigneeInfo implements Serializable { | ||
19 | /** | 21 | /** |
20 | * 默认提货人-是 | 22 | * 默认提货人-是 |
21 | */ | 23 | */ |
22 | - public static final int ISDEFAULT_YES = 2; | 24 | + public static final int ISDEFAULT_YES = 1; |
23 | /** | 25 | /** |
24 | * 默认提货人-否 | 26 | * 默认提货人-否 |
25 | */ | 27 | */ |
26 | - public static final int ISDEFAULT_NO = 1; | 28 | + public static final int ISDEFAULT_NO = 2; |
29 | + | ||
27 | 30 | ||
28 | - /** | ||
29 | - * 是否市场内交割-是 | ||
30 | - */ | ||
31 | - public static final int DELIVERYTYPE_YES = 1; | ||
32 | - /** | ||
33 | - * 是否市场内交割-否 | ||
34 | - */ | ||
35 | - public static final int DELIVERYTYPE_NO = 2; | ||
36 | 31 | ||
37 | /** | 32 | /** |
38 | * id | 33 | * id |
39 | */ | 34 | */ |
35 | + @ApiModelProperty(value = "id") | ||
40 | private Long id; | 36 | private Long id; |
41 | /** | 37 | /** |
42 | * 用户姓名名字 | 38 | * 用户姓名名字 |
43 | */ | 39 | */ |
40 | + @ApiModelProperty(value = "联系人姓名") | ||
44 | private String name; | 41 | private String name; |
45 | /** | 42 | /** |
46 | * 电话 | 43 | * 电话 |
47 | */ | 44 | */ |
45 | + @ApiModelProperty(value = "联系人电话") | ||
48 | private String mobile; | 46 | private String mobile; |
49 | - /** | ||
50 | - * 身份证号 | ||
51 | - */ | ||
52 | - private String idCard; | 47 | + |
53 | /** | 48 | /** |
54 | * 是否为默认提货人 | 49 | * 是否为默认提货人 |
55 | */ | 50 | */ |
51 | + @ApiModelProperty(value = "是否为默认提货人:1-是,2-否") | ||
56 | private Integer isDefault; | 52 | private Integer isDefault; |
57 | - /** | ||
58 | - * 城市地址编号 | ||
59 | - */ | ||
60 | - private Long cityAddressNo; | 53 | + |
61 | /** | 54 | /** |
62 | * 城市地址 | 55 | * 城市地址 |
63 | */ | 56 | */ |
57 | + @ApiModelProperty(value = "城市地址") | ||
64 | private String cityAddress; | 58 | private String cityAddress; |
65 | /** | 59 | /** |
66 | * 街道地址 | 60 | * 街道地址 |
67 | */ | 61 | */ |
62 | + @ApiModelProperty(value = "街道地址") | ||
68 | private String streetAddress; | 63 | private String streetAddress; |
69 | 64 | ||
70 | - /** | ||
71 | - * 交割类型:1-市场内 2-市场外 | ||
72 | - */ | ||
73 | - private Integer deliveryType; | ||
74 | 65 | ||
75 | 66 | ||
76 | - private Long marketId; | ||
77 | 67 | ||
78 | 68 | ||
79 | - public Long getMarketId() { | ||
80 | - return marketId; | ||
81 | - } | ||
82 | 69 | ||
83 | - public void setMarketId(Long marketId) { | ||
84 | - this.marketId = marketId; | ||
85 | - } | ||
86 | - | ||
87 | - public Integer getDeliveryType() { | ||
88 | - return deliveryType; | ||
89 | - } | ||
90 | - | ||
91 | - public void setDeliveryType(Integer deliveryType) { | ||
92 | - this.deliveryType = deliveryType; | ||
93 | - } | ||
94 | - | ||
95 | - public String getIdCard() { | ||
96 | - return idCard; | ||
97 | - } | ||
98 | 70 | ||
99 | - public void setIdCard(String idCard) { | ||
100 | - this.idCard = idCard; | ||
101 | - } | ||
102 | 71 | ||
103 | public Long getId() { | 72 | public Long getId() { |
104 | return id; | 73 | return id; |
@@ -132,17 +101,7 @@ public class ConsigneeInfo implements Serializable { | @@ -132,17 +101,7 @@ public class ConsigneeInfo implements Serializable { | ||
132 | this.isDefault = isDefault; | 101 | this.isDefault = isDefault; |
133 | } | 102 | } |
134 | 103 | ||
135 | - | ||
136 | - public Long getCityAddressNo() { | ||
137 | - return cityAddressNo; | ||
138 | - } | ||
139 | 104 | ||
140 | - | ||
141 | - public void setCityAddressNo(Long cityAddressNo) { | ||
142 | - this.cityAddressNo = cityAddressNo; | ||
143 | - } | ||
144 | - | ||
145 | - | ||
146 | public String getCityAddress() { | 105 | public String getCityAddress() { |
147 | return cityAddress; | 106 | return cityAddress; |
148 | } | 107 | } |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/Goods.java
@@ -11,155 +11,10 @@ package com.diligrp.mobsite.getway.domain.protocol; | @@ -11,155 +11,10 @@ package com.diligrp.mobsite.getway.domain.protocol; | ||
11 | */ | 11 | */ |
12 | public class Goods extends GoodsSuper{ | 12 | public class Goods extends GoodsSuper{ |
13 | 13 | ||
14 | - /** | ||
15 | - * 10-地利自营 | ||
16 | - * 20-代销 | ||
17 | - * 30-第三方卖家 | ||
18 | - * 40-询价商品 | ||
19 | - */ | ||
20 | - public static final int FLAG_DILI = 10; | ||
21 | - public static final int FLAG_AGENT_SALE = 20; | ||
22 | - public static final int FLAG_THIRD_PARTY = 30; | ||
23 | - public static final int FLAG_CONSULT = 40; | ||
24 | - | ||
25 | - /** | ||
26 | - * 1-商品未收藏 | ||
27 | - * 2-用户已收藏 | ||
28 | - */ | ||
29 | - public static final int FAVORITES_FLAG_NO = 1; | ||
30 | - public static final int FAVORITES_FLAG_YES = 2; | ||
31 | - | ||
32 | - /** | ||
33 | - * 商品分类ID | ||
34 | - */ | ||
35 | - private Long categoryId; | ||
36 | - /** | ||
37 | - * 收藏标识 | ||
38 | - */ | ||
39 | - private Integer favoritesFlag; | ||
40 | - /** | ||
41 | - * 商品销售类型标识 | ||
42 | - */ | ||
43 | - private Integer saleType; | ||
44 | - /** | ||
45 | - * 销售数量 | ||
46 | - */ | ||
47 | - private Long salesNum; | ||
48 | - /** | ||
49 | - * 商品所在地 | ||
50 | - */ | ||
51 | - private String locationAddr; | ||
52 | - | ||
53 | - /** | ||
54 | - * 店铺信息 | ||
55 | - */ | ||
56 | - private ShopIntroduction shopInfo; | ||
57 | - | ||
58 | - | ||
59 | - /** | ||
60 | - * 是否允许合作市场以外的市场进行交割 1-允许 2-不允许 | ||
61 | - */ | ||
62 | - private int isAllowDelivery; | ||
63 | - | ||
64 | - | ||
65 | - public int getIsAllowDelivery() { | ||
66 | - return isAllowDelivery; | ||
67 | - } | ||
68 | - | ||
69 | - public void setIsAllowDelivery(int isAllowDelivery) { | ||
70 | - this.isAllowDelivery = isAllowDelivery; | ||
71 | - } | ||
72 | 14 | ||
73 | - /** | ||
74 | - * get value of Goods.favoritesFlag | ||
75 | - * @return the favoritesFlag | ||
76 | - * @createTime 2014年9月12日 下午2:38:14 | ||
77 | - * @author zhangshirui | ||
78 | - */ | ||
79 | - public Integer getFavoritesFlag() { | ||
80 | - return favoritesFlag; | ||
81 | - } | ||
82 | 15 | ||
83 | 16 | ||
84 | - /** | ||
85 | - * set value of Goods.favoritesFlag | ||
86 | - * @param favoritesFlag the favoritesFlag to set | ||
87 | - * @createTime 2014年9月12日 下午2:38:14 | ||
88 | - * @author zhangshirui | ||
89 | - */ | ||
90 | - public void setFavoritesFlag(Integer favoritesFlag) { | ||
91 | - this.favoritesFlag = favoritesFlag; | ||
92 | - } | ||
93 | - | ||
94 | - /** | ||
95 | - * @return the categoryId | ||
96 | - */ | ||
97 | - public Long getCategoryId() { | ||
98 | - return categoryId; | ||
99 | - } | ||
100 | - | ||
101 | - /** | ||
102 | - * @param categoryId the categoryId to set | ||
103 | - */ | ||
104 | - public void setCategoryId(Long categoryId) { | ||
105 | - this.categoryId = categoryId; | ||
106 | - } | ||
107 | - | ||
108 | - | ||
109 | - | ||
110 | - /** | ||
111 | - * get value of Goods.saleType | ||
112 | - * @return the saleType | ||
113 | - * @createTime 2014年10月31日 下午5:17:56 | ||
114 | - * @author zhangshirui | ||
115 | - */ | ||
116 | - public Integer getSaleType() { | ||
117 | - return saleType; | ||
118 | - } | ||
119 | - | ||
120 | - | ||
121 | - | ||
122 | - /** | ||
123 | - * set value of Goods.saleType | ||
124 | - * @param saleType the saleType to set | ||
125 | - * @createTime 2014年10月31日 下午5:17:56 | ||
126 | - * @author zhangshirui | ||
127 | - */ | ||
128 | - public void setSaleType(Integer saleType) { | ||
129 | - this.saleType = saleType; | ||
130 | - } | ||
131 | - | ||
132 | - | ||
133 | - | ||
134 | - public Long getSalesNum() { | ||
135 | - return salesNum; | ||
136 | - } | ||
137 | - | ||
138 | - | ||
139 | - | ||
140 | - public void setSalesNum(Long salesNum) { | ||
141 | - this.salesNum = salesNum; | ||
142 | - } | ||
143 | - | ||
144 | - | ||
145 | - | ||
146 | - public String getLocationAddr() { | ||
147 | - return locationAddr; | ||
148 | - } | ||
149 | - | ||
150 | - | ||
151 | - | ||
152 | - public void setLocationAddr(String locationAddr) { | ||
153 | - this.locationAddr = locationAddr; | ||
154 | - } | ||
155 | - | ||
156 | 17 | ||
157 | - public ShopIntroduction getShopInfo() { | ||
158 | - return shopInfo; | ||
159 | - } | ||
160 | 18 | ||
161 | 19 | ||
162 | - public void setShopInfo(ShopIntroduction shopInfo) { | ||
163 | - this.shopInfo = shopInfo; | ||
164 | - } | ||
165 | } | 20 | } |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/GoodsSuper.java
1 | package com.diligrp.mobsite.getway.domain.protocol; | 1 | package com.diligrp.mobsite.getway.domain.protocol; |
2 | 2 | ||
3 | +import io.swagger.annotations.ApiModelProperty; | ||
4 | + | ||
3 | import java.io.Serializable; | 5 | import java.io.Serializable; |
4 | import java.util.List; | 6 | import java.util.List; |
5 | 7 | ||
@@ -16,353 +18,105 @@ public class GoodsSuper implements Serializable{ | @@ -16,353 +18,105 @@ public class GoodsSuper implements Serializable{ | ||
16 | 18 | ||
17 | 19 | ||
18 | /** | 20 | /** |
19 | - * 价格方式: | ||
20 | - * 1-普通价格方式 | ||
21 | - */ | ||
22 | - public static final int PRICE_TYPE_NORMAL = 1; | ||
23 | - /** | ||
24 | - * 2-价格区间方式 | ||
25 | - */ | ||
26 | - public static final int PRICE_TYPE_QUOTATION = 2; | ||
27 | - | ||
28 | - /** | ||
29 | - * 最小起批量 | ||
30 | - */ | ||
31 | - public static final int MINWHOLESALE_DEFAULT_MIN = 1; | ||
32 | - | ||
33 | - /** | ||
34 | - * 商品状态: | ||
35 | - * 1-库存为零,销售完毕 | ||
36 | - * 2-商品状态:已下架或删除 | ||
37 | - * 3-在售并且正常 | ||
38 | - */ | ||
39 | - /** | ||
40 | - * 1-已售罄,销售完毕 | ||
41 | - */ | ||
42 | - public static final int STATE_SOLD_OUT = 1; | ||
43 | - /** | ||
44 | - * 2-商品状态:已下架或删除 | ||
45 | - */ | ||
46 | - public static final int STATE_DOWN_DEL=2; | ||
47 | - /** | ||
48 | - * 3-在售并且正常 | ||
49 | - */ | ||
50 | - public static final int STATE_ON_SALE = 3; | ||
51 | - | ||
52 | - /** | ||
53 | * 商品ID | 21 | * 商品ID |
54 | */ | 22 | */ |
23 | + @ApiModelProperty(value = "商品id") | ||
55 | private Long id; | 24 | private Long id; |
56 | /** | 25 | /** |
57 | * 商品标题 | 26 | * 商品标题 |
58 | */ | 27 | */ |
28 | + @ApiModelProperty(value = "商品标题") | ||
59 | private String title; | 29 | private String title; |
60 | /** | 30 | /** |
61 | * 商品默认图片 | 31 | * 商品默认图片 |
62 | */ | 32 | */ |
33 | + @ApiModelProperty(value = "商品默认图片") | ||
63 | private String defaultPic; | 34 | private String defaultPic; |
64 | /** | 35 | /** |
65 | * 商品图片 | 36 | * 商品图片 |
66 | */ | 37 | */ |
38 | + @ApiModelProperty(value = "商品图片") | ||
67 | private List<String> pictures; | 39 | private List<String> pictures; |
68 | /** | 40 | /** |
69 | * 单位 | 41 | * 单位 |
70 | */ | 42 | */ |
43 | + @ApiModelProperty(value = "商品单位") | ||
71 | private String unit; | 44 | private String unit; |
45 | + | ||
46 | + | ||
47 | + /** | ||
48 | + * 规格 | ||
49 | + */ | ||
50 | + @ApiModelProperty(value = "规格") | ||
51 | + private String standard; | ||
52 | + | ||
72 | /** | 53 | /** |
73 | * 状态 -2=预览 -1=删除 1=待审核(新建)2=审核失败 3=在售 4=仓库中 5=待上架 6=过期下架 7=手动下架 | 54 | * 状态 -2=预览 -1=删除 1=待审核(新建)2=审核失败 3=在售 4=仓库中 5=待上架 6=过期下架 7=手动下架 |
74 | */ | 55 | */ |
56 | + @ApiModelProperty(value = "商品状态:-2=预览 -1=删除 1=待审核(新建)2=审核失败 3=在售 4=仓库中 5=待上架 6=过期下架 7=手动下架") | ||
75 | private Integer state; | 57 | private Integer state; |
76 | 58 | ||
77 | - /** | ||
78 | - * 价格展示类型:1-普通方式,2-价格区间方式 | ||
79 | - */ | ||
80 | - private Integer priceType; | 59 | + |
81 | /** | 60 | /** |
82 | * 价格 | 61 | * 价格 |
83 | */ | 62 | */ |
63 | + @ApiModelProperty(value = "商品价格") | ||
84 | private Long price = 0L; | 64 | private Long price = 0L; |
85 | 65 | ||
86 | - /** | ||
87 | - * 商品最低价格 | ||
88 | - */ | ||
89 | - private Long minPrice = 0L; | ||
90 | - | ||
91 | - /** | ||
92 | - * 商品最高价格 | ||
93 | - */ | ||
94 | - private Long maxPrice = 0L; | ||
95 | - | ||
96 | - /** | ||
97 | - * 价格区间 | ||
98 | - */ | ||
99 | - private List<Quotation> quotationList; | ||
100 | - /** | ||
101 | - * 最少起批量 | ||
102 | - * 默认为1 | ||
103 | - */ | ||
104 | - private Integer minWholesale = MINWHOLESALE_DEFAULT_MIN; | ||
105 | 66 | ||
106 | - /** | ||
107 | - * 是否为特价商品 2是 1不是 | ||
108 | - * */ | ||
109 | - private Integer hasSpecial; | ||
110 | - | ||
111 | - /** | ||
112 | - * 是否为推广商品 2 :是 1 :不是 | ||
113 | - * */ | ||
114 | - private Integer hasPromotion; | ||
115 | - | ||
116 | - /** | ||
117 | - * get value of GoodsSuper.id | ||
118 | - * @return the id | ||
119 | - * @createTime 2014年9月1日 下午3:34:23 | ||
120 | - * @author zhangshirui | ||
121 | - */ | ||
122 | public Long getId() { | 67 | public Long getId() { |
123 | return id; | 68 | return id; |
124 | } | 69 | } |
125 | 70 | ||
126 | - | ||
127 | - /** | ||
128 | - * set value of GoodsSuper.id | ||
129 | - * @param id the id to set | ||
130 | - * @createTime 2014年9月1日 下午3:34:23 | ||
131 | - * @author zhangshirui | ||
132 | - */ | ||
133 | public void setId(Long id) { | 71 | public void setId(Long id) { |
134 | this.id = id; | 72 | this.id = id; |
135 | } | 73 | } |
136 | 74 | ||
137 | - | ||
138 | - /** | ||
139 | - * get value of GoodsSuper.title | ||
140 | - * @return the title | ||
141 | - * @createTime 2014年9月1日 下午3:34:23 | ||
142 | - * @author zhangshirui | ||
143 | - */ | ||
144 | public String getTitle() { | 75 | public String getTitle() { |
145 | return title; | 76 | return title; |
146 | } | 77 | } |
147 | 78 | ||
148 | - | ||
149 | - /** | ||
150 | - * set value of GoodsSuper.title | ||
151 | - * @param title the title to set | ||
152 | - * @createTime 2014年9月1日 下午3:34:23 | ||
153 | - * @author zhangshirui | ||
154 | - */ | ||
155 | public void setTitle(String title) { | 79 | public void setTitle(String title) { |
156 | this.title = title; | 80 | this.title = title; |
157 | } | 81 | } |
158 | 82 | ||
159 | - | ||
160 | - /** | ||
161 | - * get value of GoodsSuper.pictures | ||
162 | - * @return the pictures | ||
163 | - * @createTime 2014年9月1日 下午3:34:23 | ||
164 | - * @author zhangshirui | ||
165 | - */ | ||
166 | - public List<String> getPictures() { | ||
167 | - return pictures; | ||
168 | - } | ||
169 | - | ||
170 | - | ||
171 | - /** | ||
172 | - * set value of GoodsSuper.pictures | ||
173 | - * @param pictures the pictures to set | ||
174 | - * @createTime 2014年9月1日 下午3:34:23 | ||
175 | - * @author zhangshirui | ||
176 | - */ | ||
177 | - public void setPictures(List<String> pictures) { | ||
178 | - this.pictures = pictures; | ||
179 | - } | ||
180 | - | ||
181 | - | ||
182 | - /** | ||
183 | - * get value of GoodsSuper.priceType | ||
184 | - * @return the priceType | ||
185 | - * @createTime 2014年9月18日 上午9:29:18 | ||
186 | - * @author zhangshirui | ||
187 | - */ | ||
188 | - public Integer getPriceType() { | ||
189 | - return priceType; | 83 | + public String getDefaultPic() { |
84 | + return defaultPic; | ||
190 | } | 85 | } |
191 | 86 | ||
192 | - | ||
193 | - | ||
194 | - /** | ||
195 | - * set value of GoodsSuper.priceType | ||
196 | - * @param priceType the priceType to set | ||
197 | - * @createTime 2014年9月18日 上午9:29:18 | ||
198 | - * @author zhangshirui | ||
199 | - */ | ||
200 | - public void setPriceType(Integer priceType) { | ||
201 | - this.priceType = priceType; | 87 | + public void setDefaultPic(String defaultPic) { |
88 | + this.defaultPic = defaultPic; | ||
202 | } | 89 | } |
203 | 90 | ||
204 | - | ||
205 | - | ||
206 | - /** | ||
207 | - * get value of GoodsSuper.quotationList | ||
208 | - * @return the quotationList | ||
209 | - * @createTime 2014年9月18日 上午9:29:18 | ||
210 | - * @author zhangshirui | ||
211 | - */ | ||
212 | - public List<Quotation> getQuotationList() { | ||
213 | - return quotationList; | 91 | + public List<String> getPictures() { |
92 | + return pictures; | ||
214 | } | 93 | } |
215 | 94 | ||
216 | - | ||
217 | - | ||
218 | - /** | ||
219 | - * set value of GoodsSuper.quotationList | ||
220 | - * @param quotationList the quotationList to set | ||
221 | - * @createTime 2014年9月18日 上午9:29:18 | ||
222 | - * @author zhangshirui | ||
223 | - */ | ||
224 | - public void setQuotationList(List<Quotation> quotationList) { | ||
225 | - this.quotationList = quotationList; | 95 | + public void setPictures(List<String> pictures) { |
96 | + this.pictures = pictures; | ||
226 | } | 97 | } |
227 | 98 | ||
228 | - | ||
229 | - | ||
230 | - /** | ||
231 | - * get value of GoodsSuper.unit | ||
232 | - * @return the unit | ||
233 | - * @createTime 2014年9月18日 下午3:44:44 | ||
234 | - * @author zhangshirui | ||
235 | - */ | ||
236 | public String getUnit() { | 99 | public String getUnit() { |
237 | return unit; | 100 | return unit; |
238 | } | 101 | } |
239 | 102 | ||
240 | - | ||
241 | - | ||
242 | - /** | ||
243 | - * set value of GoodsSuper.unit | ||
244 | - * @param unit the unit to set | ||
245 | - * @createTime 2014年9月18日 下午3:44:44 | ||
246 | - * @author zhangshirui | ||
247 | - */ | ||
248 | public void setUnit(String unit) { | 103 | public void setUnit(String unit) { |
249 | this.unit = unit; | 104 | this.unit = unit; |
250 | } | 105 | } |
251 | 106 | ||
252 | - | ||
253 | - | ||
254 | - /** | ||
255 | - * get value of GoodsSuper.state | ||
256 | - * @return the state | ||
257 | - * @createTime 2014年9月18日 下午3:47:47 | ||
258 | - * @author zhangshirui | ||
259 | - */ | ||
260 | public Integer getState() { | 107 | public Integer getState() { |
261 | return state; | 108 | return state; |
262 | } | 109 | } |
263 | 110 | ||
264 | - | ||
265 | - | ||
266 | - /** | ||
267 | - * set value of GoodsSuper.state | ||
268 | - * @param state the state to set | ||
269 | - * @createTime 2014年9月18日 下午3:47:47 | ||
270 | - * @author zhangshirui | ||
271 | - */ | ||
272 | public void setState(Integer state) { | 111 | public void setState(Integer state) { |
273 | this.state = state; | 112 | this.state = state; |
274 | } | 113 | } |
275 | 114 | ||
276 | - | ||
277 | - /** | ||
278 | - * @return the price | ||
279 | - */ | ||
280 | - public Long getPrice() { | ||
281 | - return price; | ||
282 | - } | ||
283 | - | ||
284 | - | ||
285 | - /** | ||
286 | - * @param price the price to set | ||
287 | - */ | ||
288 | - public void setPrice(Long price) { | ||
289 | - this.price = price; | ||
290 | - } | ||
291 | - | ||
292 | - | ||
293 | - /** | ||
294 | - * @return the minPrice | ||
295 | - */ | ||
296 | - public Long getMinPrice() { | ||
297 | - return minPrice; | ||
298 | - } | ||
299 | - | ||
300 | - | ||
301 | - /** | ||
302 | - * @param minPrice the minPrice to set | ||
303 | - */ | ||
304 | - public void setMinPrice(Long minPrice) { | ||
305 | - this.minPrice = minPrice; | ||
306 | - } | ||
307 | - | ||
308 | - | ||
309 | - /** | ||
310 | - * @return the maxPrice | ||
311 | - */ | ||
312 | - public Long getMaxPrice() { | ||
313 | - return maxPrice; | ||
314 | - } | ||
315 | - | ||
316 | - | ||
317 | - /** | ||
318 | - * @param maxPrice the maxPrice to set | ||
319 | - */ | ||
320 | - public void setMaxPrice(Long maxPrice) { | ||
321 | - this.maxPrice = maxPrice; | ||
322 | - } | ||
323 | - | ||
324 | - | ||
325 | - /** | ||
326 | - * @return the defaultPic | ||
327 | - */ | ||
328 | - public String getDefaultPic() { | ||
329 | - return defaultPic; | ||
330 | - } | ||
331 | - | ||
332 | - | ||
333 | - /** | ||
334 | - * @param defaultPic the defaultPic to set | ||
335 | - */ | ||
336 | - public void setDefaultPic(String defaultPic) { | ||
337 | - this.defaultPic = defaultPic; | ||
338 | - } | ||
339 | - | ||
340 | - | ||
341 | - | ||
342 | - public Integer getMinWholesale() { | ||
343 | - return minWholesale; | ||
344 | - } | ||
345 | - | ||
346 | - | ||
347 | - | ||
348 | - public void setMinWholesale(Integer minWholesale) { | ||
349 | - this.minWholesale = minWholesale; | ||
350 | - } | ||
351 | - | ||
352 | - | ||
353 | - public Integer getHasSpecial() { | ||
354 | - return hasSpecial; | ||
355 | - } | ||
356 | - | ||
357 | - public void setHasSpecial(Integer hasSpecial) { | ||
358 | - this.hasSpecial = hasSpecial; | ||
359 | - } | ||
360 | - | ||
361 | - public Integer getHasPromotion() { | ||
362 | - return hasPromotion; | 115 | + public Long getPrice() { |
116 | + return price; | ||
363 | } | 117 | } |
364 | 118 | ||
365 | - public void setHasPromotion(Integer hasPromotion) { | ||
366 | - this.hasPromotion = hasPromotion; | 119 | + public void setPrice(Long price) { |
120 | + this.price = price; | ||
367 | } | 121 | } |
368 | } | 122 | } |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/ProductCategory.java
1 | package com.diligrp.mobsite.getway.domain.protocol; | 1 | package com.diligrp.mobsite.getway.domain.protocol; |
2 | 2 | ||
3 | 3 | ||
4 | +import io.swagger.annotations.ApiModelProperty; | ||
4 | 5 | ||
5 | /** | 6 | /** |
6 | * <B>Description</B> 产品分类 <br /> | 7 | * <B>Description</B> 产品分类 <br /> |
@@ -20,33 +21,21 @@ public class ProductCategory extends Category{ | @@ -20,33 +21,21 @@ public class ProductCategory extends Category{ | ||
20 | * 没有子分类 | 21 | * 没有子分类 |
21 | */ | 22 | */ |
22 | public static final Integer HASNEXT_NO = 2; | 23 | public static final Integer HASNEXT_NO = 2; |
23 | - | ||
24 | - /** | ||
25 | - * 是否关注 | ||
26 | - * 1-关注 | ||
27 | - */ | ||
28 | - public static final Integer FOCUS_YES = 1; | ||
29 | - /** | ||
30 | - * 是否关注 | ||
31 | - * 2-未关注 | ||
32 | - */ | ||
33 | - public static final Integer FOCUS_NO = 2; | 24 | + |
34 | 25 | ||
35 | /** | 26 | /** |
36 | * 是否子级分类,HASNEXT_* | 27 | * 是否子级分类,HASNEXT_* |
37 | */ | 28 | */ |
29 | + @ApiModelProperty(value = "是否有子分类:1-有,2-没有") | ||
38 | private Integer hasNext; | 30 | private Integer hasNext; |
39 | 31 | ||
40 | /** | 32 | /** |
41 | * 父级分类ID | 33 | * 父级分类ID |
42 | */ | 34 | */ |
35 | + @ApiModelProperty(value = "父分类id") | ||
43 | private Long pid; | 36 | private Long pid; |
44 | 37 | ||
45 | - /** | ||
46 | - * 是否关注 | ||
47 | - */ | ||
48 | - private Integer isFocus; | ||
49 | - | 38 | + |
50 | /** | 39 | /** |
51 | * get value of ProductCategory.pid | 40 | * get value of ProductCategory.pid |
52 | * @return the pid | 41 | * @return the pid |
@@ -87,18 +76,6 @@ public class ProductCategory extends Category{ | @@ -87,18 +76,6 @@ public class ProductCategory extends Category{ | ||
87 | this.hasNext = hasNext; | 76 | this.hasNext = hasNext; |
88 | } | 77 | } |
89 | 78 | ||
90 | - /** | ||
91 | - * @return the isFocus | ||
92 | - */ | ||
93 | - public Integer getIsFocus() { | ||
94 | - return isFocus; | ||
95 | - } | ||
96 | 79 | ||
97 | - /** | ||
98 | - * @param isFocus the isFocus to set | ||
99 | - */ | ||
100 | - public void setIsFocus(Integer isFocus) { | ||
101 | - this.isFocus = isFocus; | ||
102 | - } | ||
103 | 80 | ||
104 | } | 81 | } |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/ProductIntroduction.java
1 | package com.diligrp.mobsite.getway.domain.protocol; | 1 | package com.diligrp.mobsite.getway.domain.protocol; |
2 | 2 | ||
3 | -import com.diligrp.mobsite.getway.domain.protocol.product.model.VideoInfo; | ||
4 | - | ||
5 | -import java.util.List; | ||
6 | - | ||
7 | - | ||
8 | /** | 3 | /** |
9 | * <B>Description</B> 商品简介 <br /> | 4 | * <B>Description</B> 商品简介 <br /> |
10 | * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | 5 | * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> |
@@ -13,280 +8,9 @@ import java.util.List; | @@ -13,280 +8,9 @@ import java.util.List; | ||
13 | * @createTime Aug 14, 2014 8:24:48 PM | 8 | * @createTime Aug 14, 2014 8:24:48 PM |
14 | * @author wujianjun | 9 | * @author wujianjun |
15 | */ | 10 | */ |
16 | -public class ProductIntroduction extends Goods { | ||
17 | - | ||
18 | - /** | ||
19 | - * 产地 | ||
20 | - */ | ||
21 | - private String producingArea; | ||
22 | - /** | ||
23 | - * 商品分享地址 | ||
24 | - */ | ||
25 | - private String shareURL; | ||
26 | - /** | ||
27 | - * 交易量(带单位) | ||
28 | - */ | ||
29 | - private String transVolume; | ||
30 | - /** | ||
31 | - * 商品所在地id | ||
32 | - */ | ||
33 | - private Integer locationid; | ||
34 | - /** | ||
35 | - * 分类名称 | ||
36 | - */ | ||
37 | - private String categoryName; | ||
38 | - /** | ||
39 | - * 分类价格指数 | ||
40 | - * 1-有,2没有 | ||
41 | - */ | ||
42 | - @Deprecated | ||
43 | - private Integer categoryIndex; | ||
44 | - /** | ||
45 | - * 商家联系电话 | ||
46 | - */ | ||
47 | - private String contactMobile; | ||
48 | - /** | ||
49 | - * 卖家id | ||
50 | - */ | ||
51 | - private Long sellerId; | ||
52 | - /** | ||
53 | - * 店铺简介信息 | ||
54 | - */ | ||
55 | - private ShopIntroduction shopIntroduction; | ||
56 | - /** | ||
57 | - * 好评率 | ||
58 | - */ | ||
59 | - private Float praiseRate; | ||
60 | - /** | ||
61 | - * 评论人数 | ||
62 | - */ | ||
63 | - private Integer commentNum; | ||
64 | - /** | ||
65 | - * 每单位数量 | ||
66 | - */ | ||
67 | - private String singleBoxCount; | ||
68 | - /** | ||
69 | - * 每单位重量 | ||
70 | - */ | ||
71 | - private String singleBoxweight; | ||
72 | - /** | ||
73 | - * 视频信息 | ||
74 | - */ | ||
75 | - private List<VideoInfo> videos; | ||
76 | - | ||
77 | - | ||
78 | - | ||
79 | - | ||
80 | - | ||
81 | - public String getShareURL() { | ||
82 | - return shareURL; | ||
83 | - } | ||
84 | - | ||
85 | - public void setShareURL(String shareURL) { | ||
86 | - this.shareURL = shareURL; | ||
87 | - } | ||
88 | - | ||
89 | - /** | ||
90 | - * get value of ProductIntroduction.producingArea | ||
91 | - * @return the producingArea | ||
92 | - * @createTime Aug 14, 2014 8:31:09 PM | ||
93 | - * @author wujianjun | ||
94 | - */ | ||
95 | - public String getProducingArea() { | ||
96 | - return producingArea; | ||
97 | - } | ||
98 | - | ||
99 | - /** | ||
100 | - * set value of ProductIntroduction.producingArea | ||
101 | - * @param producingArea the producingArea to set | ||
102 | - * @createTime Aug 14, 2014 8:31:09 PM | ||
103 | - * @author wujianjun | ||
104 | - */ | ||
105 | - public void setProducingArea(String producingArea) { | ||
106 | - this.producingArea = producingArea; | ||
107 | - } | ||
108 | - | ||
109 | - /** | ||
110 | - * get value of ProductIntroduction.transVolume | ||
111 | - * @return the transVolume | ||
112 | - * @createTime Aug 14, 2014 8:31:09 PM | ||
113 | - * @author wujianjun | ||
114 | - */ | ||
115 | - public String getTransVolume() { | ||
116 | - return transVolume; | ||
117 | - } | ||
118 | - | ||
119 | - /** | ||
120 | - * set value of ProductIntroduction.transVolume | ||
121 | - * @param transVolume the transVolume to set | ||
122 | - * @createTime Aug 14, 2014 8:31:09 PM | ||
123 | - * @author wujianjun | ||
124 | - */ | ||
125 | - public void setTransVolume(String transVolume) { | ||
126 | - this.transVolume = transVolume; | ||
127 | - } | ||
128 | - | ||
129 | - /** | ||
130 | - * get value of ProductIntroduction.locationid | ||
131 | - * @return the locationid | ||
132 | - * @createTime 2014年9月17日 下午3:56:28 | ||
133 | - * @author zhangshirui | ||
134 | - */ | ||
135 | - public Integer getLocationid() { | ||
136 | - return locationid; | ||
137 | - } | ||
138 | - | ||
139 | - | ||
140 | - /** | ||
141 | - * set value of ProductIntroduction.locationid | ||
142 | - * @param locationid the locationid to set | ||
143 | - * @createTime 2014年9月17日 下午3:56:28 | ||
144 | - * @author zhangshirui | ||
145 | - */ | ||
146 | - public void setLocationid(Integer locationid) { | ||
147 | - this.locationid = locationid; | ||
148 | - } | ||
149 | - | ||
150 | - | ||
151 | - /** | ||
152 | - * get value of ProductIntroduction.categoryName | ||
153 | - * @return the categoryName | ||
154 | - * @createTime 2014年10月29日 下午3:48:16 | ||
155 | - * @author zhangshirui | ||
156 | - */ | ||
157 | - public String getCategoryName() { | ||
158 | - return categoryName; | ||
159 | - } | ||
160 | - | ||
161 | - | ||
162 | - /** | ||
163 | - * set value of ProductIntroduction.categoryName | ||
164 | - * @param categoryName the categoryName to set | ||
165 | - * @createTime 2014年10月29日 下午3:48:16 | ||
166 | - * @author zhangshirui | ||
167 | - */ | ||
168 | - public void setCategoryName(String categoryName) { | ||
169 | - this.categoryName = categoryName; | ||
170 | - } | ||
171 | - | ||
172 | - | ||
173 | - /** | ||
174 | - * get value of ProductIntroduction.contactMobile | ||
175 | - * @return the contactMobile | ||
176 | - * @createTime 2014年10月31日 下午5:26:07 | ||
177 | - * @author zhangshirui | ||
178 | - */ | ||
179 | - public String getContactMobile() { | ||
180 | - return contactMobile; | ||
181 | - } | ||
182 | - | 11 | +public class ProductIntroduction extends GoodsSuper { |
183 | 12 | ||
184 | - /** | ||
185 | - * set value of ProductIntroduction.contactMobile | ||
186 | - * @param contactMobile the contactMobile to set | ||
187 | - * @createTime 2014年10月31日 下午5:26:07 | ||
188 | - * @author zhangshirui | ||
189 | - */ | ||
190 | - public void setContactMobile(String contactMobile) { | ||
191 | - this.contactMobile = contactMobile; | ||
192 | - } | ||
193 | - | ||
194 | - | ||
195 | - /** | ||
196 | - * get value of ProductIntroduction.shopIntroduction | ||
197 | - * @return the shopIntroduction | ||
198 | - * @createTime 2014年11月3日 下午8:07:46 | ||
199 | - * @author zhangshirui | ||
200 | - */ | ||
201 | - public ShopIntroduction getShopIntroduction() { | ||
202 | - return shopIntroduction; | ||
203 | - } | ||
204 | - | ||
205 | - | ||
206 | - /** | ||
207 | - * set value of ProductIntroduction.shopIntroduction | ||
208 | - * @param shopIntroduction the shopIntroduction to set | ||
209 | - * @createTime 2014年11月3日 下午8:07:46 | ||
210 | - * @author zhangshirui | ||
211 | - */ | ||
212 | - public void setShopIntroduction(ShopIntroduction shopIntroduction) { | ||
213 | - this.shopIntroduction = shopIntroduction; | ||
214 | - } | ||
215 | - | ||
216 | - | ||
217 | - /** | ||
218 | - * get value of ProductIntroduction.categoryIndex | ||
219 | - * @return the categoryIndex | ||
220 | - * @createTime 2014年11月4日 下午5:29:24 | ||
221 | - * @author zhangshirui | ||
222 | - */ | ||
223 | - public Integer getCategoryIndex() { | ||
224 | - return categoryIndex; | ||
225 | - } | ||
226 | - | ||
227 | - | ||
228 | - /** | ||
229 | - * set value of ProductIntroduction.categoryIndex | ||
230 | - * @param categoryIndex the categoryIndex to set | ||
231 | - * @createTime 2014年11月4日 下午5:29:24 | ||
232 | - * @author zhangshirui | ||
233 | - */ | ||
234 | - public void setCategoryIndex(Integer categoryIndex) { | ||
235 | - this.categoryIndex = categoryIndex; | ||
236 | - } | ||
237 | - | ||
238 | - | ||
239 | - public Long getSellerId() { | ||
240 | - return sellerId; | ||
241 | - } | ||
242 | - | ||
243 | - | ||
244 | - public void setSellerId(Long sellerId) { | ||
245 | - this.sellerId = sellerId; | ||
246 | - } | ||
247 | - | ||
248 | - | ||
249 | - public Float getPraiseRate() { | ||
250 | - return praiseRate; | ||
251 | - } | ||
252 | - | ||
253 | - | ||
254 | - public void setPraiseRate(Float praiseRate) { | ||
255 | - this.praiseRate = praiseRate; | ||
256 | - } | ||
257 | - | ||
258 | - | ||
259 | - public Integer getCommentNum() { | ||
260 | - return commentNum; | ||
261 | - } | ||
262 | - | ||
263 | - | ||
264 | - public void setCommentNum(Integer commentNum) { | ||
265 | - this.commentNum = commentNum; | ||
266 | - } | ||
267 | - | ||
268 | - public String getSingleBoxCount() { | ||
269 | - return singleBoxCount; | ||
270 | - } | ||
271 | - | ||
272 | - public void setSingleBoxCount(String singleBoxCount) { | ||
273 | - this.singleBoxCount = singleBoxCount; | ||
274 | - } | ||
275 | - | ||
276 | - public List<VideoInfo> getVideos() { | ||
277 | - return videos; | ||
278 | - } | ||
279 | - | ||
280 | - public void setVideos(List<VideoInfo> videos) { | ||
281 | - this.videos = videos; | ||
282 | - } | ||
283 | 13 | ||
284 | - public String getSingleBoxweight() { | ||
285 | - return singleBoxweight; | ||
286 | - } | ||
287 | 14 | ||
288 | - public void setSingleBoxweight(String singleBoxweight) { | ||
289 | - this.singleBoxweight = singleBoxweight; | ||
290 | - } | ||
291 | 15 | ||
292 | } | 16 | } |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/activity/SubmitActivityApplyRequest.java
@@ -22,7 +22,7 @@ public class SubmitActivityApplyRequest extends BaseReq { | @@ -22,7 +22,7 @@ public class SubmitActivityApplyRequest extends BaseReq { | ||
22 | private Long marketId; | 22 | private Long marketId; |
23 | 23 | ||
24 | 24 | ||
25 | - @Override | 25 | + |
26 | public Long getMarketId() { | 26 | public Long getMarketId() { |
27 | return marketId; | 27 | return marketId; |
28 | } | 28 | } |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/cart/ConfirmCartReq.java
1 | package com.diligrp.mobsite.getway.domain.protocol.cart; | 1 | package com.diligrp.mobsite.getway.domain.protocol.cart; |
2 | 2 | ||
3 | -import java.util.List; | ||
4 | - | ||
5 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; |
6 | 4 | ||
5 | +import java.util.List; | ||
6 | + | ||
7 | 7 | ||
8 | /** | 8 | /** |
9 | * <B>Description</B> 进货单确认请求 <br /> | 9 | * <B>Description</B> 进货单确认请求 <br /> |
@@ -19,16 +19,13 @@ public class ConfirmCartReq extends BaseReq{ | @@ -19,16 +19,13 @@ public class ConfirmCartReq extends BaseReq{ | ||
19 | /** | 19 | /** |
20 | * 商品sku进货单id | 20 | * 商品sku进货单id |
21 | */ | 21 | */ |
22 | - private List<Long> skuCartIds; | 22 | + private List<String> skus; |
23 | 23 | ||
24 | - | ||
25 | - public List<Long> getSkuCartIds() { | ||
26 | - return skuCartIds; | 24 | + public List<String> getSkus() { |
25 | + return skus; | ||
27 | } | 26 | } |
28 | 27 | ||
29 | - | ||
30 | - public void setSkuCartIds(List<Long> skuCartIds) { | ||
31 | - this.skuCartIds = skuCartIds; | 28 | + public void setSkus(List<String> skus) { |
29 | + this.skus = skus; | ||
32 | } | 30 | } |
33 | - | ||
34 | } | 31 | } |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/cart/DelCartsReq.java
1 | package com.diligrp.mobsite.getway.domain.protocol.cart; | 1 | package com.diligrp.mobsite.getway.domain.protocol.cart; |
2 | 2 | ||
3 | -import java.util.List; | ||
4 | - | ||
5 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; |
4 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | + | ||
6 | +import java.util.List; | ||
6 | 7 | ||
7 | 8 | ||
8 | /** | 9 | /** |
@@ -16,19 +17,15 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | @@ -16,19 +17,15 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | ||
16 | @SuppressWarnings("serial") | 17 | @SuppressWarnings("serial") |
17 | public class DelCartsReq extends BaseReq { | 18 | public class DelCartsReq extends BaseReq { |
18 | 19 | ||
19 | - /** | ||
20 | - * 进货单ids | ||
21 | - */ | ||
22 | - private List<Long> cartIds; | ||
23 | 20 | ||
24 | - | ||
25 | - public List<Long> getCartIds() { | ||
26 | - return cartIds; | 21 | + @ApiModelProperty(value = "skus",required = true) |
22 | + private List<String> skus; | ||
23 | + | ||
24 | + public List<String> getSkus() { | ||
25 | + return skus; | ||
27 | } | 26 | } |
28 | 27 | ||
29 | - | ||
30 | - public void setCartIds(List<Long> cartIds) { | ||
31 | - this.cartIds = cartIds; | 28 | + public void setSkus(List<String> skus) { |
29 | + this.skus = skus; | ||
32 | } | 30 | } |
33 | - | ||
34 | } | 31 | } |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/cart/DelConsigneeReq.java
1 | package com.diligrp.mobsite.getway.domain.protocol.cart; | 1 | package com.diligrp.mobsite.getway.domain.protocol.cart; |
2 | 2 | ||
3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; |
4 | +import io.swagger.annotations.ApiModelProperty; | ||
4 | 5 | ||
5 | /** | 6 | /** |
6 | * <B>Description</B> 删除提货人请求 <br /> | 7 | * <B>Description</B> 删除提货人请求 <br /> |
@@ -16,6 +17,7 @@ public class DelConsigneeReq extends BaseReq { | @@ -16,6 +17,7 @@ public class DelConsigneeReq extends BaseReq { | ||
16 | /** | 17 | /** |
17 | * 提货人ID | 18 | * 提货人ID |
18 | */ | 19 | */ |
20 | + @ApiModelProperty(value = "收货人id",required = true) | ||
19 | private Long id; | 21 | private Long id; |
20 | /** | 22 | /** |
21 | * 是否是默认 | 23 | * 是否是默认 |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/cart/GetCartByUserResp.java
1 | package com.diligrp.mobsite.getway.domain.protocol.cart; | 1 | package com.diligrp.mobsite.getway.domain.protocol.cart; |
2 | 2 | ||
3 | -import java.util.List; | ||
4 | - | ||
5 | import com.diligrp.mobsite.getway.domain.protocol.BaseResp; | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseResp; |
6 | import com.diligrp.mobsite.getway.domain.protocol.cart.model.CartProduct; | 4 | import com.diligrp.mobsite.getway.domain.protocol.cart.model.CartProduct; |
7 | -import com.diligrp.mobsite.getway.domain.protocol.cart.model.CartShopInfo; | 5 | + |
6 | +import java.util.List; | ||
8 | 7 | ||
9 | /** | 8 | /** |
10 | * <B>Description</B> 通过用户ID获取进货列表信息 <br /> | 9 | * <B>Description</B> 通过用户ID获取进货列表信息 <br /> |
@@ -21,85 +20,36 @@ public class GetCartByUserResp extends BaseResp { | @@ -21,85 +20,36 @@ public class GetCartByUserResp extends BaseResp { | ||
21 | /** | 20 | /** |
22 | * 根据提货点获取商品信息 | 21 | * 根据提货点获取商品信息 |
23 | */ | 22 | */ |
24 | - private List<CartShopInfo> cartShopInfo; | 23 | + //private List<CartShopInfo> cartShopInfo; |
25 | 24 | ||
26 | /** | 25 | /** |
27 | * 失效商品信息 | 26 | * 失效商品信息 |
28 | */ | 27 | */ |
29 | - private List<CartProduct> invalidProduct; | ||
30 | - | ||
31 | - /** | ||
32 | - * 失效商品数量 | ||
33 | - */ | ||
34 | - private Integer invalidProductNum; | 28 | + private List<CartProduct> cartGoods; |
29 | + | ||
30 | + ///** | ||
31 | + // * 失效商品数量 | ||
32 | + // */ | ||
33 | + //private Integer invalidProductNum; | ||
35 | 34 | ||
36 | /** | 35 | /** |
37 | * 总金额 | 36 | * 总金额 |
38 | */ | 37 | */ |
39 | private Long totalPrice; | 38 | private Long totalPrice; |
40 | 39 | ||
41 | - /** | ||
42 | - * 获取订单总金额 | ||
43 | - * | ||
44 | - * @return | ||
45 | - */ | ||
46 | - public Long getTotalPrice() { | ||
47 | - return totalPrice; | ||
48 | - } | ||
49 | - | ||
50 | - /** | ||
51 | - * 设置订单总金额 | ||
52 | - * | ||
53 | - * @param totalPrice | ||
54 | - */ | ||
55 | - public void setTotalPrice(Long totalPrice) { | ||
56 | - this.totalPrice = totalPrice; | ||
57 | - } | ||
58 | - | ||
59 | - | ||
60 | - /** | ||
61 | - * @return the invalidProduct | ||
62 | - */ | ||
63 | - public List<CartProduct> getInvalidProduct() { | ||
64 | - return invalidProduct; | ||
65 | - } | ||
66 | - | ||
67 | - /** | ||
68 | - * @param invalidProduct the invalidProduct to set | ||
69 | - */ | ||
70 | - public void setInvalidProduct(List<CartProduct> invalidProduct) { | ||
71 | - this.invalidProduct = invalidProduct; | ||
72 | - } | ||
73 | - | ||
74 | - | ||
75 | - /** | ||
76 | - * get value of GetCartByUserResp.invalidProductNum | ||
77 | - * @return the invalidProductNum | ||
78 | - * @createTime 2014年11月4日 下午6:07:33 | ||
79 | - * @author zhangshirui | ||
80 | - */ | ||
81 | - public Integer getInvalidProductNum() { | ||
82 | - return invalidProductNum; | 40 | + public List<CartProduct> getCartGoods() { |
41 | + return cartGoods; | ||
83 | } | 42 | } |
84 | 43 | ||
85 | - | ||
86 | - /** | ||
87 | - * set value of GetCartByUserResp.invalidProductNum | ||
88 | - * @param invalidProductNum the invalidProductNum to set | ||
89 | - * @createTime 2014年11月4日 下午6:07:33 | ||
90 | - * @author zhangshirui | ||
91 | - */ | ||
92 | - public void setInvalidProductNum(Integer invalidProductNum) { | ||
93 | - this.invalidProductNum = invalidProductNum; | 44 | + public void setCartGoods(List<CartProduct> cartGoods) { |
45 | + this.cartGoods = cartGoods; | ||
94 | } | 46 | } |
95 | 47 | ||
96 | - | ||
97 | - public List<CartShopInfo> getCartShopInfo() { | ||
98 | - return cartShopInfo; | 48 | + public Long getTotalPrice() { |
49 | + return totalPrice; | ||
99 | } | 50 | } |
100 | 51 | ||
101 | - | ||
102 | - public void setCartShopInfo(List<CartShopInfo> cartShopInfo) { | ||
103 | - this.cartShopInfo = cartShopInfo; | 52 | + public void setTotalPrice(Long totalPrice) { |
53 | + this.totalPrice = totalPrice; | ||
104 | } | 54 | } |
105 | } | 55 | } |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/cart/GetConsigneeReq.java
1 | package com.diligrp.mobsite.getway.domain.protocol.cart; | 1 | package com.diligrp.mobsite.getway.domain.protocol.cart; |
2 | 2 | ||
3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; |
4 | +import io.swagger.annotations.ApiModelProperty; | ||
4 | 5 | ||
5 | /** | 6 | /** |
6 | * <B>Description</B> 获取单个提货人信息 <br /> | 7 | * <B>Description</B> 获取单个提货人信息 <br /> |
@@ -16,6 +17,7 @@ public class GetConsigneeReq extends BaseReq { | @@ -16,6 +17,7 @@ public class GetConsigneeReq extends BaseReq { | ||
16 | /** | 17 | /** |
17 | * 提货人ID | 18 | * 提货人ID |
18 | */ | 19 | */ |
20 | + @ApiModelProperty(value = "收货人id",required = true) | ||
19 | private Long id; | 21 | private Long id; |
20 | 22 | ||
21 | public Long getId() { | 23 | public Long getId() { |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/cart/ModifyAmountReq.java
1 | package com.diligrp.mobsite.getway.domain.protocol.cart; | 1 | package com.diligrp.mobsite.getway.domain.protocol.cart; |
2 | 2 | ||
3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; |
4 | +import io.swagger.annotations.ApiModelProperty; | ||
4 | 5 | ||
5 | /** | 6 | /** |
6 | * <B>Description</B> 修改进货单商品数量信息 <br /> | 7 | * <B>Description</B> 修改进货单商品数量信息 <br /> |
@@ -15,13 +16,15 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | @@ -15,13 +16,15 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | ||
15 | public class ModifyAmountReq extends BaseReq { | 16 | public class ModifyAmountReq extends BaseReq { |
16 | 17 | ||
17 | /** | 18 | /** |
18 | - * 进货单id | 19 | + * sku |
19 | */ | 20 | */ |
20 | - private Long cartId; | 21 | + @ApiModelProperty(value = "sku",required = true) |
22 | + private String sku; | ||
21 | 23 | ||
22 | /** | 24 | /** |
23 | * 数量 | 25 | * 数量 |
24 | */ | 26 | */ |
27 | + @ApiModelProperty(value = "数量",required = true) | ||
25 | private Integer amount; | 28 | private Integer amount; |
26 | 29 | ||
27 | 30 | ||
@@ -45,14 +48,12 @@ public class ModifyAmountReq extends BaseReq { | @@ -45,14 +48,12 @@ public class ModifyAmountReq extends BaseReq { | ||
45 | public void setAmount(Integer amount) { | 48 | public void setAmount(Integer amount) { |
46 | this.amount = amount; | 49 | this.amount = amount; |
47 | } | 50 | } |
48 | - | ||
49 | - public Long getCartId() { | ||
50 | - return cartId; | ||
51 | - } | ||
52 | 51 | ||
52 | + public String getSku() { | ||
53 | + return sku; | ||
54 | + } | ||
53 | 55 | ||
54 | - | ||
55 | - public void setCartId(Long cartId) { | ||
56 | - this.cartId = cartId; | 56 | + public void setSku(String sku) { |
57 | + this.sku = sku; | ||
57 | } | 58 | } |
58 | } | 59 | } |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/cart/SetDefaultConsigneeReq.java
1 | package com.diligrp.mobsite.getway.domain.protocol.cart; | 1 | package com.diligrp.mobsite.getway.domain.protocol.cart; |
2 | 2 | ||
3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; |
4 | +import io.swagger.annotations.ApiModelProperty; | ||
4 | 5 | ||
5 | /** | 6 | /** |
6 | * <B>Description</B> 设置默认提货人请求 <br /> | 7 | * <B>Description</B> 设置默认提货人请求 <br /> |
@@ -16,6 +17,7 @@ public class SetDefaultConsigneeReq extends BaseReq { | @@ -16,6 +17,7 @@ public class SetDefaultConsigneeReq extends BaseReq { | ||
16 | /** | 17 | /** |
17 | * 提货人信息Id | 18 | * 提货人信息Id |
18 | */ | 19 | */ |
20 | + @ApiModelProperty(value = "收货人id") | ||
19 | private Long id; | 21 | private Long id; |
20 | 22 | ||
21 | public Long getId() { | 23 | public Long getId() { |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/cart/model/CartProduct.java
1 | package com.diligrp.mobsite.getway.domain.protocol.cart.model; | 1 | package com.diligrp.mobsite.getway.domain.protocol.cart.model; |
2 | 2 | ||
3 | import com.diligrp.mobsite.getway.domain.protocol.Goods; | 3 | import com.diligrp.mobsite.getway.domain.protocol.Goods; |
4 | +import io.swagger.annotations.ApiModelProperty; | ||
4 | 5 | ||
5 | import java.util.List; | 6 | import java.util.List; |
6 | 7 | ||
@@ -24,100 +25,77 @@ public class CartProduct extends Goods { | @@ -24,100 +25,77 @@ public class CartProduct extends Goods { | ||
24 | * 2-价格未变化 | 25 | * 2-价格未变化 |
25 | */ | 26 | */ |
26 | public static final int PRICE_NO_CHANGE = 2; | 27 | public static final int PRICE_NO_CHANGE = 2; |
28 | + | ||
29 | + | ||
30 | + | ||
31 | + @ApiModelProperty(value = "商品id") | ||
32 | + private Long pid; | ||
27 | 33 | ||
28 | /** | 34 | /** |
29 | * 商品的sku信息 | 35 | * 商品的sku信息 |
30 | */ | 36 | */ |
31 | - private List<CartProductSku> cartProductAttrs; | 37 | + @ApiModelProperty(value = "商品sku信息") |
38 | + private List<CartProductSku> cartGoodsSkus; | ||
32 | /** | 39 | /** |
33 | * 购买量 | 40 | * 购买量 |
34 | */ | 41 | */ |
35 | - private Integer buyNum; | 42 | + @ApiModelProperty(value = "数量") |
43 | + private Integer quantity; | ||
36 | /** | 44 | /** |
37 | * 库存 | 45 | * 库存 |
38 | */ | 46 | */ |
39 | private Long stockNum; | 47 | private Long stockNum; |
40 | - /** | ||
41 | - * 价格是否变化 | ||
42 | - * 1-价格变化 | ||
43 | - * 2-价格未变化 | ||
44 | - */ | ||
45 | - private Integer isPriceChange = PRICE_NO_CHANGE; | 48 | + |
46 | /** | 49 | /** |
47 | * 卖家id | 50 | * 卖家id |
48 | */ | 51 | */ |
49 | private Long sellerId; | 52 | private Long sellerId; |
50 | 53 | ||
51 | - /** | ||
52 | - *是否支持第三方快递 1不支持 2支持 | ||
53 | - * */ | ||
54 | - private Integer hasExpress; | ||
55 | - | ||
56 | - /** | ||
57 | - *重量单位 克 | ||
58 | - * */ | ||
59 | - private Long unitTog; | ||
60 | - | ||
61 | 54 | ||
62 | 55 | ||
63 | - public Integer getHasExpress() { | ||
64 | - return hasExpress; | ||
65 | - } | ||
66 | 56 | ||
67 | - public void setHasExpress(Integer hasExpress) { | ||
68 | - this.hasExpress = hasExpress; | ||
69 | - } | ||
70 | 57 | ||
71 | - public Long getUnitTog() { | ||
72 | - return unitTog; | ||
73 | - } | ||
74 | 58 | ||
75 | - public void setUnitTog(Long unitTog) { | ||
76 | - this.unitTog = unitTog; | ||
77 | - } | ||
78 | - | ||
79 | - public Long getStockNum() { | ||
80 | - return stockNum; | 59 | + public Long getPid() { |
60 | + return pid; | ||
81 | } | 61 | } |
82 | 62 | ||
83 | - public void setStockNum(Long stockNum) { | ||
84 | - this.stockNum = stockNum; | 63 | + public void setPid(Long pid) { |
64 | + this.pid = pid; | ||
85 | } | 65 | } |
86 | 66 | ||
87 | - public List<CartProductSku> getCartProductAttrs() { | ||
88 | - return cartProductAttrs; | 67 | + public List<CartProductSku> getCartGoodsSkus() { |
68 | + return cartGoodsSkus; | ||
89 | } | 69 | } |
90 | 70 | ||
91 | - public void setCartProductAttrs(List<CartProductSku> cartProductAttrs) { | ||
92 | - this.cartProductAttrs = cartProductAttrs; | 71 | + public void setCartGoodsSkus(List<CartProductSku> cartGoodsSkus) { |
72 | + this.cartGoodsSkus = cartGoodsSkus; | ||
93 | } | 73 | } |
94 | 74 | ||
95 | - public Integer getBuyNum() { | ||
96 | - return buyNum; | 75 | + public Integer getQuantity() { |
76 | + return quantity; | ||
97 | } | 77 | } |
98 | 78 | ||
99 | - | ||
100 | - public void setBuyNum(Integer buyNum) { | ||
101 | - this.buyNum = buyNum; | 79 | + public void setQuantity(Integer quantity) { |
80 | + this.quantity = quantity; | ||
102 | } | 81 | } |
103 | - | ||
104 | - public Integer getIsPriceChange() { | ||
105 | - return isPriceChange; | 82 | + |
83 | + public Long getStockNum() { | ||
84 | + return stockNum; | ||
106 | } | 85 | } |
107 | 86 | ||
108 | - | ||
109 | - public void setIsPriceChange(Integer isPriceChange) { | ||
110 | - this.isPriceChange = isPriceChange; | 87 | + public void setStockNum(Long stockNum) { |
88 | + this.stockNum = stockNum; | ||
111 | } | 89 | } |
112 | 90 | ||
113 | - | ||
114 | public Long getSellerId() { | 91 | public Long getSellerId() { |
115 | return sellerId; | 92 | return sellerId; |
116 | } | 93 | } |
117 | 94 | ||
118 | - | ||
119 | public void setSellerId(Long sellerId) { | 95 | public void setSellerId(Long sellerId) { |
120 | this.sellerId = sellerId; | 96 | this.sellerId = sellerId; |
121 | } | 97 | } |
122 | 98 | ||
99 | + | ||
100 | + | ||
123 | } | 101 | } |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/common/GetProductCategoryReq.java
@@ -13,32 +13,11 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | @@ -13,32 +13,11 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | ||
13 | @SuppressWarnings("serial") | 13 | @SuppressWarnings("serial") |
14 | public class GetProductCategoryReq extends BaseReq { | 14 | public class GetProductCategoryReq extends BaseReq { |
15 | 15 | ||
16 | - /** | ||
17 | - * 1-包含是否关注信息 | ||
18 | - */ | ||
19 | - public static final Integer RANGE_ALL = 1; | ||
20 | - /** | ||
21 | - * 2-没有是否关注信息,只有分类信息 | ||
22 | - */ | ||
23 | - public static final Integer RANGE_STANDARD = 2; | ||
24 | - | 16 | + |
25 | /** | 17 | /** |
26 | * 父级分类ID | 18 | * 父级分类ID |
27 | */ | 19 | */ |
28 | private Long id; | 20 | private Long id; |
29 | - /** | ||
30 | - * 1-包含是否关注信息 | ||
31 | - * 2-没有是否关注信息,只有分类信息 | ||
32 | - */ | ||
33 | - private Integer range; | ||
34 | - | ||
35 | - public Integer getRange() { | ||
36 | - return range; | ||
37 | - } | ||
38 | - | ||
39 | - public void setRange(Integer range) { | ||
40 | - this.range = range; | ||
41 | - } | ||
42 | 21 | ||
43 | /** | 22 | /** |
44 | * get value of GetProductCategoryReq.id | 23 | * get value of GetProductCategoryReq.id |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/detail/GetShopIntroductionResp.java renamed to mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/detail/BindToShopReq.java
1 | package com.diligrp.mobsite.getway.domain.protocol.detail; | 1 | package com.diligrp.mobsite.getway.domain.protocol.detail; |
2 | 2 | ||
3 | -import com.diligrp.mobsite.getway.domain.protocol.BaseResp; | ||
4 | -import com.diligrp.mobsite.getway.domain.protocol.ShopIntroduction; | 3 | +import com.diligrp.mobsite.getway.domain.protocol.BaseReq; |
4 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | 5 | ||
6 | /** | 6 | /** |
7 | - * <B>Description</B> 店铺简介响应 <br /> | 7 | + * <B>Description</B> 获取店铺简介 <br /> |
8 | * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | 8 | * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> |
9 | * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | 9 | * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> |
10 | * <B>Company</B> 地利集团 | 10 | * <B>Company</B> 地利集团 |
11 | - * @createTime Aug 18, 2014 11:07:07 AM | 11 | + * @createTime Aug 18, 2014 11:06:21 AM |
12 | * @author wujianjun | 12 | * @author wujianjun |
13 | */ | 13 | */ |
14 | @SuppressWarnings("serial") | 14 | @SuppressWarnings("serial") |
15 | -public class GetShopIntroductionResp extends BaseResp { | 15 | +public class BindToShopReq extends BaseReq { |
16 | 16 | ||
17 | /** | 17 | /** |
18 | - * 店铺简介信息 | 18 | + * 店铺code |
19 | */ | 19 | */ |
20 | - private ShopIntroduction shopIntroduction; | 20 | + @ApiModelProperty(value = "店铺code",required = true) |
21 | + private Integer shopAuthCode; | ||
21 | 22 | ||
22 | - public ShopIntroduction getShopIntroduction() { | ||
23 | - return shopIntroduction; | ||
24 | - } | ||
25 | 23 | ||
26 | - public void setShopIntroduction(ShopIntroduction shopIntroduction) { | ||
27 | - this.shopIntroduction = shopIntroduction; | 24 | + public Integer getShopAuthCode() { |
25 | + return shopAuthCode; | ||
28 | } | 26 | } |
29 | 27 | ||
28 | + public void setShopAuthCode(Integer shopAuthCode) { | ||
29 | + this.shopAuthCode = shopAuthCode; | ||
30 | + } | ||
30 | } | 31 | } |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/detail/BindToShopResp.java
0 → 100644
1 | +package com.diligrp.mobsite.getway.domain.protocol.detail; | ||
2 | + | ||
3 | +import com.diligrp.mobsite.getway.domain.protocol.BaseResp; | ||
4 | + | ||
5 | +/** | ||
6 | + * <B>Description</B> 店铺简介响应 <br /> | ||
7 | + * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | ||
8 | + * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | ||
9 | + * <B>Company</B> 地利集团 | ||
10 | + * @createTime Aug 18, 2014 11:07:07 AM | ||
11 | + * @author wujianjun | ||
12 | + */ | ||
13 | +@SuppressWarnings("serial") | ||
14 | +public class BindToShopResp extends BaseResp { | ||
15 | + | ||
16 | + private Long shopId; | ||
17 | + | ||
18 | + private String shopName; | ||
19 | + | ||
20 | + private String logo; | ||
21 | + | ||
22 | + | ||
23 | + public Long getShopId() { | ||
24 | + return shopId; | ||
25 | + } | ||
26 | + | ||
27 | + public void setShopId(Long shopId) { | ||
28 | + this.shopId = shopId; | ||
29 | + } | ||
30 | + | ||
31 | + public String getShopName() { | ||
32 | + return shopName; | ||
33 | + } | ||
34 | + | ||
35 | + public void setShopName(String shopName) { | ||
36 | + this.shopName = shopName; | ||
37 | + } | ||
38 | + | ||
39 | + public String getLogo() { | ||
40 | + return logo; | ||
41 | + } | ||
42 | + | ||
43 | + public void setLogo(String logo) { | ||
44 | + this.logo = logo; | ||
45 | + } | ||
46 | +} |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/detail/GetProductIntroductionReq.java
@@ -8,7 +8,7 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | @@ -8,7 +8,7 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | ||
8 | * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | 8 | * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> |
9 | * <B>Company</B> 地利集团 | 9 | * <B>Company</B> 地利集团 |
10 | * @createTime Aug 14, 2014 8:22:00 PM | 10 | * @createTime Aug 14, 2014 8:22:00 PM |
11 | - * @author wujianjun | 11 | + * @author weili |
12 | */ | 12 | */ |
13 | @SuppressWarnings("serial") | 13 | @SuppressWarnings("serial") |
14 | public class GetProductIntroductionReq extends BaseReq { | 14 | public class GetProductIntroductionReq extends BaseReq { |
@@ -17,18 +17,12 @@ public class GetProductIntroductionReq extends BaseReq { | @@ -17,18 +17,12 @@ public class GetProductIntroductionReq extends BaseReq { | ||
17 | * 商品ID | 17 | * 商品ID |
18 | */ | 18 | */ |
19 | private Long id; | 19 | private Long id; |
20 | - | ||
21 | - /** | ||
22 | - * 市场全称 | ||
23 | - */ | ||
24 | - @Deprecated | ||
25 | - private String marketFullName; | ||
26 | 20 | ||
27 | /** | 21 | /** |
28 | * get value of GetProductIntroductionReq.id | 22 | * get value of GetProductIntroductionReq.id |
29 | * @return the id | 23 | * @return the id |
30 | * @createTime Aug 14, 2014 8:23:49 PM | 24 | * @createTime Aug 14, 2014 8:23:49 PM |
31 | - * @author wujianjun | 25 | + * @author weili |
32 | */ | 26 | */ |
33 | public Long getId() { | 27 | public Long getId() { |
34 | return id; | 28 | return id; |
@@ -38,32 +32,12 @@ public class GetProductIntroductionReq extends BaseReq { | @@ -38,32 +32,12 @@ public class GetProductIntroductionReq extends BaseReq { | ||
38 | * set value of GetProductIntroductionReq.id | 32 | * set value of GetProductIntroductionReq.id |
39 | * @param id the id to set | 33 | * @param id the id to set |
40 | * @createTime Aug 14, 2014 8:23:49 PM | 34 | * @createTime Aug 14, 2014 8:23:49 PM |
41 | - * @author wujianjun | 35 | + * @author weili |
42 | */ | 36 | */ |
43 | public void setId(Long id) { | 37 | public void setId(Long id) { |
44 | this.id = id; | 38 | this.id = id; |
45 | } | 39 | } |
46 | 40 | ||
47 | 41 | ||
48 | - /** | ||
49 | - * get value of GetProductIntroductionReq.marketFullName | ||
50 | - * @return the marketFullName | ||
51 | - * @createTime 2014年11月4日 下午5:44:21 | ||
52 | - * @author zhangshirui | ||
53 | - */ | ||
54 | - public String getMarketFullName() { | ||
55 | - return marketFullName; | ||
56 | - } | ||
57 | - | ||
58 | - | ||
59 | - /** | ||
60 | - * set value of GetProductIntroductionReq.marketFullName | ||
61 | - * @param marketFullName the marketFullName to set | ||
62 | - * @createTime 2014年11月4日 下午5:44:21 | ||
63 | - * @author zhangshirui | ||
64 | - */ | ||
65 | - public void setMarketFullName(String marketFullName) { | ||
66 | - this.marketFullName = marketFullName; | ||
67 | - } | ||
68 | 42 | ||
69 | } | 43 | } |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/detail/GetProductRecommendReq.java
@@ -14,65 +14,15 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | @@ -14,65 +14,15 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | ||
14 | public class GetProductRecommendReq extends BaseReq { | 14 | public class GetProductRecommendReq extends BaseReq { |
15 | 15 | ||
16 | /** | 16 | /** |
17 | - * 商品ID | 17 | + * 店铺ID |
18 | */ | 18 | */ |
19 | - private Long id; | ||
20 | - /** | ||
21 | - * 商品分类ID | ||
22 | - */ | ||
23 | - private Long categoryId; | ||
24 | - | ||
25 | - /** | ||
26 | - * exclude productId | ||
27 | - */ | ||
28 | - private long[] filterProductIds; | ||
29 | - | ||
30 | - public long[] getFilterProductIds() { | ||
31 | - return filterProductIds; | ||
32 | - } | ||
33 | - | ||
34 | - public void setFilterProductIds(long[] filterProductIds) { | ||
35 | - this.filterProductIds = filterProductIds; | ||
36 | - } | ||
37 | - | ||
38 | - /** | ||
39 | - * get value of GetProductRecommendReq.id | ||
40 | - * @return the id | ||
41 | - * @createTime Aug 14, 2014 8:42:34 PM | ||
42 | - * @author wujianjun | ||
43 | - */ | ||
44 | - public Long getId() { | ||
45 | - return id; | ||
46 | - } | 19 | + private Long shopId; |
47 | 20 | ||
48 | - /** | ||
49 | - * set value of GetProductRecommendReq.id | ||
50 | - * @param id the id to set | ||
51 | - * @createTime Aug 14, 2014 8:42:34 PM | ||
52 | - * @author wujianjun | ||
53 | - */ | ||
54 | - public void setId(Long id) { | ||
55 | - this.id = id; | 21 | + public Long getShopId() { |
22 | + return shopId; | ||
56 | } | 23 | } |
57 | 24 | ||
58 | - /** | ||
59 | - * get value of GetProductRecommendReq.categoryId | ||
60 | - * @return the categoryId | ||
61 | - * @createTime Aug 14, 2014 8:42:34 PM | ||
62 | - * @author wujianjun | ||
63 | - */ | ||
64 | - public Long getCategoryId() { | ||
65 | - return categoryId; | 25 | + public void setShopId(Long shopId) { |
26 | + this.shopId = shopId; | ||
66 | } | 27 | } |
67 | - | ||
68 | - /** | ||
69 | - * set value of GetProductRecommendReq.categoryId | ||
70 | - * @param categoryId the categoryId to set | ||
71 | - * @createTime Aug 14, 2014 8:42:34 PM | ||
72 | - * @author wujianjun | ||
73 | - */ | ||
74 | - public void setCategoryId(Long categoryId) { | ||
75 | - this.categoryId = categoryId; | ||
76 | - } | ||
77 | - | ||
78 | } | 28 | } |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/detail/GetProductRecommendResp.java
1 | package com.diligrp.mobsite.getway.domain.protocol.detail; | 1 | package com.diligrp.mobsite.getway.domain.protocol.detail; |
2 | 2 | ||
3 | -import java.util.List; | ||
4 | - | ||
5 | import com.diligrp.mobsite.getway.domain.protocol.BaseResp; | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseResp; |
6 | -import com.diligrp.mobsite.getway.domain.protocol.Goods; | 4 | +import com.diligrp.mobsite.getway.domain.protocol.GoodsSuper; |
5 | + | ||
6 | +import java.util.List; | ||
7 | 7 | ||
8 | /** | 8 | /** |
9 | * <B>Description</B> 获取商品推荐响应 <br /> | 9 | * <B>Description</B> 获取商品推荐响应 <br /> |
@@ -19,7 +19,7 @@ public class GetProductRecommendResp extends BaseResp { | @@ -19,7 +19,7 @@ public class GetProductRecommendResp extends BaseResp { | ||
19 | /** | 19 | /** |
20 | * 商品列表 | 20 | * 商品列表 |
21 | */ | 21 | */ |
22 | - private List<Goods> goods; | 22 | + private List<GoodsSuper> goods; |
23 | 23 | ||
24 | /** | 24 | /** |
25 | * get value of GetProductRecommendResp.goods | 25 | * get value of GetProductRecommendResp.goods |
@@ -27,7 +27,7 @@ public class GetProductRecommendResp extends BaseResp { | @@ -27,7 +27,7 @@ public class GetProductRecommendResp extends BaseResp { | ||
27 | * @createTime Aug 14, 2014 8:43:27 PM | 27 | * @createTime Aug 14, 2014 8:43:27 PM |
28 | * @author wujianjun | 28 | * @author wujianjun |
29 | */ | 29 | */ |
30 | - public List<Goods> getGoods() { | 30 | + public List<GoodsSuper> getGoods() { |
31 | return goods; | 31 | return goods; |
32 | } | 32 | } |
33 | 33 | ||
@@ -37,7 +37,7 @@ public class GetProductRecommendResp extends BaseResp { | @@ -37,7 +37,7 @@ public class GetProductRecommendResp extends BaseResp { | ||
37 | * @createTime Aug 14, 2014 8:43:27 PM | 37 | * @createTime Aug 14, 2014 8:43:27 PM |
38 | * @author wujianjun | 38 | * @author wujianjun |
39 | */ | 39 | */ |
40 | - public void setGoods(List<Goods> goods) { | 40 | + public void setGoods(List<GoodsSuper> goods) { |
41 | this.goods = goods; | 41 | this.goods = goods; |
42 | } | 42 | } |
43 | 43 |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/detail/GetShopByIdReq.java
0 → 100644
1 | +package com.diligrp.mobsite.getway.domain.protocol.detail; | ||
2 | + | ||
3 | +import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | ||
4 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | + | ||
6 | +/** | ||
7 | + * Created by xxxzzz on 2016/12/9. | ||
8 | + */ | ||
9 | +public class GetShopByIdReq extends BaseReq{ | ||
10 | + | ||
11 | + @ApiModelProperty(value = "店铺id",required = true) | ||
12 | + private Long id; | ||
13 | + | ||
14 | + | ||
15 | + public Long getId() { | ||
16 | + return id; | ||
17 | + } | ||
18 | + | ||
19 | + public void setId(Long id) { | ||
20 | + this.id = id; | ||
21 | + } | ||
22 | +} |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/detail/GetShopByIdResp.java
0 → 100644
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/detail/GetShopIntroductionReq.java deleted
100644 → 0
1 | -package com.diligrp.mobsite.getway.domain.protocol.detail; | ||
2 | - | ||
3 | -import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | ||
4 | - | ||
5 | -/** | ||
6 | - * <B>Description</B> 获取店铺简介 <br /> | ||
7 | - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | ||
8 | - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | ||
9 | - * <B>Company</B> 地利集团 | ||
10 | - * @createTime Aug 18, 2014 11:06:21 AM | ||
11 | - * @author wujianjun | ||
12 | - */ | ||
13 | -@SuppressWarnings("serial") | ||
14 | -public class GetShopIntroductionReq extends BaseReq { | ||
15 | - | ||
16 | - /** | ||
17 | - * 店铺ID | ||
18 | - */ | ||
19 | - private Long id; | ||
20 | - /** | ||
21 | - * 店铺二级域名 | ||
22 | - */ | ||
23 | - private String domain; | ||
24 | - | ||
25 | - | ||
26 | - public String getDomain() { | ||
27 | - return domain; | ||
28 | - } | ||
29 | - | ||
30 | - public void setDomain(String domain) { | ||
31 | - this.domain = domain; | ||
32 | - } | ||
33 | - | ||
34 | - /** | ||
35 | - * get value of GetShopIntroductionReq.id | ||
36 | - * @return the id | ||
37 | - * @createTime Aug 18, 2014 11:06:44 AM | ||
38 | - * @author wujianjun | ||
39 | - */ | ||
40 | - public Long getId() { | ||
41 | - return id; | ||
42 | - } | ||
43 | - | ||
44 | - /** | ||
45 | - * set value of GetShopIntroductionReq.id | ||
46 | - * @param id the id to set | ||
47 | - * @createTime Aug 18, 2014 11:06:44 AM | ||
48 | - * @author wujianjun | ||
49 | - */ | ||
50 | - public void setId(Long id) { | ||
51 | - this.id = id; | ||
52 | - } | ||
53 | - | ||
54 | -} |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/login/CheckVeriCodeReq.java
1 | package com.diligrp.mobsite.getway.domain.protocol.login; | 1 | package com.diligrp.mobsite.getway.domain.protocol.login; |
2 | 2 | ||
3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; |
4 | +import io.swagger.annotations.ApiModel; | ||
5 | +import io.swagger.annotations.ApiModelProperty; | ||
4 | 6 | ||
5 | /** | 7 | /** |
6 | * <B>Description</B> 检测手机验证码是否一致 <br /> | 8 | * <B>Description</B> 检测手机验证码是否一致 <br /> |
@@ -11,15 +13,18 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | @@ -11,15 +13,18 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | ||
11 | * @author wujianjun | 13 | * @author wujianjun |
12 | */ | 14 | */ |
13 | @SuppressWarnings("serial") | 15 | @SuppressWarnings("serial") |
16 | +@ApiModel | ||
14 | public class CheckVeriCodeReq extends BaseReq { | 17 | public class CheckVeriCodeReq extends BaseReq { |
15 | 18 | ||
16 | /** | 19 | /** |
17 | * 手机验证码 | 20 | * 手机验证码 |
18 | */ | 21 | */ |
22 | + @ApiModelProperty(value = "验证码") | ||
19 | private String veriCode; | 23 | private String veriCode; |
20 | /** | 24 | /** |
21 | * 手机号码 | 25 | * 手机号码 |
22 | */ | 26 | */ |
27 | + @ApiModelProperty(value = "手机号码") | ||
23 | private String mobile; | 28 | private String mobile; |
24 | /** | 29 | /** |
25 | * 消息类型 | 30 | * 消息类型 |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/login/CheckVeriCodeResp.java
@@ -22,7 +22,6 @@ public class CheckVeriCodeResp extends BaseResp { | @@ -22,7 +22,6 @@ public class CheckVeriCodeResp extends BaseResp { | ||
22 | /** | 22 | /** |
23 | * 验证结果:1-验证码正确,2验证码错误 | 23 | * 验证结果:1-验证码正确,2验证码错误 |
24 | */ | 24 | */ |
25 | - //TODO 后期需要删除 | ||
26 | @Deprecated | 25 | @Deprecated |
27 | private Integer checkFlag = CHECK_FLAG_RIGHT; | 26 | private Integer checkFlag = CHECK_FLAG_RIGHT; |
28 | 27 |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/login/LoginReq.java
1 | package com.diligrp.mobsite.getway.domain.protocol.login; | 1 | package com.diligrp.mobsite.getway.domain.protocol.login; |
2 | 2 | ||
3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; |
4 | +import io.swagger.annotations.ApiModelProperty; | ||
4 | 5 | ||
5 | /** | 6 | /** |
6 | * <B>Description</B> 登录请求 <br /> | 7 | * <B>Description</B> 登录请求 <br /> |
@@ -10,22 +11,33 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | @@ -10,22 +11,33 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | ||
10 | * @createTime Aug 12, 2014 7:57:01 PM | 11 | * @createTime Aug 12, 2014 7:57:01 PM |
11 | * @author wujianjun | 12 | * @author wujianjun |
12 | */ | 13 | */ |
13 | -@SuppressWarnings("serial") | ||
14 | public class LoginReq extends BaseReq { | 14 | public class LoginReq extends BaseReq { |
15 | 15 | ||
16 | /** | 16 | /** |
17 | * 会员名称 | 17 | * 会员名称 |
18 | */ | 18 | */ |
19 | + @ApiModelProperty(value = "登录账号",required = true) | ||
19 | private String accountName; | 20 | private String accountName; |
20 | /** | 21 | /** |
21 | * 密码 | 22 | * 密码 |
22 | */ | 23 | */ |
24 | + @ApiModelProperty(value = "登录密码",required = true) | ||
23 | private String password; | 25 | private String password; |
26 | + | ||
24 | /** | 27 | /** |
25 | - * 极光推送-三方系统ID | 28 | + * 密码 |
26 | */ | 29 | */ |
30 | + @ApiModelProperty(value = "验证码") | ||
31 | + private String authCode; | ||
32 | + | ||
33 | + | ||
34 | + //极光ID | ||
27 | private String registerNo; | 35 | private String registerNo; |
28 | 36 | ||
37 | + | ||
38 | + public LoginReq() { | ||
39 | + } | ||
40 | + | ||
29 | public String getRegisterNo() { | 41 | public String getRegisterNo() { |
30 | return registerNo; | 42 | return registerNo; |
31 | } | 43 | } |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/login/LoginResp.java
1 | package com.diligrp.mobsite.getway.domain.protocol.login; | 1 | package com.diligrp.mobsite.getway.domain.protocol.login; |
2 | 2 | ||
3 | import com.diligrp.mobsite.getway.domain.protocol.BaseResp; | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseResp; |
4 | +import io.swagger.annotations.ApiModel; | ||
5 | +import io.swagger.annotations.ApiModelProperty; | ||
4 | 6 | ||
5 | 7 | ||
6 | /** | 8 | /** |
@@ -12,6 +14,7 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseResp; | @@ -12,6 +14,7 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseResp; | ||
12 | * @author wujianjun | 14 | * @author wujianjun |
13 | */ | 15 | */ |
14 | @SuppressWarnings("serial") | 16 | @SuppressWarnings("serial") |
17 | +@ApiModel("返回参数") | ||
15 | public class LoginResp extends BaseResp { | 18 | public class LoginResp extends BaseResp { |
16 | 19 | ||
17 | /** | 20 | /** |
@@ -54,22 +57,27 @@ public class LoginResp extends BaseResp { | @@ -54,22 +57,27 @@ public class LoginResp extends BaseResp { | ||
54 | /** | 57 | /** |
55 | * 账户ID | 58 | * 账户ID |
56 | */ | 59 | */ |
60 | + @ApiModelProperty(value = "账号") | ||
57 | private Long accountId; | 61 | private Long accountId; |
58 | /** | 62 | /** |
59 | * 账户名 | 63 | * 账户名 |
60 | */ | 64 | */ |
65 | + @ApiModelProperty(value = "账号") | ||
61 | private String accountName; | 66 | private String accountName; |
62 | /** | 67 | /** |
63 | * 手机号码 | 68 | * 手机号码 |
64 | */ | 69 | */ |
70 | + @ApiModelProperty(value = "手机号码") | ||
65 | private String mobile; | 71 | private String mobile; |
66 | /** | 72 | /** |
67 | * 邮箱地址 | 73 | * 邮箱地址 |
68 | */ | 74 | */ |
75 | + @ApiModelProperty(value = "邮箱") | ||
69 | private String email; | 76 | private String email; |
70 | /** | 77 | /** |
71 | * 1:个人用户, 2:企业用户 | 78 | * 1:个人用户, 2:企业用户 |
72 | */ | 79 | */ |
80 | + @ApiModelProperty(value = "用户类型:个人用户,2:企业用户") | ||
73 | private Integer userType; | 81 | private Integer userType; |
74 | /** | 82 | /** |
75 | * 1 登入 -1 登出 (出场验货专用) | 83 | * 1 登入 -1 登出 (出场验货专用) |
@@ -78,20 +86,24 @@ public class LoginResp extends BaseResp { | @@ -78,20 +86,24 @@ public class LoginResp extends BaseResp { | ||
78 | /** | 86 | /** |
79 | * 真实姓名 | 87 | * 真实姓名 |
80 | */ | 88 | */ |
89 | + @ApiModelProperty(value = "真实姓名") | ||
81 | private String realName; | 90 | private String realName; |
82 | /** | 91 | /** |
83 | * 登录之后,passport返回 | 92 | * 登录之后,passport返回 |
84 | * 用于支付鉴权 | 93 | * 用于支付鉴权 |
85 | */ | 94 | */ |
95 | + @ApiModelProperty(value = "token") | ||
86 | private String token; | 96 | private String token; |
87 | /** | 97 | /** |
88 | * 头像图片 | 98 | * 头像图片 |
89 | */ | 99 | */ |
100 | + @ApiModelProperty(value = "头像") | ||
90 | private String headImg; | 101 | private String headImg; |
91 | 102 | ||
92 | /** | 103 | /** |
93 | * 用户信息是否完善:1-完善 0-不完善 | 104 | * 用户信息是否完善:1-完善 0-不完善 |
94 | */ | 105 | */ |
106 | + @ApiModelProperty(value = "用户信息是否完善:1-完善 0-不完善") | ||
95 | private Integer infoCompleteFlag; | 107 | private Integer infoCompleteFlag; |
96 | /** | 108 | /** |
97 | * get value of LoginResp.accountId | 109 | * get value of LoginResp.accountId |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/login/SendVeriCodeReq.java
1 | package com.diligrp.mobsite.getway.domain.protocol.login; | 1 | package com.diligrp.mobsite.getway.domain.protocol.login; |
2 | 2 | ||
3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; |
4 | +import io.swagger.annotations.ApiModelProperty; | ||
4 | 5 | ||
5 | 6 | ||
6 | /** | 7 | /** |
@@ -30,10 +31,12 @@ public class SendVeriCodeReq extends BaseReq { | @@ -30,10 +31,12 @@ public class SendVeriCodeReq extends BaseReq { | ||
30 | /** | 31 | /** |
31 | * 电话号码 | 32 | * 电话号码 |
32 | */ | 33 | */ |
34 | + @ApiModelProperty(value = "手机号码",required = true) | ||
33 | private String mobile; | 35 | private String mobile; |
34 | /** | 36 | /** |
35 | * 消息类型 | 37 | * 消息类型 |
36 | */ | 38 | */ |
39 | + @ApiModelProperty(value = "消息类型",required = false) | ||
37 | private Integer msgType; | 40 | private Integer msgType; |
38 | 41 | ||
39 | 42 |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/login/SendVeriCodeResp.java
1 | package com.diligrp.mobsite.getway.domain.protocol.login; | 1 | package com.diligrp.mobsite.getway.domain.protocol.login; |
2 | 2 | ||
3 | import com.diligrp.mobsite.getway.domain.protocol.BaseResp; | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseResp; |
4 | +import io.swagger.annotations.ApiModelProperty; | ||
4 | 5 | ||
5 | 6 | ||
6 | /** | 7 | /** |
@@ -27,8 +28,7 @@ public class SendVeriCodeResp extends BaseResp { | @@ -27,8 +28,7 @@ public class SendVeriCodeResp extends BaseResp { | ||
27 | /** | 28 | /** |
28 | * 发送结果 | 29 | * 发送结果 |
29 | */ | 30 | */ |
30 | - @Deprecated | ||
31 | - //后期需要删除 | 31 | + @ApiModelProperty(value = "发送结果") |
32 | private Integer sendCode = SEND_CODE_ERROR; | 32 | private Integer sendCode = SEND_CODE_ERROR; |
33 | /** | 33 | /** |
34 | * 万能验证码 | 34 | * 万能验证码 |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/market/GetMarketByIdReq.java
@@ -9,7 +9,7 @@ public class GetMarketByIdReq extends BaseReq{ | @@ -9,7 +9,7 @@ public class GetMarketByIdReq extends BaseReq{ | ||
9 | private Long marketId; | 9 | private Long marketId; |
10 | 10 | ||
11 | 11 | ||
12 | - @Override | 12 | + |
13 | public Long getMarketId() { | 13 | public Long getMarketId() { |
14 | return marketId; | 14 | return marketId; |
15 | } | 15 | } |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/register/UserRegisterReq.java
1 | package com.diligrp.mobsite.getway.domain.protocol.register; | 1 | package com.diligrp.mobsite.getway.domain.protocol.register; |
2 | 2 | ||
3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; |
4 | +import io.swagger.annotations.ApiModel; | ||
5 | +import io.swagger.annotations.ApiModelProperty; | ||
4 | 6 | ||
5 | /** | 7 | /** |
6 | * <B>Description</B> 注册个人用户请求 <br /> | 8 | * <B>Description</B> 注册个人用户请求 <br /> |
@@ -10,7 +12,7 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | @@ -10,7 +12,7 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | ||
10 | * @createTime Aug 12, 2014 7:48:27 PM | 12 | * @createTime Aug 12, 2014 7:48:27 PM |
11 | * @author wujianjun | 13 | * @author wujianjun |
12 | */ | 14 | */ |
13 | -@SuppressWarnings("serial") | 15 | +@ApiModel(value = "请求参数") |
14 | public class UserRegisterReq extends BaseReq { | 16 | public class UserRegisterReq extends BaseReq { |
15 | 17 | ||
16 | public static final int USER_TYPE_BUSINESS = 1;//市场商户,企业单位,个体经营,个人 | 18 | public static final int USER_TYPE_BUSINESS = 1;//市场商户,企业单位,个体经营,个人 |
@@ -24,33 +26,44 @@ public class UserRegisterReq extends BaseReq { | @@ -24,33 +26,44 @@ public class UserRegisterReq extends BaseReq { | ||
24 | /** | 26 | /** |
25 | * 手机号码 | 27 | * 手机号码 |
26 | */ | 28 | */ |
29 | + @ApiModelProperty(value = "手机号码",required = true) | ||
27 | protected String mobile; | 30 | protected String mobile; |
28 | 31 | ||
29 | /** | 32 | /** |
30 | * 密码 | 33 | * 密码 |
31 | */ | 34 | */ |
35 | + @ApiModelProperty(value = "密码",required = true) | ||
32 | protected String password; | 36 | protected String password; |
33 | - /** | ||
34 | - * 用户类型 | ||
35 | - */ | ||
36 | - private Integer userType; | 37 | + ///** |
38 | + // * 用户类型 | ||
39 | + // */ | ||
40 | + //private Integer userType; | ||
37 | /** | 41 | /** |
38 | * 手机验证码 | 42 | * 手机验证码 |
39 | */ | 43 | */ |
44 | + @ApiModelProperty(value = "手机验证码",required = true) | ||
40 | private String veriCode; | 45 | private String veriCode; |
41 | 46 | ||
42 | - /** | ||
43 | - * 城市 | ||
44 | - */ | ||
45 | - private String cityCode; | ||
46 | - | ||
47 | - public Integer getUserType() { | ||
48 | - return userType; | ||
49 | - } | ||
50 | - | ||
51 | - public void setUserType(Integer userType) { | ||
52 | - this.userType = userType; | ||
53 | - } | 47 | + ///** |
48 | + //* 城市 | ||
49 | + //*/ | ||
50 | + //private String cityCode; | ||
51 | + // | ||
52 | + //public Integer getUserType() { | ||
53 | + // return userType; | ||
54 | + //} | ||
55 | + // | ||
56 | + //public void setUserType(Integer userType) { | ||
57 | + // this.userType = userType; | ||
58 | + //} | ||
59 | + // | ||
60 | + //public String getCityCode() { | ||
61 | + // return cityCode; | ||
62 | + //} | ||
63 | + // | ||
64 | + //public void setCityCode(String cityCode) { | ||
65 | + // this.cityCode = cityCode; | ||
66 | + //} | ||
54 | 67 | ||
55 | /** | 68 | /** |
56 | * get value of RegisterPersonalReq.mobile | 69 | * get value of RegisterPersonalReq.mobile |
@@ -114,11 +127,5 @@ public class UserRegisterReq extends BaseReq { | @@ -114,11 +127,5 @@ public class UserRegisterReq extends BaseReq { | ||
114 | } | 127 | } |
115 | 128 | ||
116 | 129 | ||
117 | - public String getCityCode() { | ||
118 | - return cityCode; | ||
119 | - } | ||
120 | 130 | ||
121 | - public void setCityCode(String cityCode) { | ||
122 | - this.cityCode = cityCode; | ||
123 | - } | ||
124 | } | 131 | } |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/register/UserRegisterResp.java
1 | package com.diligrp.mobsite.getway.domain.protocol.register; | 1 | package com.diligrp.mobsite.getway.domain.protocol.register; |
2 | 2 | ||
3 | import com.diligrp.mobsite.getway.domain.protocol.BaseResp; | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseResp; |
4 | - | 4 | +import io.swagger.annotations.ApiModelProperty; |
5 | 5 | ||
6 | 6 | ||
7 | /** | 7 | /** |
@@ -41,6 +41,7 @@ public class UserRegisterResp extends BaseResp { | @@ -41,6 +41,7 @@ public class UserRegisterResp extends BaseResp { | ||
41 | /** | 41 | /** |
42 | * 注册结果 | 42 | * 注册结果 |
43 | */ | 43 | */ |
44 | + @ApiModelProperty(value = "注册结果") | ||
44 | private Integer resultFlag = RESULT_FLAG_SUCCESS; | 45 | private Integer resultFlag = RESULT_FLAG_SUCCESS; |
45 | 46 | ||
46 | /** | 47 | /** |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/search/SearchProductByKeywordReq.java
1 | package com.diligrp.mobsite.getway.domain.protocol.search; | 1 | package com.diligrp.mobsite.getway.domain.protocol.search; |
2 | 2 | ||
3 | -import org.nutz.json.JsonField; | ||
4 | - | ||
5 | - | 3 | +import com.diligrp.mobsite.getway.domain.protocol.BaseReq; |
4 | +import io.swagger.annotations.ApiModelProperty; | ||
6 | 5 | ||
7 | /** | 6 | /** |
8 | * <B>Description</B> 根据关键字搜索商品请求 <br /> | 7 | * <B>Description</B> 根据关键字搜索商品请求 <br /> |
@@ -13,16 +12,17 @@ import org.nutz.json.JsonField; | @@ -13,16 +12,17 @@ import org.nutz.json.JsonField; | ||
13 | * @author wujianjun | 12 | * @author wujianjun |
14 | */ | 13 | */ |
15 | @SuppressWarnings("serial") | 14 | @SuppressWarnings("serial") |
16 | -public class SearchProductByKeywordReq extends SearchProductReq { | 15 | +public class SearchProductByKeywordReq extends BaseReq { |
17 | /** | 16 | /** |
18 | * 关键字 | 17 | * 关键字 |
19 | */ | 18 | */ |
19 | + @ApiModelProperty(value = "关键字",required = true) | ||
20 | private String keyword; | 20 | private String keyword; |
21 | 21 | ||
22 | - /** | ||
23 | - * 置顶类型 | ||
24 | - */ | ||
25 | - private Integer topOrderType; | 22 | + ///** |
23 | + // * 置顶类型 | ||
24 | + // */ | ||
25 | + //private Integer topOrderType; | ||
26 | /** | 26 | /** |
27 | * get value of SearchProductByKeywordReq.keyword | 27 | * get value of SearchProductByKeywordReq.keyword |
28 | * @return the keyword | 28 | * @return the keyword |
@@ -45,14 +45,14 @@ public class SearchProductByKeywordReq extends SearchProductReq { | @@ -45,14 +45,14 @@ public class SearchProductByKeywordReq extends SearchProductReq { | ||
45 | } | 45 | } |
46 | 46 | ||
47 | 47 | ||
48 | - public Integer getTopOrderType() { | ||
49 | - return topOrderType; | ||
50 | - } | ||
51 | - | ||
52 | - | ||
53 | - public void setTopOrderType(Integer topOrderType) { | ||
54 | - this.topOrderType = topOrderType; | ||
55 | - } | 48 | + //public Integer getTopOrderType() { |
49 | + // return topOrderType; | ||
50 | + //} | ||
51 | + // | ||
52 | + // | ||
53 | + //public void setTopOrderType(Integer topOrderType) { | ||
54 | + // this.topOrderType = topOrderType; | ||
55 | + //} | ||
56 | 56 | ||
57 | 57 | ||
58 | } | 58 | } |
59 | \ No newline at end of file | 59 | \ No newline at end of file |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/search/SearchProductResp.java
1 | package com.diligrp.mobsite.getway.domain.protocol.search; | 1 | package com.diligrp.mobsite.getway.domain.protocol.search; |
2 | 2 | ||
3 | -import java.util.List; | ||
4 | - | ||
5 | import com.diligrp.mobsite.getway.domain.base.BaseListResp; | 3 | import com.diligrp.mobsite.getway.domain.base.BaseListResp; |
6 | -import com.diligrp.mobsite.getway.domain.base.BaseTree; | ||
7 | -import com.diligrp.mobsite.getway.domain.protocol.Attribute; | ||
8 | -import com.diligrp.mobsite.getway.domain.protocol.AttributeValue; | ||
9 | -import com.diligrp.mobsite.getway.domain.protocol.CategoryChoice; | ||
10 | -import com.diligrp.mobsite.getway.domain.protocol.Goods; | 4 | +import com.diligrp.mobsite.getway.domain.protocol.GoodsSuper; |
5 | + | ||
6 | +import java.util.List; | ||
11 | 7 | ||
12 | /** | 8 | /** |
13 | * <B>Description</B> (抽象)商品搜索响应 <br /> | 9 | * <B>Description</B> (抽象)商品搜索响应 <br /> |
@@ -22,116 +18,13 @@ public abstract class SearchProductResp extends BaseListResp { | @@ -22,116 +18,13 @@ public abstract class SearchProductResp extends BaseListResp { | ||
22 | /** | 18 | /** |
23 | * 搜索结果-商品信息 | 19 | * 搜索结果-商品信息 |
24 | */ | 20 | */ |
25 | - private List<Goods> products; | ||
26 | - /** | ||
27 | - * 筛选属性 | ||
28 | - */ | ||
29 | - private List<Attribute> attributes; | ||
30 | - | ||
31 | - /** | ||
32 | - * 相关分类 | ||
33 | - */ | ||
34 | - private List<CategoryChoice> categoryChoiceList; | ||
35 | - /** | ||
36 | - * 产地 | ||
37 | - */ | ||
38 | - private List<AttributeValue> productions; | ||
39 | - /** | ||
40 | - * 所在地 | ||
41 | - */ | ||
42 | - private List<AttributeValue> localities; | ||
43 | - /** | ||
44 | - * 分类 | ||
45 | - */ | ||
46 | - private List<BaseTree> categorys; | ||
47 | - | ||
48 | - /** | ||
49 | - * get value of SearchProductResp.products | ||
50 | - * @return the products | ||
51 | - * @createTime Aug 15, 2014 5:11:59 PM | ||
52 | - * @author wujianjun | ||
53 | - */ | ||
54 | - public List<Goods> getProducts() { | 21 | + private List<GoodsSuper> products; |
22 | + | ||
23 | + public List<GoodsSuper> getProducts() { | ||
55 | return products; | 24 | return products; |
56 | } | 25 | } |
57 | 26 | ||
58 | - /** | ||
59 | - * set value of SearchProductResp.products | ||
60 | - * @param products the products to set | ||
61 | - * @createTime Aug 15, 2014 5:11:59 PM | ||
62 | - * @author wujianjun | ||
63 | - */ | ||
64 | - public void setProducts(List<Goods> products) { | 27 | + public void setProducts(List<GoodsSuper> products) { |
65 | this.products = products; | 28 | this.products = products; |
66 | } | 29 | } |
67 | - | ||
68 | - | ||
69 | - | ||
70 | - /** | ||
71 | - * get value of SearchProductResp.attributes | ||
72 | - * @return the attributes | ||
73 | - * @createTime 2014年8月20日 下午4:38:44 | ||
74 | - * @author zhangshirui | ||
75 | - */ | ||
76 | - public List<Attribute> getAttributes() { | ||
77 | - return attributes; | ||
78 | - } | ||
79 | - | ||
80 | - | ||
81 | - /** | ||
82 | - * set value of SearchProductResp.attributes | ||
83 | - * @param attributes the attributes to set | ||
84 | - * @createTime 2014年8月20日 下午4:38:44 | ||
85 | - * @author zhangshirui | ||
86 | - */ | ||
87 | - public void setAttributes(List<Attribute> attributes) { | ||
88 | - this.attributes = attributes; | ||
89 | - } | ||
90 | - | ||
91 | - | ||
92 | - /** | ||
93 | - * get value of SearchProductResp.categoryChoiceList | ||
94 | - * @return the categoryChoiceList | ||
95 | - * @createTime 2014年9月16日 上午10:34:23 | ||
96 | - * @author zhangshirui | ||
97 | - */ | ||
98 | - public List<CategoryChoice> getCategoryChoiceList() { | ||
99 | - return categoryChoiceList; | ||
100 | - } | ||
101 | - | ||
102 | - | ||
103 | - /** | ||
104 | - * set value of SearchProductResp.categoryChoiceList | ||
105 | - * @param categoryChoiceList the categoryChoiceList to set | ||
106 | - * @createTime 2014年9月16日 上午10:34:23 | ||
107 | - * @author zhangshirui | ||
108 | - */ | ||
109 | - public void setCategoryChoiceList(List<CategoryChoice> categoryChoiceList) { | ||
110 | - this.categoryChoiceList = categoryChoiceList; | ||
111 | - } | ||
112 | - | ||
113 | - public List<AttributeValue> getProductions() { | ||
114 | - return productions; | ||
115 | - } | ||
116 | - | ||
117 | - public void setProductions(List<AttributeValue> productions) { | ||
118 | - this.productions = productions; | ||
119 | - } | ||
120 | - | ||
121 | - public List<AttributeValue> getLocalities() { | ||
122 | - return localities; | ||
123 | - } | ||
124 | - | ||
125 | - public void setLocalities(List<AttributeValue> localities) { | ||
126 | - this.localities = localities; | ||
127 | - } | ||
128 | - | ||
129 | - public List<BaseTree> getCategorys() { | ||
130 | - return categorys; | ||
131 | - } | ||
132 | - | ||
133 | - public void setCategorys(List<BaseTree> categorys) { | ||
134 | - this.categorys = categorys; | ||
135 | - } | ||
136 | - | ||
137 | } | 30 | } |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/search/SearchSaleShopReq.java
@@ -73,7 +73,7 @@ public class SearchSaleShopReq extends BaseReq { | @@ -73,7 +73,7 @@ public class SearchSaleShopReq extends BaseReq { | ||
73 | this.mainProducerId = mainProducerId; | 73 | this.mainProducerId = mainProducerId; |
74 | } | 74 | } |
75 | 75 | ||
76 | - @Override | 76 | + |
77 | public Long getMarketId() { | 77 | public Long getMarketId() { |
78 | return marketId; | 78 | return marketId; |
79 | } | 79 | } |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/shop/GetShopDetailsReq.java
1 | package com.diligrp.mobsite.getway.domain.protocol.shop; | 1 | package com.diligrp.mobsite.getway.domain.protocol.shop; |
2 | 2 | ||
3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; |
4 | +import io.swagger.annotations.ApiModelProperty; | ||
4 | 5 | ||
5 | /** | 6 | /** |
6 | * <B>查询商品详情req</B> <br /> | 7 | * <B>查询商品详情req</B> <br /> |
@@ -15,6 +16,7 @@ public class GetShopDetailsReq extends BaseReq { | @@ -15,6 +16,7 @@ public class GetShopDetailsReq extends BaseReq { | ||
15 | /** | 16 | /** |
16 | * 店铺id | 17 | * 店铺id |
17 | */ | 18 | */ |
19 | + @ApiModelProperty(value = "店铺id",required = true) | ||
18 | private Long shopId; | 20 | private Long shopId; |
19 | /** | 21 | /** |
20 | * 二级域名 | 22 | * 二级域名 |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/topic/GetMealListReq.java
0 → 100644
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/topic/GetMealListResp.java
0 → 100644
1 | +package com.diligrp.mobsite.getway.domain.protocol.topic; | ||
2 | + | ||
3 | +import com.diligrp.mobsite.getway.domain.base.BaseListResp; | ||
4 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | + | ||
6 | +/** | ||
7 | + * Created by xxxzzz on 2016/12/20. | ||
8 | + */ | ||
9 | +public class GetMealListResp extends BaseListResp { | ||
10 | + | ||
11 | + @ApiModelProperty(value = "标题") | ||
12 | + private String title; | ||
13 | + | ||
14 | + @ApiModelProperty(value = "描述") | ||
15 | + private String desc; | ||
16 | + | ||
17 | + @ApiModelProperty(value = "图片url") | ||
18 | + private String image; | ||
19 | + | ||
20 | + | ||
21 | + public String getTitle() { | ||
22 | + return title; | ||
23 | + } | ||
24 | + | ||
25 | + public void setTitle(String title) { | ||
26 | + this.title = title; | ||
27 | + } | ||
28 | + | ||
29 | + public String getDesc() { | ||
30 | + return desc; | ||
31 | + } | ||
32 | + | ||
33 | + public void setDesc(String desc) { | ||
34 | + this.desc = desc; | ||
35 | + } | ||
36 | + | ||
37 | + public String getImage() { | ||
38 | + return image; | ||
39 | + } | ||
40 | + | ||
41 | + public void setImage(String image) { | ||
42 | + this.image = image; | ||
43 | + } | ||
44 | +} |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/topic/GetPicReq.java
@@ -26,13 +26,13 @@ public class GetPicReq extends BaseReq { | @@ -26,13 +26,13 @@ public class GetPicReq extends BaseReq { | ||
26 | * logo图片 | 26 | * logo图片 |
27 | */ | 27 | */ |
28 | public static final String LOGO_PIC = "LOGO_PIC"; | 28 | public static final String LOGO_PIC = "LOGO_PIC"; |
29 | - | 29 | + |
30 | /** | 30 | /** |
31 | * 图片类型 | 31 | * 图片类型 |
32 | */ | 32 | */ |
33 | private String picType; | 33 | private String picType; |
34 | 34 | ||
35 | - | 35 | + |
36 | /** | 36 | /** |
37 | * get value of GetPicReq.picType | 37 | * get value of GetPicReq.picType |
38 | * @return the picType | 38 | * @return the picType |
@@ -43,7 +43,7 @@ public class GetPicReq extends BaseReq { | @@ -43,7 +43,7 @@ public class GetPicReq extends BaseReq { | ||
43 | return picType; | 43 | return picType; |
44 | } | 44 | } |
45 | 45 | ||
46 | - | 46 | + |
47 | /** | 47 | /** |
48 | * set value of GetPicReq.picType | 48 | * set value of GetPicReq.picType |
49 | * @param picType the picType to set | 49 | * @param picType the picType to set |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/topic/GetTopicDetailReq.java
1 | package com.diligrp.mobsite.getway.domain.protocol.topic; | 1 | package com.diligrp.mobsite.getway.domain.protocol.topic; |
2 | 2 | ||
3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; |
4 | +import io.swagger.annotations.ApiModelProperty; | ||
4 | 5 | ||
5 | /** | 6 | /** |
6 | * Created by david on 2016/1/20. | 7 | * Created by david on 2016/1/20. |
7 | */ | 8 | */ |
8 | public class GetTopicDetailReq extends BaseReq { | 9 | public class GetTopicDetailReq extends BaseReq { |
9 | 10 | ||
11 | + | ||
12 | + @ApiModelProperty(value = "id",required = true) | ||
10 | private Long id; | 13 | private Long id; |
11 | 14 | ||
12 | public Long getId() { | 15 | public Long getId() { |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/topic/model/HomeStatisticsTopic.java
1 | package com.diligrp.mobsite.getway.domain.protocol.topic.model; | 1 | package com.diligrp.mobsite.getway.domain.protocol.topic.model; |
2 | 2 | ||
3 | +import io.swagger.annotations.ApiModelProperty; | ||
4 | + | ||
3 | import java.io.Serializable; | 5 | import java.io.Serializable; |
4 | 6 | ||
5 | /** | 7 | /** |
@@ -14,20 +16,36 @@ public class HomeStatisticsTopic implements Serializable { | @@ -14,20 +16,36 @@ public class HomeStatisticsTopic implements Serializable { | ||
14 | public static final int TOPIC_TYPE_SHOP = 2; | 16 | public static final int TOPIC_TYPE_SHOP = 2; |
15 | public static final int TOPIC_TYPE_INFO = 3; | 17 | public static final int TOPIC_TYPE_INFO = 3; |
16 | public static final int TOPIC_TYPE_TOPIC = 4; | 18 | public static final int TOPIC_TYPE_TOPIC = 4; |
19 | + | ||
20 | + | ||
21 | + private Long id; | ||
22 | + | ||
17 | /** | 23 | /** |
18 | *分类 | 24 | *分类 |
19 | * */ | 25 | * */ |
26 | + @ApiModelProperty(value = "分类") | ||
20 | private Integer topicType; | 27 | private Integer topicType; |
21 | /** | 28 | /** |
22 | *展示的标题名称 | 29 | *展示的标题名称 |
23 | * */ | 30 | * */ |
31 | + @ApiModelProperty(value = "标题名称") | ||
24 | private String topicName; | 32 | private String topicName; |
25 | 33 | ||
26 | /** | 34 | /** |
27 | *跳转的对应链接 | 35 | *跳转的对应链接 |
28 | * */ | 36 | * */ |
37 | + @ApiModelProperty(value = "公告内容") | ||
29 | private String topicContent; | 38 | private String topicContent; |
30 | 39 | ||
40 | + | ||
41 | + public Long getId() { | ||
42 | + return id; | ||
43 | + } | ||
44 | + | ||
45 | + public void setId(Long id) { | ||
46 | + this.id = id; | ||
47 | + } | ||
48 | + | ||
31 | public Integer getTopicType() { | 49 | public Integer getTopicType() { |
32 | return topicType; | 50 | return topicType; |
33 | } | 51 | } |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/user/ModifyPwdReq.java
1 | package com.diligrp.mobsite.getway.domain.protocol.user; | 1 | package com.diligrp.mobsite.getway.domain.protocol.user; |
2 | 2 | ||
3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseReq; |
4 | +import io.swagger.annotations.ApiModel; | ||
5 | +import io.swagger.annotations.ApiModelProperty; | ||
4 | 6 | ||
5 | 7 | ||
6 | /** | 8 | /** |
@@ -11,7 +13,7 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | @@ -11,7 +13,7 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq; | ||
11 | * @createTime Aug 12, 2014 8:07:31 PM | 13 | * @createTime Aug 12, 2014 8:07:31 PM |
12 | * @author wujianjun | 14 | * @author wujianjun |
13 | */ | 15 | */ |
14 | -@SuppressWarnings("serial") | 16 | +@ApiModel(value = "请求参数") |
15 | public class ModifyPwdReq extends BaseReq { | 17 | public class ModifyPwdReq extends BaseReq { |
16 | 18 | ||
17 | /** | 19 | /** |
@@ -22,12 +24,14 @@ public class ModifyPwdReq extends BaseReq { | @@ -22,12 +24,14 @@ public class ModifyPwdReq extends BaseReq { | ||
22 | /** | 24 | /** |
23 | * 新的密码 | 25 | * 新的密码 |
24 | */ | 26 | */ |
27 | + @ApiModelProperty(value = "新密码") | ||
25 | private String password; | 28 | private String password; |
26 | 29 | ||
27 | /** | 30 | /** |
28 | - * 旧密码 | 31 | + * 重复新密码 |
29 | */ | 32 | */ |
30 | - private String oldPassword; | 33 | + @ApiModelProperty(value = "重复新密码") |
34 | + private String repPassword; | ||
31 | 35 | ||
32 | /** | 36 | /** |
33 | * 用户账号 | 37 | * 用户账号 |
@@ -98,11 +102,11 @@ public class ModifyPwdReq extends BaseReq { | @@ -98,11 +102,11 @@ public class ModifyPwdReq extends BaseReq { | ||
98 | this.authCode = authCode; | 102 | this.authCode = authCode; |
99 | } | 103 | } |
100 | 104 | ||
101 | - public String getOldPassword() { | ||
102 | - return oldPassword; | ||
103 | - } | 105 | + public String getRepPassword() { |
106 | + return repPassword; | ||
107 | + } | ||
104 | 108 | ||
105 | - public void setOldPassword(String oldPassword) { | ||
106 | - this.oldPassword = oldPassword; | ||
107 | - } | 109 | + public void setRepPassword(String repPassword) { |
110 | + this.repPassword = repPassword; | ||
111 | + } | ||
108 | } | 112 | } |
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/user/ModifyPwdResp.java
1 | package com.diligrp.mobsite.getway.domain.protocol.user; | 1 | package com.diligrp.mobsite.getway.domain.protocol.user; |
2 | 2 | ||
3 | import com.diligrp.mobsite.getway.domain.protocol.BaseResp; | 3 | import com.diligrp.mobsite.getway.domain.protocol.BaseResp; |
4 | - | 4 | +import io.swagger.annotations.ApiModel; |
5 | +import io.swagger.annotations.ApiModelProperty; | ||
5 | 6 | ||
6 | 7 | ||
7 | /** | 8 | /** |
@@ -12,7 +13,7 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseResp; | @@ -12,7 +13,7 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseResp; | ||
12 | * @createTime Aug 12, 2014 8:09:21 PM | 13 | * @createTime Aug 12, 2014 8:09:21 PM |
13 | * @author wujianjun | 14 | * @author wujianjun |
14 | */ | 15 | */ |
15 | -@SuppressWarnings("serial") | 16 | +@ApiModel(value="返回参数") |
16 | public class ModifyPwdResp extends BaseResp { | 17 | public class ModifyPwdResp extends BaseResp { |
17 | 18 | ||
18 | /** | 19 | /** |
@@ -28,6 +29,7 @@ public class ModifyPwdResp extends BaseResp { | @@ -28,6 +29,7 @@ public class ModifyPwdResp extends BaseResp { | ||
28 | /** | 29 | /** |
29 | * 更新结果 | 30 | * 更新结果 |
30 | */ | 31 | */ |
32 | + @ApiModelProperty(value = "更新结果") | ||
31 | private Integer resultFlag = RESULT_FLAG_SUCCESS; | 33 | private Integer resultFlag = RESULT_FLAG_SUCCESS; |
32 | 34 | ||
33 | 35 |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/UserRPC.java
@@ -69,7 +69,7 @@ public interface UserRPC { | @@ -69,7 +69,7 @@ public interface UserRPC { | ||
69 | * @createTime 2015年3月4日 下午6:46:54 | 69 | * @createTime 2015年3月4日 下午6:46:54 |
70 | * @author zhangshirui | 70 | * @author zhangshirui |
71 | */ | 71 | */ |
72 | - boolean delCartByIds(Long userId, List<Long> ids); | 72 | + boolean delCartByIds(Long userId, List<String> ids); |
73 | 73 | ||
74 | /** | 74 | /** |
75 | * 获取进货单列表 | 75 | * 获取进货单列表 |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/impl/GoodsRPCImpl.java
@@ -134,7 +134,6 @@ public class GoodsRPCImpl implements GoodsRPC { | @@ -134,7 +134,6 @@ public class GoodsRPCImpl implements GoodsRPC { | ||
134 | goodsInfo.setDefaultPic(product.getDefaultPic()); | 134 | goodsInfo.setDefaultPic(product.getDefaultPic()); |
135 | goodsInfo.setPrice((long)product.getMinPrice()); | 135 | goodsInfo.setPrice((long)product.getMinPrice()); |
136 | goodsInfo.setUnit(product.getSaleUnit()); | 136 | goodsInfo.setUnit(product.getSaleUnit()); |
137 | - goodsInfo.setHasSpecial(product.getHasSpecial());//是否为特价商品 | ||
138 | goodsInfos.add(goodsInfo); | 137 | goodsInfos.add(goodsInfo); |
139 | } | 138 | } |
140 | 139 |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/impl/PassportRPCImpl.java
@@ -136,8 +136,8 @@ public class PassportRPCImpl extends BaseServiceImpl implements PassportRPC { | @@ -136,8 +136,8 @@ public class PassportRPCImpl extends BaseServiceImpl implements PassportRPC { | ||
136 | Map<String,String> params = new HashMap<String, String>(); | 136 | Map<String,String> params = new HashMap<String, String>(); |
137 | params.put("mobile", req.getMobile()); | 137 | params.put("mobile", req.getMobile()); |
138 | params.put("password", req.getPassword()); | 138 | params.put("password", req.getPassword()); |
139 | - params.put("customerType", String.valueOf(req.getUserType())); | ||
140 | - params.put("city",req.getCityCode()); | 139 | + //params.put("customerType", String.valueOf(req.getUserType())); |
140 | + //params.put("city",req.getCityCode()); | ||
141 | // params.put("accountName", req.getAccountName()); | 141 | // params.put("accountName", req.getAccountName()); |
142 | // params.put("source", PASSPORT_REGIST_SOURCE_PNR); | 142 | // params.put("source", PASSPORT_REGIST_SOURCE_PNR); |
143 | BaseOutput<String> output = null; | 143 | BaseOutput<String> output = null; |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/buyer/impl/UserRPCImpl.java
@@ -5,7 +5,6 @@ import com.diligrp.mobsite.getway.domain.common.Constant; | @@ -5,7 +5,6 @@ import com.diligrp.mobsite.getway.domain.common.Constant; | ||
5 | import com.diligrp.mobsite.getway.domain.common.ErrorMessage; | 5 | import com.diligrp.mobsite.getway.domain.common.ErrorMessage; |
6 | import com.diligrp.mobsite.getway.domain.common.RedisKey; | 6 | import com.diligrp.mobsite.getway.domain.common.RedisKey; |
7 | import com.diligrp.mobsite.getway.domain.common.ResultCode; | 7 | import com.diligrp.mobsite.getway.domain.common.ResultCode; |
8 | -import com.diligrp.mobsite.getway.domain.common.enums.GoodsPriceTypeEnmu; | ||
9 | import com.diligrp.mobsite.getway.domain.common.enums.user.FavoriteType; | 8 | import com.diligrp.mobsite.getway.domain.common.enums.user.FavoriteType; |
10 | import com.diligrp.mobsite.getway.domain.except.ServiceException; | 9 | import com.diligrp.mobsite.getway.domain.except.ServiceException; |
11 | import com.diligrp.mobsite.getway.domain.protocol.AddCartProduct; | 10 | import com.diligrp.mobsite.getway.domain.protocol.AddCartProduct; |
@@ -13,9 +12,7 @@ import com.diligrp.mobsite.getway.domain.protocol.ConsigneeInfo; | @@ -13,9 +12,7 @@ import com.diligrp.mobsite.getway.domain.protocol.ConsigneeInfo; | ||
13 | import com.diligrp.mobsite.getway.domain.protocol.cart.ModifyAmountReq; | 12 | import com.diligrp.mobsite.getway.domain.protocol.cart.ModifyAmountReq; |
14 | import com.diligrp.mobsite.getway.rpc.buyer.GoodsRPC; | 13 | import com.diligrp.mobsite.getway.rpc.buyer.GoodsRPC; |
15 | import com.diligrp.mobsite.getway.rpc.buyer.UserRPC; | 14 | import com.diligrp.mobsite.getway.rpc.buyer.UserRPC; |
16 | -import com.diligrp.mobsite.getway.rpc.utils.ProductUtils; | ||
17 | import com.diligrp.titan.sdk.domain.Product; | 15 | import com.diligrp.titan.sdk.domain.Product; |
18 | -import com.diligrp.titan.sdk.util.SkuUtil; | ||
19 | import com.diligrp.website.util.redis.RedisUtil; | 16 | import com.diligrp.website.util.redis.RedisUtil; |
20 | import com.diligrp.website.util.security.Validator; | 17 | import com.diligrp.website.util.security.Validator; |
21 | import com.diligrp.website.web.interfaces.WebsiteClient; | 18 | import com.diligrp.website.web.interfaces.WebsiteClient; |
@@ -32,7 +29,6 @@ import javax.annotation.Resource; | @@ -32,7 +29,6 @@ import javax.annotation.Resource; | ||
32 | import java.util.ArrayList; | 29 | import java.util.ArrayList; |
33 | import java.util.Date; | 30 | import java.util.Date; |
34 | import java.util.List; | 31 | import java.util.List; |
35 | -import java.util.Map; | ||
36 | 32 | ||
37 | 33 | ||
38 | /** | 34 | /** |
@@ -203,40 +199,21 @@ public class UserRPCImpl implements UserRPC { | @@ -203,40 +199,21 @@ public class UserRPCImpl implements UserRPC { | ||
203 | ShoppingCartReq item = new ShoppingCartReq(); | 199 | ShoppingCartReq item = new ShoppingCartReq(); |
204 | item.setUserId(req.getUserId()); | 200 | item.setUserId(req.getUserId()); |
205 | item.setAmount(req.getAmount()); | 201 | item.setAmount(req.getAmount()); |
206 | - item.setCartId(req.getCartId()); | 202 | + item.setSku(req.getSku()); |
207 | scList.add(item); | 203 | scList.add(item); |
208 | boolean result = userClient.getShoppingCartService().updateCarts(scList); | 204 | boolean result = userClient.getShoppingCartService().updateCarts(scList); |
209 | if(!result) { | 205 | if(!result) { |
210 | logger.error("修改购物车商品数量失败,[userId={},cartId={}]", | 206 | logger.error("修改购物车商品数量失败,[userId={},cartId={}]", |
211 | - req.getUserId(),req.getCartId()); | 207 | + req.getUserId(),req.getSku()); |
212 | }else { | 208 | }else { |
213 | logger.info("修改购物车商品数量成功,[userId={},cartId={}]", | 209 | logger.info("修改购物车商品数量成功,[userId={},cartId={}]", |
214 | - req.getUserId(),req.getCartId()); | 210 | + req.getUserId(),req.getSku()); |
215 | } | 211 | } |
216 | return result; | 212 | return result; |
217 | } | 213 | } |
218 | 214 | ||
219 | 215 | ||
220 | 216 | ||
221 | - @Override | ||
222 | - public boolean delCartByIds(Long userId, List<Long> ids) { | ||
223 | - if (Validator.isEmpty(ids)) { | ||
224 | - return false; | ||
225 | - } | ||
226 | - | ||
227 | - boolean result = false; | ||
228 | - try { | ||
229 | - result = userClient.getShoppingCartService().delCartByIds(userId, ids); | ||
230 | - } catch (Exception e) { | ||
231 | - logger.error("删除进货单接口失败",e); | ||
232 | - } | ||
233 | - | ||
234 | - logger.error("从购物车中移除商品.[userId={},,cartIds={},result={}]", | ||
235 | - new Object[]{userId,ids.toString(),result}); | ||
236 | - | ||
237 | - return result; | ||
238 | - } | ||
239 | - | ||
240 | 217 | ||
241 | @Override | 218 | @Override |
242 | public boolean addShoppingCart(List<AddCartProduct> cartProducts, Long userId) { | 219 | public boolean addShoppingCart(List<AddCartProduct> cartProducts, Long userId) { |
@@ -249,22 +226,22 @@ public class UserRPCImpl implements UserRPC { | @@ -249,22 +226,22 @@ public class UserRPCImpl implements UserRPC { | ||
249 | cart = new ShoppingCartReq(); | 226 | cart = new ShoppingCartReq(); |
250 | cart.setAddToCartTime(new Date()); | 227 | cart.setAddToCartTime(new Date()); |
251 | cart.setUserId(userId); | 228 | cart.setUserId(userId); |
252 | - //TODO 后期需要优化,加密sku直接从app传过来,现在是通过<版本:商品Id:销售属性ID>自行加密 | ||
253 | - sku = SkuUtil.encode(ProductUtils.getSkuStr(cartProduct,true)); | ||
254 | - cart.setSku(sku); | ||
255 | - cart.setAmount(cartProduct.getAmount()); | ||
256 | - cart.setProductId(cartProduct.getProductId()); | ||
257 | - cart.setShopId(cartProduct.getShopId()); | ||
258 | - if(cartProduct.getPriceType()==GoodsPriceTypeEnmu.PRICE_TYPE_NORMAL.getPriceType()){ | ||
259 | - cart.setPrice(cartProduct.getPrice().intValue()); | ||
260 | - }else{ | ||
261 | - //TODO 后期需要优化,直接从app传过来 | ||
262 | - skuList.add(sku); | ||
263 | - Map<String, Product> productMap = goodsRPC.getSkuInfoMap(skuList); | ||
264 | - product = productMap.get(sku); | ||
265 | - cart.setPriceRange(JSON.toJSONString(product.getProductQuotation())); | ||
266 | - //cart.setPriceRange(JSON.toJSONString(ProductUtils.buildProductQuotation(cartProduct.getQuotationList()))); | ||
267 | - } | 229 | + ////TODO 后期需要优化,加密sku直接从app传过来,现在是通过<版本:商品Id:销售属性ID>自行加密 |
230 | + //sku = SkuUtil.encode(ProductUtils.getSkuStr(cartProduct,true)); | ||
231 | + //cart.setSku(sku); | ||
232 | + //cart.setAmount(cartProduct.getAmount()); | ||
233 | + //cart.setProductId(cartProduct.getProductId()); | ||
234 | + //cart.setShopId(cartProduct.getShopId()); | ||
235 | + //if(cartProduct.getPriceType()==GoodsPriceTypeEnmu.PRICE_TYPE_NORMAL.getPriceType()){ | ||
236 | + // cart.setPrice(cartProduct.getPrice().intValue()); | ||
237 | + //}else{ | ||
238 | + // //TODO 后期需要优化,直接从app传过来 | ||
239 | + // skuList.add(sku); | ||
240 | + // Map<String, Product> productMap = goodsRPC.getSkuInfoMap(skuList); | ||
241 | + // product = productMap.get(sku); | ||
242 | + // cart.setPriceRange(JSON.toJSONString(product.getProductQuotation())); | ||
243 | + ////cart.setPriceRange(JSON.toJSONString(ProductUtils.buildProductQuotation(cartProduct.getQuotationList()))); | ||
244 | + //} | ||
268 | shopCarts.add(cart); | 245 | shopCarts.add(cart); |
269 | } | 246 | } |
270 | 247 | ||
@@ -284,6 +261,25 @@ public class UserRPCImpl implements UserRPC { | @@ -284,6 +261,25 @@ public class UserRPCImpl implements UserRPC { | ||
284 | } | 261 | } |
285 | 262 | ||
286 | @Override | 263 | @Override |
264 | + public boolean delCartByIds(Long userId, List<String> ids) { | ||
265 | + if (Validator.isEmpty(ids)) { | ||
266 | + return false; | ||
267 | + } | ||
268 | + | ||
269 | + boolean result = false; | ||
270 | + try { | ||
271 | + // result = userClient.getShoppingCartService().delCartByIds(userId, ids); | ||
272 | + } catch (Exception e) { | ||
273 | + logger.error("删除进货单接口失败",e); | ||
274 | + } | ||
275 | + | ||
276 | + logger.error("从购物车中移除商品.[userId={},,cartIds={},result={}]", | ||
277 | + new Object[]{userId,ids.toString(),result}); | ||
278 | + | ||
279 | + return result; | ||
280 | + } | ||
281 | + | ||
282 | + @Override | ||
287 | public UserInfoResp getUserByLoginId(String loginId) { | 283 | public UserInfoResp getUserByLoginId(String loginId) { |
288 | 284 | ||
289 | UserInfoResp userInfoResp = null; | 285 | UserInfoResp userInfoResp = null; |
@@ -382,13 +378,9 @@ public class UserRPCImpl implements UserRPC { | @@ -382,13 +378,9 @@ public class UserRPCImpl implements UserRPC { | ||
382 | info.setDef(consigneeInfo.getIsDefault()); | 378 | info.setDef(consigneeInfo.getIsDefault()); |
383 | } | 379 | } |
384 | info.setPhone(consigneeInfo.getMobile()); | 380 | info.setPhone(consigneeInfo.getMobile()); |
385 | - info.setTradeMarket(consigneeInfo.getMarketId()==null?null:consigneeInfo.getMarketId().intValue()); | ||
386 | info.setUserId(userId); | 381 | info.setUserId(userId); |
387 | - info.setIdCard(consigneeInfo.getIdCard()); | ||
388 | - info.setAddrId(consigneeInfo.getCityAddressNo()==null?0L:consigneeInfo.getCityAddressNo()); | ||
389 | info.setAddress(consigneeInfo.getCityAddress()); | 382 | info.setAddress(consigneeInfo.getCityAddress()); |
390 | info.setAddressDetail(consigneeInfo.getStreetAddress()); | 383 | info.setAddressDetail(consigneeInfo.getStreetAddress()); |
391 | - info.setDeliveryType(consigneeInfo.getDeliveryType()); | ||
392 | return info; | 384 | return info; |
393 | } | 385 | } |
394 | 386 | ||
@@ -398,12 +390,8 @@ public class UserRPCImpl implements UserRPC { | @@ -398,12 +390,8 @@ public class UserRPCImpl implements UserRPC { | ||
398 | consInfo.setIsDefault(info.getDef()); | 390 | consInfo.setIsDefault(info.getDef()); |
399 | consInfo.setMobile(info.getPhone()); | 391 | consInfo.setMobile(info.getPhone()); |
400 | consInfo.setId(info.getId()); | 392 | consInfo.setId(info.getId()); |
401 | - consInfo.setIdCard(info.getIdCard()); | ||
402 | - consInfo.setCityAddressNo(info.getAddrId()); | ||
403 | consInfo.setCityAddress(info.getAddress()); | 393 | consInfo.setCityAddress(info.getAddress()); |
404 | consInfo.setStreetAddress(info.getAddressDetail()); | 394 | consInfo.setStreetAddress(info.getAddressDetail()); |
405 | - consInfo.setDeliveryType(info.getDeliveryType()); | ||
406 | - consInfo.setMarketId(info.getTradeMarket()==null?null:info.getTradeMarket().longValue()); | ||
407 | return consInfo; | 395 | return consInfo; |
408 | } | 396 | } |
409 | 397 |
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/utils/ProductUtils.java
1 | package com.diligrp.mobsite.getway.rpc.utils; | 1 | package com.diligrp.mobsite.getway.rpc.utils; |
2 | 2 | ||
3 | -import java.util.ArrayList; | ||
4 | -import java.util.List; | ||
5 | - | ||
6 | import com.diligrp.mobsite.getway.domain.protocol.AddCartProduct; | 3 | import com.diligrp.mobsite.getway.domain.protocol.AddCartProduct; |
7 | import com.diligrp.mobsite.getway.domain.protocol.Quotation; | 4 | import com.diligrp.mobsite.getway.domain.protocol.Quotation; |
8 | import com.diligrp.titan.sdk.domain.ProductQuotation; | 5 | import com.diligrp.titan.sdk.domain.ProductQuotation; |
9 | import com.diligrp.titan.sdk.util.SkuUtil; | 6 | import com.diligrp.titan.sdk.util.SkuUtil; |
10 | import com.diligrp.website.util.security.Validator; | 7 | import com.diligrp.website.util.security.Validator; |
11 | 8 | ||
9 | +import java.util.ArrayList; | ||
10 | +import java.util.List; | ||
11 | + | ||
12 | 12 | ||
13 | /** | 13 | /** |
14 | * <B>Description</B> 生成sku字符串 <br /> | 14 | * <B>Description</B> 生成sku字符串 <br /> |
@@ -31,21 +31,21 @@ public class ProductUtils { | @@ -31,21 +31,21 @@ public class ProductUtils { | ||
31 | //根据skuId生成,sku字符串,生成规则 | 31 | //根据skuId生成,sku字符串,生成规则 |
32 | StringBuilder sb = new StringBuilder(); | 32 | StringBuilder sb = new StringBuilder(); |
33 | 33 | ||
34 | - if(isInclude){ | ||
35 | - if (Validator.isNull(acp.getVersion())) { | ||
36 | - sb.append("1").append(":"); | ||
37 | - }else { | ||
38 | - sb.append(acp.getVersion()).append(":"); | ||
39 | - } | ||
40 | - } | ||
41 | - | ||
42 | - sb.append(acp.getProductId()); | ||
43 | - List<Long> skus = acp.getSku(); | ||
44 | - if(!Validator.isEmpty(skus)){ | ||
45 | - for (Long sku : skus) { | ||
46 | - sb.append(":").append(sku.toString()); | ||
47 | - } | ||
48 | - } | 34 | + //if(isInclude){ |
35 | + // if (Validator.isNull(acp.getVersion())) { | ||
36 | + // sb.append("1").append(":"); | ||
37 | + //}else { | ||
38 | + // sb.append(acp.getVersion()).append(":"); | ||
39 | + //} | ||
40 | + //} | ||
41 | + // | ||
42 | + //sb.append(acp.getProductId()); | ||
43 | + //List<Long> skus = acp.getSku(); | ||
44 | + //if(!Validator.isEmpty(skus)){ | ||
45 | + // for (Long sku : skus) { | ||
46 | + // sb.append(":").append(sku.toString()); | ||
47 | + // } | ||
48 | + //} | ||
49 | return sb.toString(); | 49 | return sb.toString(); |
50 | } | 50 | } |
51 | 51 |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/buyer/goods/impl/GoodsServiceImpl.java
@@ -205,18 +205,6 @@ public class GoodsServiceImpl implements GoodsService { | @@ -205,18 +205,6 @@ public class GoodsServiceImpl implements GoodsService { | ||
205 | //构建商品基础信息 | 205 | //构建商品基础信息 |
206 | buildProductBaseInfo(productInfo, product); | 206 | buildProductBaseInfo(productInfo, product); |
207 | 207 | ||
208 | - //价格显示方式:普通方式,价格区间 | ||
209 | - buildProductPrice(product, productInfo); | ||
210 | - if (!Validator.isNull(req.getUserId())) { | ||
211 | - boolean favFlag = userRPC.checkFavorites(req.getId(), req.getUserId(), FavoriteType.PRODUCT.getType()); | ||
212 | - productInfo.setFavoritesFlag(favFlag ? ProductIntroduction.FAVORITES_FLAG_YES : ProductIntroduction.FAVORITES_FLAG_NO); | ||
213 | - } | ||
214 | - | ||
215 | - //商品好评率 | ||
216 | - CommentResult comment = searchRPC.getProdcutComment(productId); | ||
217 | - if (!Validator.isNull(comment)) { | ||
218 | - productInfo.setPraiseRate((float) comment.getPositiveFeedBack()); | ||
219 | - } | ||
220 | 208 | ||
221 | //店铺信息 | 209 | //店铺信息 |
222 | ShopIntroduction shopInfo = null; | 210 | ShopIntroduction shopInfo = null; |
@@ -227,12 +215,7 @@ public class GoodsServiceImpl implements GoodsService { | @@ -227,12 +215,7 @@ public class GoodsServiceImpl implements GoodsService { | ||
227 | } catch (Exception e) { | 215 | } catch (Exception e) { |
228 | logger.error("没有查到对应店铺信息"); | 216 | logger.error("没有查到对应店铺信息"); |
229 | } | 217 | } |
230 | - productInfo.setShopIntroduction(shopInfo); | ||
231 | 218 | ||
232 | - //商品电话信息, 如果是第三方,再获取用户电话 | ||
233 | - if ((Goods.FLAG_THIRD_PARTY + "").equals(product.getSaleType()) && !Validator.isNull(shopInfo)) { | ||
234 | - productInfo.setContactMobile(shopInfo.getMobile()); | ||
235 | - } | ||
236 | 219 | ||
237 | Video video = product.getVideo(); | 220 | Video video = product.getVideo(); |
238 | if (!Validator.isNull(video)) { | 221 | if (!Validator.isNull(video)) { |
@@ -245,7 +228,7 @@ public class GoodsServiceImpl implements GoodsService { | @@ -245,7 +228,7 @@ public class GoodsServiceImpl implements GoodsService { | ||
245 | videoInfo.setStatus(video.getStatus()); | 228 | videoInfo.setStatus(video.getStatus()); |
246 | videoInfo.setSource(video.getSource()); | 229 | videoInfo.setSource(video.getSource()); |
247 | videoInfos.add(videoInfo); | 230 | videoInfos.add(videoInfo); |
248 | - productInfo.setVideos(videoInfos); | 231 | + |
249 | } | 232 | } |
250 | 233 | ||
251 | resp.setProductIntroduction(productInfo); | 234 | resp.setProductIntroduction(productInfo); |
@@ -260,10 +243,7 @@ public class GoodsServiceImpl implements GoodsService { | @@ -260,10 +243,7 @@ public class GoodsServiceImpl implements GoodsService { | ||
260 | */ | 243 | */ |
261 | private void buildProductBaseInfo(ProductIntroduction pi, Product product) { | 244 | private void buildProductBaseInfo(ProductIntroduction pi, Product product) { |
262 | pi.setId(product.getPid()); | 245 | pi.setId(product.getPid()); |
263 | - pi.setCategoryId(product.getCid().longValue()); | ||
264 | - pi.setState(sumProductState(product)); | ||
265 | pi.setUnit(product.getSaleUnit()); | 246 | pi.setUnit(product.getSaleUnit()); |
266 | - pi.setSaleType(Integer.valueOf(product.getSaleType())); | ||
267 | 247 | ||
268 | String productionAddr = product.getProductionAddr(); | 248 | String productionAddr = product.getProductionAddr(); |
269 | String tempAddr = ""; | 249 | String tempAddr = ""; |
@@ -271,24 +251,13 @@ public class GoodsServiceImpl implements GoodsService { | @@ -271,24 +251,13 @@ public class GoodsServiceImpl implements GoodsService { | ||
271 | int endStr = productionAddr.indexOf("省")==-1?productionAddr.indexOf("市"):productionAddr.indexOf("省"); | 251 | int endStr = productionAddr.indexOf("省")==-1?productionAddr.indexOf("市"):productionAddr.indexOf("省"); |
272 | tempAddr = productionAddr.substring(0,endStr+1); | 252 | tempAddr = productionAddr.substring(0,endStr+1); |
273 | } | 253 | } |
274 | - pi.setProducingArea(Validator.isEmpty(tempAddr)?productionAddr:tempAddr);//商品产地 | ||
275 | //if (!Validator.isNull(product.getLocalityId())) { | 254 | //if (!Validator.isNull(product.getLocalityId())) { |
276 | // String locationAddr = configRPC.getProvinceAndCityByZoneId((long) product.getLocalityId(), true); | 255 | // String locationAddr = configRPC.getProvinceAndCityByZoneId((long) product.getLocalityId(), true); |
277 | // pi.setLocationAddr(locationAddr);//商品所在地 | 256 | // pi.setLocationAddr(locationAddr);//商品所在地 |
278 | //} | 257 | //} |
279 | //pi.setLocationid(product.getLocalityId()); | 258 | //pi.setLocationid(product.getLocalityId()); |
280 | pi.setTitle(product.getName()); | 259 | pi.setTitle(product.getName()); |
281 | - pi.setTransVolume(sumTransVolume(product.getPid()) + product.getSaleUnit()); //交易量 | ||
282 | pi.setPictures(convertProductPics(product.getPictures())); | 260 | pi.setPictures(convertProductPics(product.getPictures())); |
283 | - pi.setShareURL(String.format(shareURLPrefix, product.getPid())); | ||
284 | - pi.setSellerId(product.getSellerID()); | ||
285 | - pi.setMinWholesale(product.getMinNum()); | ||
286 | - pi.setCommentNum(product.getCommentNum());//评价人数 | ||
287 | - pi.setSingleBoxCount(product.getSingleBoxCount()); | ||
288 | - pi.setSingleBoxweight(product.getSingleBoxWeight()); | ||
289 | - //是否为特价商品 | ||
290 | - pi.setHasSpecial(product.getHasSpecial()); | ||
291 | - pi.setIsAllowDelivery(product.getIsAllowDelivery());//是否允许合作市场以外的市场进行交割 1-允许 2-不允许 | ||
292 | 261 | ||
293 | } | 262 | } |
294 | 263 | ||
@@ -314,44 +283,7 @@ public class GoodsServiceImpl implements GoodsService { | @@ -314,44 +283,7 @@ public class GoodsServiceImpl implements GoodsService { | ||
314 | return rePics; | 283 | return rePics; |
315 | } | 284 | } |
316 | 285 | ||
317 | - /** | ||
318 | - * 判断商品状态 | ||
319 | - * | ||
320 | - * @return | ||
321 | - * @createTime 2014年10月31日 下午6:24:56 | ||
322 | - * @author zhangshirui | ||
323 | - */ | ||
324 | - private int sumProductState(Product product) { | ||
325 | - //先设置为售罄 | ||
326 | - int tempState = ProductIntroduction.STATE_SOLD_OUT; | ||
327 | - if (product.getStatus().intValue() == ProductIntroduction.STATE_ON_SALE) { | ||
328 | - List<Sku> skuList = product.getSkus(); | ||
329 | - if (Validator.isEmpty(skuList)) { | ||
330 | - return tempState; | ||
331 | - } | ||
332 | - if (product.getQuotationType() == Goods.PRICE_TYPE_NORMAL) { | ||
333 | - //验证商品所有sku,如果有一个为大于最小起批量,则为有效商品 | ||
334 | - for (Sku sku : skuList) { | ||
335 | - if (sku.getStockNum() >= sku.getMinNum()) { | ||
336 | - tempState = ProductIntroduction.STATE_ON_SALE; | ||
337 | - break; | ||
338 | - } | ||
339 | - } | ||
340 | - } else { | ||
341 | - int stockNum = 0; | ||
342 | - for (Sku sku : skuList) { | ||
343 | - stockNum += sku.getStockNum(); | ||
344 | - } | ||
345 | - if (stockNum >= product.getMinNum()) { | ||
346 | - tempState = ProductIntroduction.STATE_ON_SALE; | ||
347 | - } | ||
348 | - } | ||
349 | 286 | ||
350 | - } else { | ||
351 | - tempState = ProductIntroduction.STATE_DOWN_DEL; | ||
352 | - } | ||
353 | - return tempState; | ||
354 | - } | ||
355 | 287 | ||
356 | /** | 288 | /** |
357 | * 商品交易量 | 289 | * 商品交易量 |
@@ -371,31 +303,7 @@ public class GoodsServiceImpl implements GoodsService { | @@ -371,31 +303,7 @@ public class GoodsServiceImpl implements GoodsService { | ||
371 | return count; | 303 | return count; |
372 | } | 304 | } |
373 | 305 | ||
374 | - private void buildProductPrice(Product product, ProductIntroduction pi) { | ||
375 | - //价格显示方式:普通方式,价格区间 | ||
376 | - List<ProductQuotation> pqList = product.getProductQuotation(); | ||
377 | - pi.setPrice((long) product.getMinPrice()); | ||
378 | - if (!Validator.isEmpty(pqList)) { | ||
379 | - //价格区间方式 | ||
380 | - pi.setPriceType(ProductIntroduction.PRICE_TYPE_QUOTATION); | ||
381 | - List<Quotation> qList = new ArrayList<Quotation>(); | ||
382 | - Quotation q = null; | ||
383 | - for (ProductQuotation pq : pqList) { | ||
384 | - q = new Quotation(); | ||
385 | - q.setMaxScope(pq.getMaxPurchaseScope()); | ||
386 | - q.setMinScope(pq.getMinPurchaseScope()); | ||
387 | - q.setPrice(pq.getPrice()); | ||
388 | - qList.add(q); | ||
389 | - } | ||
390 | - pi.setQuotationList(qList); | ||
391 | - } else { | ||
392 | - //普通价格方式 | ||
393 | - pi.setPriceType(ProductIntroduction.PRICE_TYPE_NORMAL); | ||
394 | - pi.setPrice((long) product.getMinPrice()); | ||
395 | - pi.setMinPrice((long) product.getMinPrice()); | ||
396 | - pi.setMaxPrice((long) product.getMaxPrice()); | ||
397 | - } | ||
398 | - } | 306 | + |
399 | 307 | ||
400 | @Override | 308 | @Override |
401 | public GetProductAppraiseResp getAppraises(GetProductAppraiseReq req) { | 309 | public GetProductAppraiseResp getAppraises(GetProductAppraiseReq req) { |
@@ -455,19 +363,7 @@ public class GoodsServiceImpl implements GoodsService { | @@ -455,19 +363,7 @@ public class GoodsServiceImpl implements GoodsService { | ||
455 | 363 | ||
456 | GetProductRecommendResp resp = new GetProductRecommendResp(); | 364 | GetProductRecommendResp resp = new GetProductRecommendResp(); |
457 | RecommendParams params = new RecommendParams(); | 365 | RecommendParams params = new RecommendParams(); |
458 | - if (req != null) { | ||
459 | - params.setCategoryId(Validator.isNull(req.getCategoryId()) ? 0L : req.getCategoryId()); | ||
460 | - if (req.getId() != null) { | ||
461 | - params.setProductIds(new long[]{req.getId()}); | ||
462 | - } | ||
463 | - if (!Validator.isNull(req.getUserId())) { | ||
464 | - params.setUserId(req.getUserId()); | ||
465 | - } | ||
466 | - long[] filterProductIds = req.getFilterProductIds(); | ||
467 | - if (filterProductIds != null && filterProductIds.length > 0) { | ||
468 | - params.setFilterProductIds(filterProductIds); | ||
469 | - } | ||
470 | - } | 366 | + |
471 | params.setClient(Constant.SEARCH_CLIENT_ANDROID); | 367 | params.setClient(Constant.SEARCH_CLIENT_ANDROID); |
472 | params.setType(RECOMMEND_TYPE_TRADE); | 368 | params.setType(RECOMMEND_TYPE_TRADE); |
473 | params.setUserLocalInfo("andriod"); | 369 | params.setUserLocalInfo("andriod"); |
@@ -490,13 +386,11 @@ public class GoodsServiceImpl implements GoodsService { | @@ -490,13 +386,11 @@ public class GoodsServiceImpl implements GoodsService { | ||
490 | goods.setId(product.getPid()); | 386 | goods.setId(product.getPid()); |
491 | goods.setPictures(product.getPictures()); | 387 | goods.setPictures(product.getPictures()); |
492 | goods.setPrice((long) product.getMinPrice()); | 388 | goods.setPrice((long) product.getMinPrice()); |
493 | - goods.setMinPrice((long) product.getMinPrice()); | ||
494 | - goods.setMaxPrice((long) product.getMaxPrice()); | 389 | + |
495 | goods.setUnit(product.getSaleUnit()); | 390 | goods.setUnit(product.getSaleUnit()); |
496 | goods.setTitle(product.getName()); | 391 | goods.setTitle(product.getName()); |
497 | goodsList.add(goods); | 392 | goodsList.add(goods); |
498 | } | 393 | } |
499 | - resp.setGoods(goodsList); | ||
500 | } | 394 | } |
501 | } | 395 | } |
502 | } | 396 | } |
@@ -528,12 +422,8 @@ public class GoodsServiceImpl implements GoodsService { | @@ -528,12 +422,8 @@ public class GoodsServiceImpl implements GoodsService { | ||
528 | logger.info("根据关键字搜索商品:keyword=" + req.getKeyword()); | 422 | logger.info("根据关键字搜索商品:keyword=" + req.getKeyword()); |
529 | factor.setKey(req.getKeyword()); | 423 | factor.setKey(req.getKeyword()); |
530 | } | 424 | } |
531 | - //转换查询参数 | ||
532 | - convertSearchParam(req, factor); | ||
533 | - // 获取搜索的商品结果 | ||
534 | //转换搜索结果 | 425 | //转换搜索结果 |
535 | SearchGoodsResult goodsResult = searchRPC.searchGoodsInfos(factor); | 426 | SearchGoodsResult goodsResult = searchRPC.searchGoodsInfos(factor); |
536 | - convertSearchResp(goodsResult, resp, req.getCategoryId()); | ||
537 | return resp; | 427 | return resp; |
538 | } | 428 | } |
539 | 429 | ||
@@ -613,22 +503,7 @@ public class GoodsServiceImpl implements GoodsService { | @@ -613,22 +503,7 @@ public class GoodsServiceImpl implements GoodsService { | ||
613 | */ | 503 | */ |
614 | private void convertSearchResp(SearchGoodsResult goodsResult, SearchProductResp resp, Integer categoryId) { | 504 | private void convertSearchResp(SearchGoodsResult goodsResult, SearchProductResp resp, Integer categoryId) { |
615 | 505 | ||
616 | - //商品列表 | ||
617 | - resp.setProducts(convertSearchToGoods(goodsResult.getGoodsList())); | ||
618 | - //筛选属性 | ||
619 | - resp.setAttributes(convertAttributes(goodsResult.getAttributes())); | ||
620 | - //最大页码 | ||
621 | - resp.setMaxPageNum(goodsResult.getPagination().getTotalPage()); | ||
622 | - if (!Validator.isNull(categoryId)) { | ||
623 | - //获取相关分类 | ||
624 | - com.dili.dd.searcher.datainterface.domain.category.Category category = goodsResult.getRoot(); | ||
625 | - //如果相关分类不为空 | ||
626 | - if (!Validator.isNull(category) && !Validator.isEmpty(category.getSubs())) { | ||
627 | - List<CategoryChoice> ccList = new ArrayList<CategoryChoice>(); | ||
628 | - convertCategory(category.getSubs(), ccList, categoryId); | ||
629 | - resp.setCategoryChoiceList(ccList); | ||
630 | - } | ||
631 | - } | 506 | + |
632 | } | 507 | } |
633 | 508 | ||
634 | /** | 509 | /** |
@@ -688,14 +563,12 @@ public class GoodsServiceImpl implements GoodsService { | @@ -688,14 +563,12 @@ public class GoodsServiceImpl implements GoodsService { | ||
688 | for (GoodsInfo goodsInfo : goodsList) { | 563 | for (GoodsInfo goodsInfo : goodsList) { |
689 | gs = new Goods(); | 564 | gs = new Goods(); |
690 | gs.setId(goodsInfo.getPid());// id | 565 | gs.setId(goodsInfo.getPid());// id |
691 | - gs.setSaleType(goodsInfo.getSaleType()); | ||
692 | gs.setPictures(new ArrayList<String>()); | 566 | gs.setPictures(new ArrayList<String>()); |
693 | gs.getPictures().add(PicUtils.convertPicUrl(goodsInfo.getImage(), Constant.COMMON_NUM_ONE, Constant.COMMON_NUM_THREE)); | 567 | gs.getPictures().add(PicUtils.convertPicUrl(goodsInfo.getImage(), Constant.COMMON_NUM_ONE, Constant.COMMON_NUM_THREE)); |
694 | gs.setTitle(goodsInfo.getTitle());// 标题 | 568 | gs.setTitle(goodsInfo.getTitle());// 标题 |
695 | gs.setPrice((long) goodsInfo.getPrice()); | 569 | gs.setPrice((long) goodsInfo.getPrice()); |
696 | gs.setUnit(goodsInfo.getAmountUnit()); | 570 | gs.setUnit(goodsInfo.getAmountUnit()); |
697 | 571 | ||
698 | - gs.setSalesNum(goodsInfo.getOrders() == null ? 0 : (long) goodsInfo.getOrders()); | ||
699 | location = ""; | 572 | location = ""; |
700 | if (!Validator.isNull(goodsInfo.getLocalityProvinceName())) { | 573 | if (!Validator.isNull(goodsInfo.getLocalityProvinceName())) { |
701 | location += goodsInfo.getLocalityProvinceName(); | 574 | location += goodsInfo.getLocalityProvinceName(); |
@@ -704,8 +577,6 @@ public class GoodsServiceImpl implements GoodsService { | @@ -704,8 +577,6 @@ public class GoodsServiceImpl implements GoodsService { | ||
704 | location += goodsInfo.getLocalityCityName(); | 577 | location += goodsInfo.getLocalityCityName(); |
705 | } | 578 | } |
706 | 579 | ||
707 | - gs.setHasSpecial(goodsInfo.getSpecialType()); //是否是特价商品 | ||
708 | - gs.setLocationAddr(location); | ||
709 | lstGoods.add(gs); | 580 | lstGoods.add(gs); |
710 | } | 581 | } |
711 | return lstGoods; | 582 | return lstGoods; |
@@ -729,17 +600,11 @@ public class GoodsServiceImpl implements GoodsService { | @@ -729,17 +600,11 @@ public class GoodsServiceImpl implements GoodsService { | ||
729 | for (GoodsInfo goodsInfo : goodsList) { | 600 | for (GoodsInfo goodsInfo : goodsList) { |
730 | gs = new Goods(); | 601 | gs = new Goods(); |
731 | gs.setId(goodsInfo.getPid());// id | 602 | gs.setId(goodsInfo.getPid());// id |
732 | - gs.setHasPromotion(goodsInfo.getPromote()); | ||
733 | - gs.setSaleType(goodsInfo.getSaleType()); | ||
734 | gs.setPictures(new ArrayList<String>()); | 603 | gs.setPictures(new ArrayList<String>()); |
735 | gs.getPictures().add(PicUtils.convertPicUrl(goodsInfo.getImage(), Constant.COMMON_NUM_ONE, Constant.COMMON_NUM_THREE)); | 604 | gs.getPictures().add(PicUtils.convertPicUrl(goodsInfo.getImage(), Constant.COMMON_NUM_ONE, Constant.COMMON_NUM_THREE)); |
736 | gs.setTitle(goodsInfo.getTitle());// 标题 | 605 | gs.setTitle(goodsInfo.getTitle());// 标题 |
737 | gs.setPrice((long) goodsInfo.getPrice()); | 606 | gs.setPrice((long) goodsInfo.getPrice()); |
738 | gs.setUnit(goodsInfo.getAmountUnit()); | 607 | gs.setUnit(goodsInfo.getAmountUnit()); |
739 | - gs.setSalesNum(goodsInfo.getOrders() == null ? 0 : (long) goodsInfo.getOrders()); | ||
740 | - gs.setMaxPrice(goodsInfo.getMaxPrice().longValue()); | ||
741 | - gs.setMinPrice(goodsInfo.getMinPrice().longValue()); | ||
742 | - gs.setMinWholesale(goodsInfo.getMinNum()); | ||
743 | location = ""; | 608 | location = ""; |
744 | if (!Validator.isNull(goodsInfo.getLocalityProvinceName())) { | 609 | if (!Validator.isNull(goodsInfo.getLocalityProvinceName())) { |
745 | location += goodsInfo.getLocalityProvinceName(); | 610 | location += goodsInfo.getLocalityProvinceName(); |
@@ -747,12 +612,6 @@ public class GoodsServiceImpl implements GoodsService { | @@ -747,12 +612,6 @@ public class GoodsServiceImpl implements GoodsService { | ||
747 | if (!Validator.isNull(goodsInfo.getLocalityCityName())) { | 612 | if (!Validator.isNull(goodsInfo.getLocalityCityName())) { |
748 | location += goodsInfo.getLocalityCityName(); | 613 | location += goodsInfo.getLocalityCityName(); |
749 | } | 614 | } |
750 | - gs.setLocationAddr(location); | ||
751 | - | ||
752 | - //列表店铺信息 | ||
753 | - gs.setShopInfo(buildShopInfo4ProductList(goodsInfo.getVendorId())); | ||
754 | - | ||
755 | - gs.setHasSpecial(goodsInfo.getSpecialType()); | ||
756 | lstGoods.add(gs); | 615 | lstGoods.add(gs); |
757 | } | 616 | } |
758 | return lstGoods; | 617 | return lstGoods; |
@@ -852,7 +711,6 @@ public class GoodsServiceImpl implements GoodsService { | @@ -852,7 +711,6 @@ public class GoodsServiceImpl implements GoodsService { | ||
852 | pCategory.setName(category.getCname()); | 711 | pCategory.setName(category.getCname()); |
853 | pCategory.setHasNext(category.isHasChild() ? ProductCategory.HASNEXT_YES : ProductCategory.HASNEXT_NO); | 712 | pCategory.setHasNext(category.isHasChild() ? ProductCategory.HASNEXT_YES : ProductCategory.HASNEXT_NO); |
854 | pCategory.setPid(Validator.isNull(req) ? null : req.getId()); | 713 | pCategory.setPid(Validator.isNull(req) ? null : req.getId()); |
855 | - pCategory.setIsFocus(ProductCategory.FOCUS_NO); | ||
856 | pCategory.setImgUrl(category.getIcon()); | 714 | pCategory.setImgUrl(category.getIcon()); |
857 | caList.add(pCategory); | 715 | caList.add(pCategory); |
858 | } | 716 | } |
@@ -875,8 +733,6 @@ public class GoodsServiceImpl implements GoodsService { | @@ -875,8 +733,6 @@ public class GoodsServiceImpl implements GoodsService { | ||
875 | pCategory.setHasNext(Validator.isEmpty(productCategoryRPC.getChildrenCategory(Long.valueOf(category.getCid()))) ? ProductCategory.HASNEXT_NO : ProductCategory.HASNEXT_YES); | 733 | pCategory.setHasNext(Validator.isEmpty(productCategoryRPC.getChildrenCategory(Long.valueOf(category.getCid()))) ? ProductCategory.HASNEXT_NO : ProductCategory.HASNEXT_YES); |
876 | } | 734 | } |
877 | pCategory.setPid(Validator.isNull(req) ? null : req.getId()); | 735 | pCategory.setPid(Validator.isNull(req) ? null : req.getId()); |
878 | - pCategory.setIsFocus(ProductCategory.FOCUS_NO); | ||
879 | -// pCategory.setIsFocus(careCategory == null ? ProductCategory.FOCUS_NO:careCategory.contains(pCategory.getId()) ? ProductCategory.FOCUS_YES: ProductCategory.FOCUS_NO); | ||
880 | pCategory.setImgUrl(category.getIcon()); | 736 | pCategory.setImgUrl(category.getIcon()); |
881 | resp.getProductCategorys().add(pCategory); | 737 | resp.getProductCategorys().add(pCategory); |
882 | } | 738 | } |
@@ -954,15 +810,9 @@ public class GoodsServiceImpl implements GoodsService { | @@ -954,15 +810,9 @@ public class GoodsServiceImpl implements GoodsService { | ||
954 | factor.setKey(req.getKeyword()); | 810 | factor.setKey(req.getKeyword()); |
955 | } | 811 | } |
956 | //设置置顶类型 | 812 | //设置置顶类型 |
957 | - if (!Validator.isNull(req.getTopOrderType())) { | ||
958 | - factor.setTopOrderType(TopOrderType.get(req.getTopOrderType())); | ||
959 | - } | ||
960 | - //2.0转换查询参数 | ||
961 | - convertSearchListParam(req, factor); | ||
962 | // 获取搜索的商品结果 | 813 | // 获取搜索的商品结果 |
963 | //2.0转换搜索结果 | 814 | //2.0转换搜索结果 |
964 | AppGoodsSearchResult goodsResult = searchRPC.searchGoodsResult(factor); | 815 | AppGoodsSearchResult goodsResult = searchRPC.searchGoodsResult(factor); |
965 | - convertSearchListResp(goodsResult, resp, req.getCategoryId()); | ||
966 | return resp; | 816 | return resp; |
967 | } | 817 | } |
968 | 818 | ||
@@ -1068,34 +918,6 @@ public class GoodsServiceImpl implements GoodsService { | @@ -1068,34 +918,6 @@ public class GoodsServiceImpl implements GoodsService { | ||
1068 | factor.setPagination(page); | 918 | factor.setPagination(page); |
1069 | } | 919 | } |
1070 | 920 | ||
1071 | - /** | ||
1072 | - * 2.0转换搜索结果 | ||
1073 | - * | ||
1074 | - * @param goodsResult | ||
1075 | - * @param resp | ||
1076 | - * @createTime 2014年9月17日 上午10:05:09 | ||
1077 | - * @author zhangshirui | ||
1078 | - */ | ||
1079 | - private void convertSearchListResp(AppGoodsSearchResult goodsResult, SearchProductResp resp, Integer categoryId) { | ||
1080 | - | ||
1081 | - // 商品列表 | ||
1082 | - resp.setProducts(convertSearchTGoods(goodsResult.getGoodsList())); | ||
1083 | - // 所在地 | ||
1084 | - resp.setProductions(convertProductions(goodsResult.getProductions())); | ||
1085 | - // 原产地 | ||
1086 | - resp.setLocalities(convertProductions(goodsResult.getLocalities())); | ||
1087 | - // 最大页码 | ||
1088 | - resp.setMaxPageNum(goodsResult.getPagination().getTotalPage()); | ||
1089 | - | ||
1090 | - // 获取相关分类 | ||
1091 | - // 如果相关分类不为空 | ||
1092 | - List<com.dili.dd.searcher.datainterface.domain.category.Category> categories = goodsResult.getCategories(); | ||
1093 | - if (!Validator.isEmpty(categories)) { | ||
1094 | - List<BaseTree> categorys = new ArrayList<BaseTree>(); | ||
1095 | - categorys = SupplyMsgServiceImpl.convertCategory(categories); | ||
1096 | - resp.setCategorys(categorys); | ||
1097 | - } | ||
1098 | - } | ||
1099 | 921 | ||
1100 | /** | 922 | /** |
1101 | * 原产地 、所在地转换 | 923 | * 原产地 、所在地转换 |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/buyer/home/impl/TopicServiceImpl.java
@@ -260,6 +260,7 @@ public class TopicServiceImpl implements TopicService { | @@ -260,6 +260,7 @@ public class TopicServiceImpl implements TopicService { | ||
260 | if (!Validator.isNull(content)){ | 260 | if (!Validator.isNull(content)){ |
261 | content = content.replaceAll("<p>", "").replaceAll("</p>", ""); | 261 | content = content.replaceAll("<p>", "").replaceAll("</p>", ""); |
262 | } | 262 | } |
263 | + topic.setId(articleDTO.getId()); | ||
263 | topic.setTopicContent(content); | 264 | topic.setTopicContent(content); |
264 | topic.setTopicName(articleDTO.getTitle()); | 265 | topic.setTopicName(articleDTO.getTitle()); |
265 | topic.setTopicType(returnTopicType(articleDTO.getSubTitle())); | 266 | topic.setTopicType(returnTopicType(articleDTO.getSubTitle())); |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/buyer/settle/CartService.java
1 | package com.diligrp.mobsite.getway.service.buyer.settle; | 1 | package com.diligrp.mobsite.getway.service.buyer.settle; |
2 | 2 | ||
3 | +import com.diligrp.mobsite.getway.domain.protocol.BaseResp; | ||
3 | import com.diligrp.mobsite.getway.domain.protocol.cart.*; | 4 | import com.diligrp.mobsite.getway.domain.protocol.cart.*; |
4 | import com.diligrp.mobsite.getway.domain.protocol.detail.GetServiceByPickupReq; | 5 | import com.diligrp.mobsite.getway.domain.protocol.detail.GetServiceByPickupReq; |
5 | import com.diligrp.mobsite.getway.domain.protocol.detail.GetServiceByPickupResp; | 6 | import com.diligrp.mobsite.getway.domain.protocol.detail.GetServiceByPickupResp; |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/buyer/settle/impl/CartServiceImpl.java
@@ -6,7 +6,6 @@ import com.diligrp.mobsite.getway.domain.common.Constant; | @@ -6,7 +6,6 @@ import com.diligrp.mobsite.getway.domain.common.Constant; | ||
6 | import com.diligrp.mobsite.getway.domain.common.ErrorMessage; | 6 | import com.diligrp.mobsite.getway.domain.common.ErrorMessage; |
7 | import com.diligrp.mobsite.getway.domain.common.ResultCode; | 7 | import com.diligrp.mobsite.getway.domain.common.ResultCode; |
8 | import com.diligrp.mobsite.getway.domain.common.enums.CreditStateEnum; | 8 | import com.diligrp.mobsite.getway.domain.common.enums.CreditStateEnum; |
9 | -import com.diligrp.mobsite.getway.domain.common.enums.user.FavoriteType; | ||
10 | import com.diligrp.mobsite.getway.domain.except.ServiceException; | 9 | import com.diligrp.mobsite.getway.domain.except.ServiceException; |
11 | import com.diligrp.mobsite.getway.domain.protocol.*; | 10 | import com.diligrp.mobsite.getway.domain.protocol.*; |
12 | import com.diligrp.mobsite.getway.domain.protocol.cart.*; | 11 | import com.diligrp.mobsite.getway.domain.protocol.cart.*; |
@@ -23,7 +22,6 @@ import com.diligrp.mobsite.getway.service.buyer.user.UserService; | @@ -23,7 +22,6 @@ import com.diligrp.mobsite.getway.service.buyer.user.UserService; | ||
23 | import com.diligrp.mobsite.getway.service.common.utils.DateUtils; | 22 | import com.diligrp.mobsite.getway.service.common.utils.DateUtils; |
24 | import com.diligrp.mobsite.getway.service.common.utils.PicUtils; | 23 | import com.diligrp.mobsite.getway.service.common.utils.PicUtils; |
25 | import com.diligrp.titan.sdk.domain.Product; | 24 | import com.diligrp.titan.sdk.domain.Product; |
26 | -import com.diligrp.titan.sdk.domain.ProductQuotation; | ||
27 | import com.diligrp.titan.sdk.domain.Sku; | 25 | import com.diligrp.titan.sdk.domain.Sku; |
28 | import com.diligrp.titan.sdk.input.DefindResult; | 26 | import com.diligrp.titan.sdk.input.DefindResult; |
29 | import com.diligrp.titan.sdk.util.SkuUtil; | 27 | import com.diligrp.titan.sdk.util.SkuUtil; |
@@ -144,14 +142,14 @@ public class CartServiceImpl implements CartService { | @@ -144,14 +142,14 @@ public class CartServiceImpl implements CartService { | ||
144 | List<CartItem> cartItems = cartInfo.getCartItemList(); | 142 | List<CartItem> cartItems = cartInfo.getCartItemList(); |
145 | shop = shopRPC.getShopById(cartItems.get(0).getShopId()); | 143 | shop = shopRPC.getShopById(cartItems.get(0).getShopId()); |
146 | for (CartItem cartItem : cartItems) { | 144 | for (CartItem cartItem : cartItems) { |
147 | - //失效商品:1.下架或者删除,2.库存小于最小起批量(拆单已经封装-isLowStock-true为大于库存) | ||
148 | - if (cartItem.getSkuStatus() != CartProduct.STATE_ON_SALE || cartItem.isLowStock() || cartItem.getStock()<=0) { | ||
149 | - convertCartProductAttr(invalidProductMap, cartItem, req.getUserId(),SOURCE_TYPE_CART); | ||
150 | - invalidNum ++; | ||
151 | - } else { | ||
152 | - //有效商品:将商品信息转换为属性项信息 | ||
153 | - convertCartProductAttr(productMap, cartItem, req.getUserId(),SOURCE_TYPE_CART); | ||
154 | - } | 145 | + ////失效商品:1.下架或者删除,2.库存小于最小起批量(拆单已经封装-isLowStock-true为大于库存) |
146 | + //if (cartItem.getSkuStatus() != CartProduct.STATE_ON_SALE || cartItem.isLowStock() || cartItem.getStock()<=0) { | ||
147 | + // convertCartProductAttr(invalidProductMap, cartItem, req.getUserId(),SOURCE_TYPE_CART); | ||
148 | + // invalidNum ++; | ||
149 | + //} else { | ||
150 | + // //有效商品:将商品信息转换为属性项信息 | ||
151 | + // convertCartProductAttr(productMap, cartItem, req.getUserId(),SOURCE_TYPE_CART); | ||
152 | + //} | ||
155 | //如果商品信息为空的话,则不设值,如果设值则为null,会影响手机端处理 | 153 | //如果商品信息为空的话,则不设值,如果设值则为null,会影响手机端处理 |
156 | if (productMap.size() > 0) { | 154 | if (productMap.size() > 0) { |
157 | cartShopInfo.setProducts(new ArrayList<CartProduct>(productMap.values())); | 155 | cartShopInfo.setProducts(new ArrayList<CartProduct>(productMap.values())); |
@@ -169,13 +167,7 @@ public class CartServiceImpl implements CartService { | @@ -169,13 +167,7 @@ public class CartServiceImpl implements CartService { | ||
169 | totalPrice = totalPrice + cartInfo.getTotalPrice(); | 167 | totalPrice = totalPrice + cartInfo.getTotalPrice(); |
170 | 168 | ||
171 | } | 169 | } |
172 | - if (invalidProductMap.size() > 0) { | ||
173 | - //设置失效商品 | ||
174 | - resp.setInvalidProduct(new ArrayList<CartProduct>(invalidProductMap.values())); | ||
175 | - resp.setInvalidProductNum(invalidNum); | ||
176 | - } | ||
177 | - resp.setTotalPrice(totalPrice); | ||
178 | - resp.setCartShopInfo(cartShopInfos); | 170 | + |
179 | return resp; | 171 | return resp; |
180 | } | 172 | } |
181 | 173 | ||
@@ -222,99 +214,19 @@ public class CartServiceImpl implements CartService { | @@ -222,99 +214,19 @@ public class CartServiceImpl implements CartService { | ||
222 | CartProduct cartProduct = productMap.get(productId); | 214 | CartProduct cartProduct = productMap.get(productId); |
223 | if (Validator.isNull(cartProduct)) { | 215 | if (Validator.isNull(cartProduct)) { |
224 | cartProduct = new CartProduct(); | 216 | cartProduct = new CartProduct(); |
225 | - cartProduct.setCategoryId((long)cartItem.getCid()); | ||
226 | cartProduct.setId(productId); | 217 | cartProduct.setId(productId); |
227 | - cartProduct.setMinWholesale(cartItem.getMinNum()); | ||
228 | - // cartProduct.setIsAllowDelivery(cartItem.getIsAllowDelivery()); | ||
229 | - //1.判断商品状态 | ||
230 | - if (cartItem.getSkuStatus() == CartProduct.STATE_ON_SALE) { | ||
231 | - if(!cartItem.isLowStock){ | ||
232 | - //在售 | ||
233 | - cartProduct.setState(CartProduct.STATE_ON_SALE); | ||
234 | - }else { | ||
235 | - cartProduct.setState(CartProduct.STATE_SOLD_OUT); | ||
236 | - //订单确认页的时候报错 | ||
237 | - if (type == SOURCE_TYPE_ORDER) { | ||
238 | - throw new ServiceException(ResultCode.BUSINESS_FAILED,"商品下架或者库存不足,请重新加入进货单"); | ||
239 | - } | ||
240 | - } | ||
241 | - } else { | ||
242 | - //删除或者下架 | ||
243 | - cartProduct.setState(CartProduct.STATE_DOWN_DEL); | ||
244 | - if (type == SOURCE_TYPE_ORDER) { | ||
245 | - throw new ServiceException(ResultCode.BUSINESS_FAILED,"商品下架或者库存不足,请重新加入进货单"); | ||
246 | - } | ||
247 | - } | ||
248 | - cartProduct.setUnitTog(cartItem.getUnitTog());//重量,单位克 | ||
249 | - cartProduct.setHasExpress(cartItem.getHasExpress());//是否支持第三方快递 1不支持 2支持 | 218 | + |
250 | cartProduct.setDefaultPic(PicUtils.convertPicUrl(cartItem.getPicture(), Constant.COMMON_NUM_ONE, Constant.COMMON_NUM_THREE)); | 219 | cartProduct.setDefaultPic(PicUtils.convertPicUrl(cartItem.getPicture(), Constant.COMMON_NUM_ONE, Constant.COMMON_NUM_THREE)); |
251 | cartProduct.setTitle(cartItem.getTitle()); | 220 | cartProduct.setTitle(cartItem.getTitle()); |
252 | cartProduct.setStockNum(Long.valueOf(cartItem.getStock())); | 221 | cartProduct.setStockNum(Long.valueOf(cartItem.getStock())); |
253 | cartProduct.setUnit(cartItem.getPriceUnit()); | 222 | cartProduct.setUnit(cartItem.getPriceUnit()); |
254 | - cartProduct.setBuyNum(cartItem.getPreAmount()); | ||
255 | cartProduct.setPrice(cartItem.getCurrPrice()); | 223 | cartProduct.setPrice(cartItem.getCurrPrice()); |
256 | - cartProduct.setPriceType(cartItem.getQuotationType()); | ||
257 | cartProduct.setSellerId(cartItem.getSellerId()); | 224 | cartProduct.setSellerId(cartItem.getSellerId()); |
258 | - cartProduct.setIsAllowDelivery(cartItem.getIsAllowDelivery()); | ||
259 | - if (!Validator.isNull(cartItem.getQuotationType()) | ||
260 | - && cartItem.getQuotationType() == CartProduct.PRICE_TYPE_QUOTATION) { | ||
261 | - cartProduct.setQuotationList(convertPriceRange(cartItem.getRanges())); | ||
262 | - } | 225 | + |
263 | 226 | ||
264 | productMap.put(productId, cartProduct); | 227 | productMap.put(productId, cartProduct); |
265 | } | 228 | } |
266 | 229 | ||
267 | - List<CartProductSku> cartAttrList = cartProduct.getCartProductAttrs(); | ||
268 | - //如果属性列表为空 | ||
269 | - if (Validator.isEmpty(cartAttrList)) { | ||
270 | - cartAttrList = new ArrayList<CartProductSku>(); | ||
271 | - cartProduct.setCartProductAttrs(cartAttrList); | ||
272 | - } | ||
273 | - //sku属性 | ||
274 | - CartProductSku cartSku = new CartProductSku(); | ||
275 | - //商品sku状态 | ||
276 | - if (cartItem.getSkuStatus() == CartProduct.STATE_ON_SALE) { | ||
277 | - if(!cartItem.isLowStock){ | ||
278 | - //在售 | ||
279 | - cartSku.setState(CartProduct.STATE_ON_SALE); | ||
280 | - }else { | ||
281 | - cartSku.setState(CartProduct.STATE_SOLD_OUT); | ||
282 | - if (type == SOURCE_TYPE_ORDER) { | ||
283 | - throw new ServiceException(ResultCode.BUSINESS_FAILED,"商品下架或者库存不足,请重新加入进货单"); | ||
284 | - } | ||
285 | - } | ||
286 | - } else { | ||
287 | - //删除或者下架 | ||
288 | - cartSku.setState(CartProduct.STATE_DOWN_DEL); | ||
289 | - if (type == SOURCE_TYPE_ORDER) { | ||
290 | - throw new ServiceException(ResultCode.BUSINESS_FAILED,"商品下架或者库存不足,请重新加入进货单"); | ||
291 | - } | ||
292 | - } | ||
293 | - cartSku.setSkuCartId(cartItem.getId()); | ||
294 | - cartSku.setStockNum(cartItem.getStock());//sku库存 | ||
295 | - cartSku.setMinWholesale(cartItem.getMinNum());//sku起批量 | ||
296 | - cartSku.setAttributeMap(cartItem.getAttrs());//sku属性值,如:颜色-红 | ||
297 | - cartSku.setSku(cartItem.getSku()); | ||
298 | - cartSku.setUnit(cartItem.getPriceUnit());//数据冗余,价格单位 | ||
299 | - cartSku.setPrice(cartItem.getCurrPrice());//sku最新价格 | ||
300 | - cartSku.setOldPrice(cartItem.getPrePrice());//sku旧的价格 | ||
301 | - cartSku.setBuyNum(cartItem.getAmount());//购买数量 | ||
302 | - cartSku.setIsAllowDelivery(cartItem.getIsAllowDelivery()); | ||
303 | - //更新购买数量和价格(规格报价价格是否变化,只有订单确认页的时候才) | ||
304 | - if(type == SOURCE_TYPE_ORDER && | ||
305 | - (cartItem.isPriceChange || cartItem.isNumChange())){ | ||
306 | - updateShopCart(cartItem, userId); | ||
307 | - } | ||
308 | - | ||
309 | - //购买数量变化 | ||
310 | - cartSku.setIsBuyNumChange(cartItem.isNumChange()? | ||
311 | - CartProductSku.BUY_NUM_CHANGE:CartProductSku.BUY_NUM_NO_CHANGE); | ||
312 | - //TODO 后期需要修改,价格变化 | ||
313 | - if (cartItem.isPriceChange && type == SOURCE_TYPE_CART) { | ||
314 | - cartProduct.setIsPriceChange(CartProduct.PRICE_CHANGE); | ||
315 | - cartSku.setIsPriceChange(CartProductSku.PRICE_CHANGE); | ||
316 | - } | ||
317 | - cartAttrList.add(cartSku); | ||
318 | } | 230 | } |
319 | 231 | ||
320 | /* | 232 | /* |
@@ -433,7 +345,7 @@ public class CartServiceImpl implements CartService { | @@ -433,7 +345,7 @@ public class CartServiceImpl implements CartService { | ||
433 | 345 | ||
434 | String sku = SkuUtil.encode(ProductUtils.getSkuStr(acp,true)); | 346 | String sku = SkuUtil.encode(ProductUtils.getSkuStr(acp,true)); |
435 | ShoppingCartReq shopReq = new ShoppingCartReq(); | 347 | ShoppingCartReq shopReq = new ShoppingCartReq(); |
436 | - shopReq.setProductId(req.getCartProduct().getProductId()); | 348 | + // shopReq.setProductId(req.getCartProduct().getProductId()); |
437 | shopReq.setSku(sku); | 349 | shopReq.setSku(sku); |
438 | shopReq.setUserId(req.getUserId()); | 350 | shopReq.setUserId(req.getUserId()); |
439 | List<ShoppingCartResp> shopingResp = userRPC.getCart(shopReq); | 351 | List<ShoppingCartResp> shopingResp = userRPC.getCart(shopReq); |
@@ -445,11 +357,11 @@ public class CartServiceImpl implements CartService { | @@ -445,11 +357,11 @@ public class CartServiceImpl implements CartService { | ||
445 | return resp; | 357 | return resp; |
446 | } | 358 | } |
447 | ConfirmCartReq cartReq = new ConfirmCartReq(); | 359 | ConfirmCartReq cartReq = new ConfirmCartReq(); |
448 | - cartReq.setSkuCartIds(new ArrayList<Long>()); | ||
449 | - cartReq.setUserId(req.getUserId()); | ||
450 | - for (ShoppingCartResp shoping : shopingResp) { | ||
451 | - cartReq.getSkuCartIds().add(shoping.getId()); | ||
452 | - } | 360 | + //cartReq.getSkus(new ArrayList<String>()); |
361 | + //cartReq.setUserId(req.getUserId()); | ||
362 | + //for (ShoppingCartResp shoping : shopingResp) { | ||
363 | + // cartReq.getSkuCartIds().add(shoping.getId()); | ||
364 | + //} | ||
453 | convertConfirmResp(cartReq, resp); | 365 | convertConfirmResp(cartReq, resp); |
454 | resp.setCartType(req.getCartType()); | 366 | resp.setCartType(req.getCartType()); |
455 | return resp; | 367 | return resp; |
@@ -465,8 +377,7 @@ public class CartServiceImpl implements CartService { | @@ -465,8 +377,7 @@ public class CartServiceImpl implements CartService { | ||
465 | private AddCartImmediatelyResp addCreditCart(AddCartImmediatelyReq req){ | 377 | private AddCartImmediatelyResp addCreditCart(AddCartImmediatelyReq req){ |
466 | 378 | ||
467 | //检验授信 | 379 | //检验授信 |
468 | - buildCreditState(req.getCartProduct().getShopId(), req.getUserId()); | ||
469 | - | 380 | + |
470 | AddCartImmediatelyResp resp = new AddCartImmediatelyResp(); | 381 | AddCartImmediatelyResp resp = new AddCartImmediatelyResp(); |
471 | resp.setCartType(req.getCartType()); | 382 | resp.setCartType(req.getCartType()); |
472 | 383 | ||
@@ -529,73 +440,10 @@ public class CartServiceImpl implements CartService { | @@ -529,73 +440,10 @@ public class CartServiceImpl implements CartService { | ||
529 | */ | 440 | */ |
530 | private ConfirmCartShopInfo buildConfirmCartShopInfo(AddCartProduct addCart){ | 441 | private ConfirmCartShopInfo buildConfirmCartShopInfo(AddCartProduct addCart){ |
531 | ConfirmCartShopInfo cartShopInfo = new ConfirmCartShopInfo(); | 442 | ConfirmCartShopInfo cartShopInfo = new ConfirmCartShopInfo(); |
532 | - Long productId = addCart.getProductId(); | ||
533 | - Product productInfo = productRPC.getGoodsById(productId, new String[]{}); | ||
534 | - | ||
535 | - //1.判断商品状态 | ||
536 | - if (productInfo.getStatus() == CartProduct.STATE_ON_SALE) { | ||
537 | - String skuStr = ProductUtils.getSkuStr(addCart,true); | ||
538 | - skuStr = SkuUtil.encode(skuStr); | ||
539 | - Sku skuInfo = null; | ||
540 | - List<Sku> skuList = productInfo.getSkus(); | ||
541 | - for (Sku sku : skuList) { | ||
542 | - if (skuStr.equals(sku.getSku())) { | ||
543 | - skuInfo = sku; | ||
544 | - break; | ||
545 | - } | ||
546 | - } | ||
547 | - int minNum = 0;//最小起批量 | ||
548 | - if (productInfo.getQuotationType() == Goods.PRICE_TYPE_QUOTATION) { | ||
549 | - minNum = productInfo.getMinNum(); | ||
550 | - }else { | ||
551 | - minNum = skuInfo.getMinNum(); | ||
552 | - } | ||
553 | - if(Validator.isNull(skuInfo) || skuInfo.getStockNum() < minNum){ | ||
554 | - throw new ServiceException(ResultCode.BUSINESS_FAILED,ErrorMessage.PRODUCT_STATE_SOLDOUT); | ||
555 | - } | ||
556 | - if (addCart.getAmount() > skuInfo.getStockNum()) {//购买数量大于库存 | ||
557 | - throw new ServiceException(ResultCode.BUSINESS_FAILED,ErrorMessage.PRODUCT_BUYNUM_MORE_THAN_STOCK); | ||
558 | - } | ||
559 | - if (addCart.getAmount() < minNum) {//购买数量小于起批量 | ||
560 | - throw new ServiceException(ResultCode.BUSINESS_FAILED,ErrorMessage.PRODUCT_BUYNUM_LESS_THAN_LEAST); | ||
561 | - } | ||
562 | - } else { | ||
563 | - //删除或者下架 | ||
564 | - throw new ServiceException(ResultCode.BUSINESS_FAILED,ErrorMessage.PRODUCT_STATE_DOWNORDEL); | ||
565 | - } | ||
566 | - | ||
567 | - //店铺信息 | ||
568 | - cartShopInfo.setId(addCart.getShopId()); | ||
569 | - Shop shop = shopRPC.getShopById(addCart.getShopId()); | ||
570 | - if (!Validator.isNull(shop)) { | ||
571 | - cartShopInfo.setShopAddress(configRPC.getProvinceAndCityByZoneId(shop.getAddressId(), false)+shop.getAddressText()); | ||
572 | - cartShopInfo.setMobile(shop.getContactPhone()); | ||
573 | - cartShopInfo.setMarketId(shop.getMarketId() == null ? null : shop.getMarketId().intValue()); | ||
574 | - cartShopInfo.setName(shop.getShopName());//店铺名称 | ||
575 | - buildShopLocationResp(cartShopInfo, shop.getAddressId()); | ||
576 | - } | ||
577 | - | ||
578 | - Map<Long, CartProduct> cartMap = new HashMap<Long, CartProduct>(); | ||
579 | - cartShopInfo.setCartProductMap(cartMap); | ||
580 | - CartProduct cartProduct = new CartProduct(); | ||
581 | - cartMap.put(productId, cartProduct); | ||
582 | - cartProduct.setDefaultPic(productInfo.getDefaultPic()); | ||
583 | - cartProduct.setId(productId); | ||
584 | - cartProduct.setTitle(productInfo.getName()); | ||
585 | - cartProduct.setHasSpecial(productInfo.getHasSpecial()); //是否为特价商品 | ||
586 | - | ||
587 | - //提货时间 | ||
588 | - List<Integer> preTimeList = new ArrayList<Integer>(); | ||
589 | - preTimeList.add(Integer.valueOf(productInfo.getPrepareTime())); | ||
590 | - convertPickUpTime(preTimeList, cartShopInfo, Integer.valueOf(productInfo.getSaleType())); | 443 | + |
444 | + | ||
591 | 445 | ||
592 | - //构建商品sku信息 | ||
593 | - List<CartProductSku> cartSkus = new ArrayList<CartProductSku>(); | ||
594 | - CartProductSku cartSku = buildCartProductSku(addCart, productInfo); | ||
595 | - cartSkus.add(cartSku); | ||
596 | - cartProduct.setCartProductAttrs(cartSkus); | ||
597 | - //店铺总价格 | ||
598 | - cartShopInfo.setTotalPrice(cartSku.getBuyNum()*cartSku.getPrice()); | 446 | + |
599 | 447 | ||
600 | return cartShopInfo; | 448 | return cartShopInfo; |
601 | } | 449 | } |
@@ -613,7 +461,7 @@ public class CartServiceImpl implements CartService { | @@ -613,7 +461,7 @@ public class CartServiceImpl implements CartService { | ||
613 | String sku = SkuUtil.encode(ProductUtils.getSkuStr(addCart,true)); | 461 | String sku = SkuUtil.encode(ProductUtils.getSkuStr(addCart,true)); |
614 | 462 | ||
615 | CartProductSku cartSku = new CartProductSku(); | 463 | CartProductSku cartSku = new CartProductSku(); |
616 | - cartSku.setBuyNum(addCart.getAmount()); | 464 | + cartSku.setBuyNum(addCart.getQuantity()); |
617 | cartSku.setUnit(productInfo.getSaleUnit()); | 465 | cartSku.setUnit(productInfo.getSaleUnit()); |
618 | cartSku.setSku(sku); | 466 | cartSku.setSku(sku); |
619 | 467 | ||
@@ -639,44 +487,7 @@ public class CartServiceImpl implements CartService { | @@ -639,44 +487,7 @@ public class CartServiceImpl implements CartService { | ||
639 | * @author zhangshirui | 487 | * @author zhangshirui |
640 | */ | 488 | */ |
641 | private void buildCartSkuPrice(CartProductSku cartSku,Sku buySku,AddCartProduct addCart,Product productInfo){ | 489 | private void buildCartSkuPrice(CartProductSku cartSku,Sku buySku,AddCartProduct addCart,Product productInfo){ |
642 | - //价格计算 | ||
643 | - if (productInfo.getQuotationType() == Goods.PRICE_TYPE_NORMAL) { | ||
644 | - //规格报价 | ||
645 | - if (addCart.getPrice() != buySku.getPrice()) { | ||
646 | - cartSku.setIsPriceChange(CartProductSku.PRICE_CHANGE); | ||
647 | - } | ||
648 | - cartSku.setPrice((long)buySku.getPrice()); | ||
649 | - }else { | ||
650 | - int buyNum = addCart.getAmount(); | ||
651 | - | ||
652 | - Quotation quotation = null; | ||
653 | - ProductQuotation productQuotation = null; | ||
654 | - List<Quotation> quotations = addCart.getQuotationList(); | ||
655 | - for (Quotation q : quotations) { | ||
656 | - if (buyNum >= q.getMinScope() && (q.getMaxScope()==null || buyNum <= q.getMaxScope())) { | ||
657 | - quotation = q; | ||
658 | - break; | ||
659 | - } | ||
660 | - } | ||
661 | - if (Validator.isNull(quotation)) { | ||
662 | - throw new ServiceException(ResultCode.BUSINESS_FAILED,ErrorMessage.ORDER_PRODUCT_STATE_CHANGE); | ||
663 | - } | ||
664 | - List<ProductQuotation> productQuotations = productInfo.getProductQuotation(); | ||
665 | - for (ProductQuotation pq : productQuotations) { | ||
666 | - if (quotation.getId() == pq.getId()) { | ||
667 | - productQuotation = pq; | ||
668 | - break; | ||
669 | - } | ||
670 | - } | ||
671 | - | ||
672 | - if (Validator.isNull(productQuotation)) { | ||
673 | - throw new ServiceException(ResultCode.BUSINESS_FAILED,ErrorMessage.ORDER_PRODUCT_STATE_CHANGE); | ||
674 | - } | ||
675 | - cartSku.setPrice((long)productQuotation.getPrice()); | ||
676 | - if (productQuotation.getPrice() != quotation.getPrice()) { | ||
677 | - cartSku.setIsPriceChange(CartProductSku.PRICE_CHANGE); | ||
678 | - } | ||
679 | - } | 490 | + |
680 | } | 491 | } |
681 | 492 | ||
682 | @Override | 493 | @Override |
@@ -699,10 +510,7 @@ public class CartServiceImpl implements CartService { | @@ -699,10 +510,7 @@ public class CartServiceImpl implements CartService { | ||
699 | if (Validator.isNull(productInfo)) { | 510 | if (Validator.isNull(productInfo)) { |
700 | throw new ServiceException(ErrorMessage.ORDER_PRODUCT_STATE_CHANGE); | 511 | throw new ServiceException(ErrorMessage.ORDER_PRODUCT_STATE_CHANGE); |
701 | } | 512 | } |
702 | - //1.判断商品状态,删除或者下架 | ||
703 | - if (productInfo.getStatus() != CartProduct.STATE_ON_SALE) { | ||
704 | - throw new ServiceException(ResultCode.BUSINESS_FAILED,ErrorMessage.PRODUCT_STATE_DOWNORDEL); | ||
705 | - } | 513 | + |
706 | 514 | ||
707 | //判断区间报价的商品是否有效 | 515 | //判断区间报价的商品是否有效 |
708 | judgeStockInvalid(productInfo); | 516 | judgeStockInvalid(productInfo); |
@@ -711,11 +519,9 @@ public class CartServiceImpl implements CartService { | @@ -711,11 +519,9 @@ public class CartServiceImpl implements CartService { | ||
711 | saleInfo.setId(productInfo.getPid()); | 519 | saleInfo.setId(productInfo.getPid()); |
712 | saleInfo.setUnit(productInfo.getSaleUnit()); | 520 | saleInfo.setUnit(productInfo.getSaleUnit()); |
713 | saleInfo.setState(productInfo.getStatus()); | 521 | saleInfo.setState(productInfo.getStatus()); |
714 | - saleInfo.setMinWholesale(productInfo.getMinNum()); | ||
715 | saleInfo.setStockNum(productInfo.getStockNum()); | 522 | saleInfo.setStockNum(productInfo.getStockNum()); |
716 | saleInfo.setDefaultPic(productInfo.getDefaultPic()); | 523 | saleInfo.setDefaultPic(productInfo.getDefaultPic()); |
717 | saleInfo.setTitle(productInfo.getName()); | 524 | saleInfo.setTitle(productInfo.getName()); |
718 | - saleInfo.setHasSpecial(productInfo.getHasSpecial()); | ||
719 | ShopInfo shopInfo = new ShopInfo(); | 525 | ShopInfo shopInfo = new ShopInfo(); |
720 | shopInfo.setId(productInfo.getVendorId()); | 526 | shopInfo.setId(productInfo.getVendorId()); |
721 | saleInfo.setShopInfo(shopInfo); | 527 | saleInfo.setShopInfo(shopInfo); |
@@ -798,32 +604,7 @@ public class CartServiceImpl implements CartService { | @@ -798,32 +604,7 @@ public class CartServiceImpl implements CartService { | ||
798 | * @author zhangshirui | 604 | * @author zhangshirui |
799 | */ | 605 | */ |
800 | private void convertPriceInfo(SaleInfo saleInfo,Product product){ | 606 | private void convertPriceInfo(SaleInfo saleInfo,Product product){ |
801 | - /*价格方式*/ | ||
802 | - int priceType = product.getQuotationType(); | ||
803 | - saleInfo.setPriceType(priceType); | ||
804 | - //规格报价 | ||
805 | - if (priceType == ProductSaleInfo.PRICE_TYPE_NORMAL) { | ||
806 | - //最低价格 | ||
807 | - saleInfo.setMinPrice(product.getMinPrice().longValue()); | ||
808 | - //最高价格 | ||
809 | - saleInfo.setMaxPrice(product.getMaxPrice().longValue()); | ||
810 | - } else { | ||
811 | - //区间报价 | ||
812 | - List<ProductQuotation> pqList = product.getProductQuotation(); | ||
813 | - if (!Validator.isEmpty(pqList)) { | ||
814 | - List<Quotation> qList = new ArrayList<Quotation>(); | ||
815 | - Quotation q = null; | ||
816 | - for (ProductQuotation pq : pqList) { | ||
817 | - q = new Quotation(); | ||
818 | - q.setId(pq.getId()); | ||
819 | - q.setMaxScope(pq.getMaxPurchaseScope()); | ||
820 | - q.setMinScope(pq.getMinPurchaseScope()); | ||
821 | - q.setPrice(pq.getPrice()); | ||
822 | - qList.add(q); | ||
823 | - } | ||
824 | - saleInfo.setQuotationList(qList); | ||
825 | - } | ||
826 | - } | 607 | + |
827 | } | 608 | } |
828 | 609 | ||
829 | /** | 610 | /** |
@@ -854,27 +635,14 @@ public class CartServiceImpl implements CartService { | @@ -854,27 +635,14 @@ public class CartServiceImpl implements CartService { | ||
854 | logger.error(String.format("SKU解码失败[pid=%s,sku=%s]", productId, sku.getSku()), e); | 635 | logger.error(String.format("SKU解码失败[pid=%s,sku=%s]", productId, sku.getSku()), e); |
855 | continue; | 636 | continue; |
856 | } | 637 | } |
857 | - if(!Validator.isEmpty(skuLongs)){ | ||
858 | - for (int i=0,len=skuLongs.size();i<len;i++) { | 638 | + if(!Validator.isEmpty(skuLongs)) { |
639 | + for (int i = 0, len = skuLongs.size(); i < len; i++) { | ||
859 | skuValueSb.append(skuLongs.get(i)); | 640 | skuValueSb.append(skuLongs.get(i)); |
860 | } | 641 | } |
861 | - } | ||
862 | - /* | ||
863 | - * 1.区间报价的时候,价格和起批量在商品上,只有库存在sku上 | ||
864 | - * 2.规格报价的时候,价格、起批量、库存都在sku上 | ||
865 | - */ | ||
866 | - if (priceType == Goods.PRICE_TYPE_NORMAL) { | ||
867 | - skuInfo.setMinWholesale(sku.getMinNum()); | ||
868 | - skuInfo.setPrice(Long.valueOf(sku.getPrice())); | ||
869 | - } | ||
870 | - skuInfo.setStockNum(sku.getStockNum()); | ||
871 | - if (Validator.isNull(sku.getVersion())) { | ||
872 | - logger.error(String.format("未找到SKU版本[pid=%s,sku=%s]", productId, sku.getSku())); | ||
873 | - continue; | ||
874 | - } | ||
875 | - skuInfoMap.put(skuValueSb.toString(), skuInfo); | ||
876 | - } | ||
877 | - } | 642 | + |
643 | + }}} | ||
644 | + | ||
645 | + | ||
878 | return skuInfoMap; | 646 | return skuInfoMap; |
879 | } | 647 | } |
880 | 648 | ||
@@ -891,23 +659,7 @@ public class CartServiceImpl implements CartService { | @@ -891,23 +659,7 @@ public class CartServiceImpl implements CartService { | ||
891 | */ | 659 | */ |
892 | private void judgeStockInvalid(Product product){ | 660 | private void judgeStockInvalid(Product product){ |
893 | List<Sku> skuList = product.getSkus(); | 661 | List<Sku> skuList = product.getSkus(); |
894 | - if (product.getQuotationType() == Goods.PRICE_TYPE_NORMAL) { | ||
895 | - int invalidNum = 0; | ||
896 | - //规格报价,如果所有sku都失效,则商品为失效 | ||
897 | - for (Sku sku : skuList) { | ||
898 | - if (sku.getStockNum() < sku.getMinNum()) { | ||
899 | - invalidNum ++; | ||
900 | - } | ||
901 | - } | ||
902 | - if (invalidNum == skuList.size()) { | ||
903 | - throw new ServiceException(ErrorMessage.PRODUCT_STATE_SOLDOUT); | ||
904 | - } | ||
905 | - }else { | ||
906 | - //区间报价商品,库存小于最小起批量,则失效 | ||
907 | - if (product.getStockNum() < product.getMinNum()) { | ||
908 | - throw new ServiceException(ErrorMessage.PRODUCT_STATE_SOLDOUT); | ||
909 | - } | ||
910 | - } | 662 | + |
911 | } | 663 | } |
912 | 664 | ||
913 | /** | 665 | /** |
@@ -965,53 +717,14 @@ public class CartServiceImpl implements CartService { | @@ -965,53 +717,14 @@ public class CartServiceImpl implements CartService { | ||
965 | private boolean compareAttribute(final com.diligrp.titan.sdk.domain.AttributeValue valueItem, | 717 | private boolean compareAttribute(final com.diligrp.titan.sdk.domain.AttributeValue valueItem, |
966 | final List<com.diligrp.titan.sdk.domain.Attribute> srcAttribute, | 718 | final List<com.diligrp.titan.sdk.domain.Attribute> srcAttribute, |
967 | int rowIndex, Map<String, SKUInfo> skuInfoMap,int priceType) { | 719 | int rowIndex, Map<String, SKUInfo> skuInfoMap,int priceType) { |
968 | - // 如果为一级 | ||
969 | - if(rowIndex == 0) { | ||
970 | - List<com.diligrp.titan.sdk.domain.AttributeValue> secondRowValues = null; | ||
971 | - SKUInfo skuI = null; | ||
972 | - // 没有第二个属性组 | ||
973 | - if((srcAttribute.size() == 1 || Validator.isEmpty((secondRowValues = srcAttribute.get(1).getValues())))) { | ||
974 | - skuI = skuInfoMap.get(valueItem.getAttValueId() + ""); | ||
975 | - if (priceType == Goods.PRICE_TYPE_QUOTATION) { | ||
976 | - if (!Validator.isNull(skuI) && skuI.getStockNum() > 0) { | ||
977 | - return true; | ||
978 | - } | ||
979 | - }else { | ||
980 | - if (!Validator.isNull(skuI) && skuI.getStockNum() >= skuI.getMinWholesale()) { | ||
981 | - return true; | ||
982 | - } | ||
983 | - } | ||
984 | - return false; | ||
985 | - } | ||
986 | - for (com.diligrp.titan.sdk.domain.AttributeValue secondRowValue : secondRowValues) { | ||
987 | - skuI = skuInfoMap.get(valueItem.getAttValueId()+""+secondRowValue.getAttValueId()); | ||
988 | - if (priceType == Goods.PRICE_TYPE_QUOTATION) { | ||
989 | - if (!Validator.isNull(skuI) && skuI.getStockNum() > 0) { | ||
990 | - return true; | ||
991 | - } | ||
992 | - }else { | ||
993 | - if (!Validator.isNull(skuI) && skuI.getStockNum() >= skuI.getMinWholesale()) { | ||
994 | - return true; | ||
995 | - } | ||
996 | - } | ||
997 | - } | ||
998 | - return false; | ||
999 | - } | 720 | + |
1000 | 721 | ||
1001 | //取出第一层的属性组值 | 722 | //取出第一层的属性组值 |
1002 | final List<com.diligrp.titan.sdk.domain.AttributeValue> firstRowValues = srcAttribute.get(0).getValues(); | 723 | final List<com.diligrp.titan.sdk.domain.AttributeValue> firstRowValues = srcAttribute.get(0).getValues(); |
1003 | SKUInfo skuI = null; | 724 | SKUInfo skuI = null; |
1004 | for (com.diligrp.titan.sdk.domain.AttributeValue firstRowValue : firstRowValues) { | 725 | for (com.diligrp.titan.sdk.domain.AttributeValue firstRowValue : firstRowValues) { |
1005 | skuI = skuInfoMap.get(firstRowValue.getAttValueId()+""+valueItem.getAttValueId()); | 726 | skuI = skuInfoMap.get(firstRowValue.getAttValueId()+""+valueItem.getAttValueId()); |
1006 | - if (priceType == Goods.PRICE_TYPE_QUOTATION) { | ||
1007 | - if (!Validator.isNull(skuI) && skuI.getStockNum() > 0) { | ||
1008 | - return true; | ||
1009 | - } | ||
1010 | - }else { | ||
1011 | - if (!Validator.isNull(skuI) && skuI.getStockNum() >= skuI.getMinWholesale()) { | ||
1012 | - return true; | ||
1013 | - } | ||
1014 | - } | 727 | + |
1015 | } | 728 | } |
1016 | return false; | 729 | return false; |
1017 | } | 730 | } |
@@ -1088,7 +801,7 @@ public class CartServiceImpl implements CartService { | @@ -1088,7 +801,7 @@ public class CartServiceImpl implements CartService { | ||
1088 | //2.从用户中心获取进货单数据 | 801 | //2.从用户中心获取进货单数据 |
1089 | List<ShoppingCartResp> shoppingCartResps = getCartsByUser(userId); | 802 | List<ShoppingCartResp> shoppingCartResps = getCartsByUser(userId); |
1090 | //3.进货单列表信息 | 803 | //3.进货单列表信息 |
1091 | - List<Long> skuCartIds = req.getSkuCartIds(); | 804 | + List<String> skuCartIds = req.getSkus(); |
1092 | if (Validator.isEmpty(shoppingCartResps) || Validator.isEmpty(skuCartIds)) { | 805 | if (Validator.isEmpty(shoppingCartResps) || Validator.isEmpty(skuCartIds)) { |
1093 | return; | 806 | return; |
1094 | } | 807 | } |
@@ -1164,13 +877,7 @@ public class CartServiceImpl implements CartService { | @@ -1164,13 +877,7 @@ public class CartServiceImpl implements CartService { | ||
1164 | //TODO 后期需要修改,结构体 | 877 | //TODO 后期需要修改,结构体 |
1165 | Map<Long, CartProduct> productMap = new HashMap<Long, CartProduct>(); | 878 | Map<Long, CartProduct> productMap = new HashMap<Long, CartProduct>(); |
1166 | for (CartItem cartItem : cartInfo.getCartItemList()) { | 879 | for (CartItem cartItem : cartInfo.getCartItemList()) { |
1167 | - //商品在售、库存大于0 | ||
1168 | - if (cartItem.getSkuStatus() == CartProduct.STATE_ON_SALE && cartItem.getStock() > 0) { | ||
1169 | - //将商品信息转换为属性项信息 | ||
1170 | - convertCartProductAttr(productMap, cartItem, userId,SOURCE_TYPE_ORDER); | ||
1171 | - }else { | ||
1172 | - throw new ServiceException(ErrorMessage.PRODUCT_STATE_CHANGE); | ||
1173 | - } | 880 | + |
1174 | cartShop.setCartProductMap(productMap); | 881 | cartShop.setCartProductMap(productMap); |
1175 | } | 882 | } |
1176 | //店铺价格 | 883 | //店铺价格 |
@@ -1251,12 +958,7 @@ public class CartServiceImpl implements CartService { | @@ -1251,12 +958,7 @@ public class CartServiceImpl implements CartService { | ||
1251 | int pStartTime = 0;//最小备货时间 | 958 | int pStartTime = 0;//最小备货时间 |
1252 | int pEndTime = 0;//最大备货时间 | 959 | int pEndTime = 0;//最大备货时间 |
1253 | pStartTime += pTime; | 960 | pStartTime += pTime; |
1254 | - if(saleType == Goods.FLAG_THIRD_PARTY){ | ||
1255 | - pEndTime =pStartTime + 3*24; | ||
1256 | - }else { | ||
1257 | - //最大时间=最小时间+7天 | ||
1258 | - pEndTime = pStartTime + 7 * 24; | ||
1259 | - } | 961 | + |
1260 | Date minDate = null; | 962 | Date minDate = null; |
1261 | Date maxDate = null; | 963 | Date maxDate = null; |
1262 | try { | 964 | try { |
@@ -1273,7 +975,7 @@ public class CartServiceImpl implements CartService { | @@ -1273,7 +975,7 @@ public class CartServiceImpl implements CartService { | ||
1273 | @Override | 975 | @Override |
1274 | public DelCartsResp delCartByIds(DelCartsReq req) { | 976 | public DelCartsResp delCartByIds(DelCartsReq req) { |
1275 | DelCartsResp resp = new DelCartsResp(); | 977 | DelCartsResp resp = new DelCartsResp(); |
1276 | - userRPC.delCartByIds(req.getUserId(), req.getCartIds()); | 978 | + userRPC.delCartByIds(req.getUserId(), req.getSkus()); |
1277 | 979 | ||
1278 | resp.setCartNum(getCartNum(req.getUserId()).getCartNum()); | 980 | resp.setCartNum(getCartNum(req.getUserId()).getCartNum()); |
1279 | return resp; | 981 | return resp; |
@@ -1301,29 +1003,7 @@ public class CartServiceImpl implements CartService { | @@ -1301,29 +1003,7 @@ public class CartServiceImpl implements CartService { | ||
1301 | for (Product skuInfo : skuMap.values()) { | 1003 | for (Product skuInfo : skuMap.values()) { |
1302 | if (!Validator.isNull(skuInfo)) { | 1004 | if (!Validator.isNull(skuInfo)) { |
1303 | //已经下架 | 1005 | //已经下架 |
1304 | - if (skuInfo.getStatus()!=Goods.STATE_ON_SALE) { | ||
1305 | - cartNum--; | ||
1306 | - }else { | ||
1307 | - //如果是区间报价,库存为0的就下架了 | ||
1308 | - if (skuInfo.getQuotationType() == Goods.PRICE_TYPE_QUOTATION) { | ||
1309 | - if (Validator.isEmpty(skuInfo.getSkus())) { | ||
1310 | - cartNum--; | ||
1311 | - continue; | ||
1312 | - } | ||
1313 | - int stockNum = 0; | ||
1314 | - for(Sku sku : skuInfo.getSkus()){ | ||
1315 | - stockNum += sku.getStockNum(); | ||
1316 | - } | ||
1317 | - if (stockNum<skuInfo.getMinNum()) { | ||
1318 | - cartNum--; | ||
1319 | - } | ||
1320 | - }else { | ||
1321 | - //规格报价的,库存小于起批量 | ||
1322 | - if (skuInfo.getStockNum()<skuInfo.getMinNum()) { | ||
1323 | - cartNum--; | ||
1324 | - } | ||
1325 | - } | ||
1326 | - } | 1006 | + |
1327 | } | 1007 | } |
1328 | } | 1008 | } |
1329 | 1009 | ||
@@ -1342,11 +1022,7 @@ public class CartServiceImpl implements CartService { | @@ -1342,11 +1022,7 @@ public class CartServiceImpl implements CartService { | ||
1342 | spotSaleInfo.getShopInfo().setName(shop.getShopName()); | 1022 | spotSaleInfo.getShopInfo().setName(shop.getShopName()); |
1343 | spotSaleInfo.getShopInfo().setSellerId(shop.getUserId()); | 1023 | spotSaleInfo.getShopInfo().setSellerId(shop.getUserId()); |
1344 | } | 1024 | } |
1345 | - //特价商品返回购买数量 | ||
1346 | - if (req.getUserId() != null && spotSaleInfo.getHasSpecial().intValue() ==2 ) { | ||
1347 | - Integer count = sellerOrderRPC.getBuyedCount(req.getProductId(), req.getUserId()); | ||
1348 | - spotSaleInfo.setBuyedCount(count);//已购商品数量 | ||
1349 | - } | 1025 | + |
1350 | 1026 | ||
1351 | //用户授信信息 | 1027 | //用户授信信息 |
1352 | buildCreditState(spotSaleInfo,spotSaleInfo.getShopInfo().getId(), req.getUserId()); | 1028 | buildCreditState(spotSaleInfo,spotSaleInfo.getShopInfo().getId(), req.getUserId()); |
@@ -1358,9 +1034,9 @@ public class CartServiceImpl implements CartService { | @@ -1358,9 +1034,9 @@ public class CartServiceImpl implements CartService { | ||
1358 | @Override | 1034 | @Override |
1359 | public MoveToFavoriteResp moveToFavorite(MoveToFavoriteReq req) { | 1035 | public MoveToFavoriteResp moveToFavorite(MoveToFavoriteReq req) { |
1360 | 1036 | ||
1361 | - userRPC.addFavorite(req.getUserId(),req.getGoodsId(),FavoriteType.PRODUCT.getType()); | ||
1362 | - | ||
1363 | - userRPC.delCartByIds(req.getUserId(), req.getCartIds()); | 1037 | + //userRPC.addFavorite(req.getUserId(),req.getGoodsId(),FavoriteType.PRODUCT.getType()); |
1038 | + // | ||
1039 | + //userRPC.delCartByIds(req.getUserId(), req.getCartIds()); | ||
1364 | 1040 | ||
1365 | return new MoveToFavoriteResp(); | 1041 | return new MoveToFavoriteResp(); |
1366 | } | 1042 | } |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/buyer/shop/ShopService.java
@@ -18,7 +18,7 @@ public interface ShopService { | @@ -18,7 +18,7 @@ public interface ShopService { | ||
18 | @Deprecated | 18 | @Deprecated |
19 | SearchShopResp searchKeyword(SearchShopReq req); | 19 | SearchShopResp searchKeyword(SearchShopReq req); |
20 | 20 | ||
21 | - GetShopIntroductionResp getById(GetShopIntroductionReq req); | 21 | + GetShopByIdResp getById(GetShopByIdReq req); |
22 | 22 | ||
23 | GetShopDetailResp getDetailById(GetShopDetailReq req); | 23 | GetShopDetailResp getDetailById(GetShopDetailReq req); |
24 | 24 | ||
@@ -28,7 +28,6 @@ public interface ShopService { | @@ -28,7 +28,6 @@ public interface ShopService { | ||
28 | 28 | ||
29 | RemoveFavoriteShopResp removeShopFavorite(Long shopId, Long userId); | 29 | RemoveFavoriteShopResp removeShopFavorite(Long shopId, Long userId); |
30 | 30 | ||
31 | - GetShopIntroductionResp getShopIntroductionByDomain(GetShopIntroductionReq req); | ||
32 | 31 | ||
33 | /** | 32 | /** |
34 | * 获取商品简介 | 33 | * 获取商品简介 |
@@ -37,7 +36,6 @@ public interface ShopService { | @@ -37,7 +36,6 @@ public interface ShopService { | ||
37 | * @createTime 2015年6月9日 下午2:32:37 | 36 | * @createTime 2015年6月9日 下午2:32:37 |
38 | * @author zhangshirui | 37 | * @author zhangshirui |
39 | */ | 38 | */ |
40 | - GetShopIntroductionResp getShopIntroduction(GetShopIntroductionReq req); | ||
41 | /** | 39 | /** |
42 | * 查询店铺资质信息 | 40 | * 查询店铺资质信息 |
43 | * @param req | 41 | * @param req |
@@ -103,7 +101,10 @@ public interface ShopService { | @@ -103,7 +101,10 @@ public interface ShopService { | ||
103 | * @param req | 101 | * @param req |
104 | * @return | 102 | * @return |
105 | * @createTime 2015年8月3日 下午4:55:54 | 103 | * @createTime 2015年8月3日 下午4:55:54 |
106 | - * @author zhangshirui | 104 | + * @author zhangshiruicom.diligrp.mobsite.getway.domain.protocol.detail.GetShopByIdResp getById(GetShopByIdReq ); |
107 | */ | 105 | */ |
108 | AddFavoriteShopResp addShopFavorite(AddFavoriteShopReq req); | 106 | AddFavoriteShopResp addShopFavorite(AddFavoriteShopReq req); |
107 | + | ||
108 | + | ||
109 | + BindToShopResp getShopIntroduction(BindToShopReq req); | ||
109 | } | 110 | } |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/buyer/shop/impl/ShopServiceImpl.java
@@ -153,11 +153,11 @@ public class ShopServiceImpl implements ShopService { | @@ -153,11 +153,11 @@ public class ShopServiceImpl implements ShopService { | ||
153 | } | 153 | } |
154 | 154 | ||
155 | @Override | 155 | @Override |
156 | - public GetShopIntroductionResp getById(GetShopIntroductionReq req){ | ||
157 | - GetShopIntroductionResp resp = new GetShopIntroductionResp(); | 156 | + public GetShopByIdResp getById(GetShopByIdReq req){ |
157 | + GetShopByIdResp resp = new GetShopByIdResp(); | ||
158 | 158 | ||
159 | - ShopIntroduction shopInfo = shopRPC.getShopIntroductionById(req.getId()); | ||
160 | - resp.setShopIntroduction(shopInfo); | 159 | + //ShopIntroduction shopInfo = shopRPC.getShopIntroductionById(req.getId()); |
160 | + //resp.setShopIntroduction(shopInfo); | ||
161 | return resp; | 161 | return resp; |
162 | } | 162 | } |
163 | 163 | ||
@@ -254,13 +254,7 @@ public class ShopServiceImpl implements ShopService { | @@ -254,13 +254,7 @@ public class ShopServiceImpl implements ShopService { | ||
254 | return new RemoveFavoriteShopResp(); | 254 | return new RemoveFavoriteShopResp(); |
255 | } | 255 | } |
256 | 256 | ||
257 | - @Override | ||
258 | - public GetShopIntroductionResp getShopIntroductionByDomain(GetShopIntroductionReq req) { | ||
259 | - GetShopIntroductionResp resp = new GetShopIntroductionResp(); | ||
260 | - ShopIntroduction shopInfo = shopRPC.getShopIntroductionByDomain(req.getDomain()); | ||
261 | - resp.setShopIntroduction(shopInfo); | ||
262 | - return resp; | ||
263 | - } | 257 | + |
264 | 258 | ||
265 | @Deprecated | 259 | @Deprecated |
266 | @Override | 260 | @Override |
@@ -333,20 +327,6 @@ public class ShopServiceImpl implements ShopService { | @@ -333,20 +327,6 @@ public class ShopServiceImpl implements ShopService { | ||
333 | 327 | ||
334 | 328 | ||
335 | 329 | ||
336 | - @Override | ||
337 | - public GetShopIntroductionResp getShopIntroduction(GetShopIntroductionReq req) { | ||
338 | - GetShopIntroductionResp resp = new GetShopIntroductionResp(); | ||
339 | - | ||
340 | - ShopIntroduction shopInfo = null; | ||
341 | - if (!Validator.isNull(req.getId())) { | ||
342 | - shopInfo = shopRPC.getShopIntroductionById(req.getId()); | ||
343 | - }else { | ||
344 | - shopInfo = shopRPC.getShopIntroductionByDomain(req.getDomain()); | ||
345 | - } | ||
346 | - resp.setShopIntroduction(shopInfo); | ||
347 | - | ||
348 | - return resp; | ||
349 | - } | ||
350 | 330 | ||
351 | @Override | 331 | @Override |
352 | public GetShopCreditResp getShopCredit(GetShopCreditReq req) { | 332 | public GetShopCreditResp getShopCredit(GetShopCreditReq req) { |
@@ -1206,4 +1186,9 @@ public class ShopServiceImpl implements ShopService { | @@ -1206,4 +1186,9 @@ public class ShopServiceImpl implements ShopService { | ||
1206 | 1186 | ||
1207 | return new AddFavoriteShopResp(); | 1187 | return new AddFavoriteShopResp(); |
1208 | } | 1188 | } |
1189 | + | ||
1190 | + @Override | ||
1191 | + public BindToShopResp getShopIntroduction(BindToShopReq req) { | ||
1192 | + return null; | ||
1193 | + } | ||
1209 | } | 1194 | } |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/buyer/user/impl/OrderServiceImpl.java
@@ -140,7 +140,7 @@ public class OrderServiceImpl implements OrderService { | @@ -140,7 +140,7 @@ public class OrderServiceImpl implements OrderService { | ||
140 | List<Long> cartIds = new ArrayList<Long>(); | 140 | List<Long> cartIds = new ArrayList<Long>(); |
141 | 141 | ||
142 | SubmitOrderInput input = buildPurchaseOrderSubmitInputs(shopInfos, userId, req.getLogisticsRemarks(), consInfo, | 142 | SubmitOrderInput input = buildPurchaseOrderSubmitInputs(shopInfos, userId, req.getLogisticsRemarks(), consInfo, |
143 | - req.getPayType(), req.getDeviceType(), req.getDeliveryType(), cartIds, logResp,req.getConsigneeInfo().getMarketId(),req.getMarketDeliveryType()); | 143 | + req.getPayType(), req.getDeviceType(), req.getDeliveryType(), cartIds, logResp,req.getMarketDeliveryType()); |
144 | 144 | ||
145 | //提交订单 | 145 | //提交订单 |
146 | List<OrderInfo> orderList = orderRPC.submitOrderNew(input, userId); | 146 | List<OrderInfo> orderList = orderRPC.submitOrderNew(input, userId); |
@@ -168,7 +168,7 @@ public class OrderServiceImpl implements OrderService { | @@ -168,7 +168,7 @@ public class OrderServiceImpl implements OrderService { | ||
168 | 168 | ||
169 | if (OrderPayTypeEnum.PAY_TYPE_CREDIT.getValue() != req.getPayType()) { | 169 | if (OrderPayTypeEnum.PAY_TYPE_CREDIT.getValue() != req.getPayType()) { |
170 | //不是赊账付款,订单提交之后,进货单删除商品 | 170 | //不是赊账付款,订单提交之后,进货单删除商品 |
171 | - userRPC.delCartByIds(userId,cartIds); | 171 | + // userRPC.delCartByIds(userId,cartIds); |
172 | } | 172 | } |
173 | 173 | ||
174 | //订单描述信息 | 174 | //订单描述信息 |
@@ -422,7 +422,6 @@ public class OrderServiceImpl implements OrderService { | @@ -422,7 +422,6 @@ public class OrderServiceImpl implements OrderService { | ||
422 | ConsigneeInfo consignee = new ConsigneeInfo(); | 422 | ConsigneeInfo consignee = new ConsigneeInfo(); |
423 | consignee.setName(orderInfo.getOrderReceiverInfo().getReceiverName()); | 423 | consignee.setName(orderInfo.getOrderReceiverInfo().getReceiverName()); |
424 | consignee.setMobile(orderInfo.getOrderReceiverInfo().getReceiverPhone()); | 424 | consignee.setMobile(orderInfo.getOrderReceiverInfo().getReceiverPhone()); |
425 | - consignee.setIdCard(orderInfo.getOrderReceiverInfo().getReceiverIdcard()); | ||
426 | consignee.setCityAddress(""); | 425 | consignee.setCityAddress(""); |
427 | consignee.setStreetAddress(orderInfo.getOrderReceiverInfo().getReceiverAddress()); | 426 | consignee.setStreetAddress(orderInfo.getOrderReceiverInfo().getReceiverAddress()); |
428 | return consignee; | 427 | return consignee; |
@@ -864,7 +863,7 @@ public class OrderServiceImpl implements OrderService { | @@ -864,7 +863,7 @@ public class OrderServiceImpl implements OrderService { | ||
864 | *提交订单 | 863 | *提交订单 |
865 | * */ | 864 | * */ |
866 | private SubmitOrderInput buildPurchaseOrderSubmitInputs(List<OrderShopInfo> shopInfos,Long userId,String logisticsRemarks, | 865 | private SubmitOrderInput buildPurchaseOrderSubmitInputs(List<OrderShopInfo> shopInfos,Long userId,String logisticsRemarks, |
867 | - ConsigneeInfo consInfo,Integer payType,Integer deviceType,Integer deliveryType,List<Long> cartIds, LogResp logResp,Long marketId,Integer marketDeliveryType){ | 866 | + ConsigneeInfo consInfo,Integer payType,Integer deviceType,Integer deliveryType,List<Long> cartIds, LogResp logResp,Integer marketDeliveryType){ |
868 | SubmitOrderInput inputOrder = new SubmitOrderInput(); | 867 | SubmitOrderInput inputOrder = new SubmitOrderInput(); |
869 | List<com.diligrp.orders.client.domain.input.OrderShopInfo> input = new ArrayList<com.diligrp.orders.client.domain.input.OrderShopInfo>(); | 868 | List<com.diligrp.orders.client.domain.input.OrderShopInfo> input = new ArrayList<com.diligrp.orders.client.domain.input.OrderShopInfo>(); |
870 | String shipAddress = null; | 869 | String shipAddress = null; |
@@ -972,7 +971,6 @@ public class OrderServiceImpl implements OrderService { | @@ -972,7 +971,6 @@ public class OrderServiceImpl implements OrderService { | ||
972 | inputOrder.setLogisticsRemarks(logisticsRemarks); | 971 | inputOrder.setLogisticsRemarks(logisticsRemarks); |
973 | inputOrder.setOrderType(OrderType.COMMON); | 972 | inputOrder.setOrderType(OrderType.COMMON); |
974 | inputOrder.setOrderShopInputList(input); | 973 | inputOrder.setOrderShopInputList(input); |
975 | - inputOrder.setMarketId(marketDeliveryType==ConsigneeInfo.DELIVERYTYPE_NO?null:marketId); | ||
976 | inputOrder.setWarrantType(WarrantType.Not_Warran); | 974 | inputOrder.setWarrantType(WarrantType.Not_Warran); |
977 | inputOrder.setMarketDelivery(MarketDelivery.get(marketDeliveryType)); | 975 | inputOrder.setMarketDelivery(MarketDelivery.get(marketDeliveryType)); |
978 | return inputOrder; | 976 | return inputOrder; |
@@ -1073,7 +1071,6 @@ public class OrderServiceImpl implements OrderService { | @@ -1073,7 +1071,6 @@ public class OrderServiceImpl implements OrderService { | ||
1073 | 1071 | ||
1074 | //提货人信息 | 1072 | //提货人信息 |
1075 | receiverInput.setReceiverName(consInfo.getName()); | 1073 | receiverInput.setReceiverName(consInfo.getName()); |
1076 | - receiverInput.setReceiverIdcard(consInfo.getIdCard()); | ||
1077 | receiverInput.setReceiverPhone(consInfo.getMobile()); | 1074 | receiverInput.setReceiverPhone(consInfo.getMobile()); |
1078 | if (!Validator.isEmpty(consInfo.getCityAddress())) { | 1075 | if (!Validator.isEmpty(consInfo.getCityAddress())) { |
1079 | receiverAddr +=consInfo.getCityAddress(); | 1076 | receiverAddr +=consInfo.getCityAddress(); |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/buyer/user/impl/UserServiceImpl.java
@@ -684,20 +684,14 @@ public class UserServiceImpl implements UserService { | @@ -684,20 +684,14 @@ public class UserServiceImpl implements UserService { | ||
684 | 684 | ||
685 | if (!Validator.isNull(product.getMinPrice())) { | 685 | if (!Validator.isNull(product.getMinPrice())) { |
686 | favProduct.setPrice((long)product.getMinPrice()); | 686 | favProduct.setPrice((long)product.getMinPrice()); |
687 | - favProduct.setMinPrice((long)product.getMinPrice()); | ||
688 | - favProduct.setMaxPrice((long)product.getMaxPrice()); | ||
689 | } | 687 | } |
690 | favProduct.setUnit(product.getSaleUnit()); | 688 | favProduct.setUnit(product.getSaleUnit()); |
691 | favProduct.setTitle(product.getName()); | 689 | favProduct.setTitle(product.getName()); |
692 | - favProduct.setMinWholesale(product.getMinNum()!=null?product.getMinNum():GoodsSuper.MINWHOLESALE_DEFAULT_MIN); | ||
693 | - favProduct.setSalesNum(product.getSalesNum()!= null?product.getSalesNum().longValue():null); | ||
694 | - favProduct.setHasSpecial(product.getHasSpecial()); //是否为特价商品 | ||
695 | shop = shopRPC.getShopById(product.getVendorId()); | 690 | shop = shopRPC.getShopById(product.getVendorId()); |
696 | if (!Validator.isNull(shop)) { | 691 | if (!Validator.isNull(shop)) { |
697 | shopInfo = new ShopIntroduction(); | 692 | shopInfo = new ShopIntroduction(); |
698 | shopInfo.setName(shop.getShopName()); | 693 | shopInfo.setName(shop.getShopName()); |
699 | shopInfo.setId(shop.getId()); | 694 | shopInfo.setId(shop.getId()); |
700 | - favProduct.setShopInfo(shopInfo); | ||
701 | } | 695 | } |
702 | 696 | ||
703 | resp.getGoods().add(favProduct); | 697 | resp.getGoods().add(favProduct); |
@@ -890,19 +884,19 @@ public class UserServiceImpl implements UserService { | @@ -890,19 +884,19 @@ public class UserServiceImpl implements UserService { | ||
890 | 884 | ||
891 | @Override | 885 | @Override |
892 | public ModifyPwdResp modifyPwd(ModifyPwdReq req) { | 886 | public ModifyPwdResp modifyPwd(ModifyPwdReq req) { |
893 | - long userId = req.getUserId() == null ?0L:req.getUserId(); | ||
894 | - if (!Validator.isEmpty(req.getOldPassword())) { | ||
895 | - boolean checkFlag = userRPC.checkPassword(userId, userRPC.getEncryptPwd(req.getOldPassword())); | ||
896 | - if (!checkFlag) { | ||
897 | - throw new ServiceException(ResultCode.BUSINESS_FAILED,ErrorMessage.USER_PASSWORD_WRONG); | ||
898 | - } | ||
899 | - }else{ | 887 | + //long userId = req.getUserId() == null ?0L:req.getUserId(); |
888 | + //if (!Validator.isEmpty(req.getOldPassword())) { | ||
889 | + // boolean checkFlag = userRPC.checkPassword(userId, userRPC.getEncryptPwd(req.getOldPassword())); | ||
890 | + // if (!checkFlag) { | ||
891 | + // throw new ServiceException(ResultCode.BUSINESS_FAILED,ErrorMessage.USER_PASSWORD_WRONG); | ||
892 | + //} | ||
893 | + //}else{ | ||
900 | UserInfoResp userInfo = userRPC.getUserByLoginId(req.getAccountName()); | 894 | UserInfoResp userInfo = userRPC.getUserByLoginId(req.getAccountName()); |
901 | if (Validator.isNull(userInfo)) { | 895 | if (Validator.isNull(userInfo)) { |
902 | throw new ServiceException(ResultCode.BUSINESS_FAILED,ErrorMessage.USER_NOT_EXIST); | 896 | throw new ServiceException(ResultCode.BUSINESS_FAILED,ErrorMessage.USER_NOT_EXIST); |
903 | } | 897 | } |
904 | - userId = userInfo.getId(); | ||
905 | - } | 898 | + long userId = userInfo.getId(); |
899 | + // } | ||
906 | 900 | ||
907 | Map<String,String> params = new HashMap<String, String>(); | 901 | Map<String,String> params = new HashMap<String, String>(); |
908 | params.put("password", req.getPassword()); | 902 | params.put("password", req.getPassword()); |
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/common/impl/VersionUpdateServiceImpl.java
1 | package com.diligrp.mobsite.getway.service.common.impl; | 1 | package com.diligrp.mobsite.getway.service.common.impl; |
2 | 2 | ||
3 | -import java.util.HashMap; | ||
4 | -import java.util.List; | ||
5 | - | ||
6 | -import javax.annotation.Resource; | ||
7 | - | ||
8 | -import org.apache.log4j.Logger; | ||
9 | -import org.springframework.stereotype.Service; | ||
10 | - | ||
11 | import com.diligrp.mobsite.getway.domain.AppVersion; | 3 | import com.diligrp.mobsite.getway.domain.AppVersion; |
12 | import com.diligrp.mobsite.getway.domain.FeedBack; | 4 | import com.diligrp.mobsite.getway.domain.FeedBack; |
13 | import com.diligrp.mobsite.getway.domain.common.Constant; | 5 | import com.diligrp.mobsite.getway.domain.common.Constant; |
@@ -27,6 +19,12 @@ import com.diligrp.mobsite.getway.rpc.buyer.UserRPC; | @@ -27,6 +19,12 @@ import com.diligrp.mobsite.getway.rpc.buyer.UserRPC; | ||
27 | import com.diligrp.mobsite.getway.service.common.VersionUpdateService; | 19 | import com.diligrp.mobsite.getway.service.common.VersionUpdateService; |
28 | import com.diligrp.website.util.dao.BaseQuery; | 20 | import com.diligrp.website.util.dao.BaseQuery; |
29 | import com.diligrp.website.util.security.Validator; | 21 | import com.diligrp.website.util.security.Validator; |
22 | +import org.apache.log4j.Logger; | ||
23 | +import org.springframework.stereotype.Service; | ||
24 | + | ||
25 | +import javax.annotation.Resource; | ||
26 | +import java.util.HashMap; | ||
27 | +import java.util.List; | ||
30 | 28 | ||
31 | /** | 29 | /** |
32 | * | 30 | * |
@@ -88,7 +86,6 @@ public class VersionUpdateServiceImpl implements VersionUpdateService { | @@ -88,7 +86,6 @@ public class VersionUpdateServiceImpl implements VersionUpdateService { | ||
88 | public FeedbackResp feedback(FeedbackReq req) { | 86 | public FeedbackResp feedback(FeedbackReq req) { |
89 | FeedbackResp resp = new FeedbackResp(); | 87 | FeedbackResp resp = new FeedbackResp(); |
90 | FeedBack feedBack = new FeedBack(); | 88 | FeedBack feedBack = new FeedBack(); |
91 | - feedBack.setMarketId(req.getMarketId()); | ||
92 | feedBack.setUserId(req.getUserId()); | 89 | feedBack.setUserId(req.getUserId()); |
93 | feedBack.setAppVersion(req.getAppVersion()); | 90 | feedBack.setAppVersion(req.getAppVersion()); |
94 | feedBack.setContent(req.getContent()); | 91 | feedBack.setContent(req.getContent()); |
mobsite-getway-web/pom.xml
@@ -37,6 +37,7 @@ | @@ -37,6 +37,7 @@ | ||
37 | <artifactId>tomcat7-maven-plugin</artifactId> | 37 | <artifactId>tomcat7-maven-plugin</artifactId> |
38 | <version>2.2</version> | 38 | <version>2.2</version> |
39 | <configuration> | 39 | <configuration> |
40 | + <port>8082</port> | ||
40 | <url>http://10.28.11.173:8081/manager</url> | 41 | <url>http://10.28.11.173:8081/manager</url> |
41 | <username>getway</username> | 42 | <username>getway</username> |
42 | <password>123456</password> | 43 | <password>123456</password> |
@@ -330,7 +331,12 @@ | @@ -330,7 +331,12 @@ | ||
330 | <project.fastdfs.connectTimeout>2000</project.fastdfs.connectTimeout> | 331 | <project.fastdfs.connectTimeout>2000</project.fastdfs.connectTimeout> |
331 | <project.fastdfs.networkTimeout>30000</project.fastdfs.networkTimeout> | 332 | <project.fastdfs.networkTimeout>30000</project.fastdfs.networkTimeout> |
332 | <project.fastdfs.charset>utf-8</project.fastdfs.charset> | 333 | <project.fastdfs.charset>utf-8</project.fastdfs.charset> |
333 | - | 334 | + |
335 | + <!-- interface activity --> | ||
336 | + <website.activity.baseUrl>http://activity.1n4j.com</website.activity.baseUrl> | ||
337 | + <website.activity.token>token</website.activity.token> | ||
338 | + | ||
339 | + | ||
334 | <!-- 上传文件服务 --> | 340 | <!-- 上传文件服务 --> |
335 | <project.store.url>http://up.1n4j.com</project.store.url> | 341 | <project.store.url>http://up.1n4j.com</project.store.url> |
336 | <project.store.imageAccessKey>jNvRQi3lLAY7tFpJkWYeF5Fa99Cl6kZRcEiMaZGp</project.store.imageAccessKey> | 342 | <project.store.imageAccessKey>jNvRQi3lLAY7tFpJkWYeF5Fa99Cl6kZRcEiMaZGp</project.store.imageAccessKey> |
@@ -482,6 +488,11 @@ | @@ -482,6 +488,11 @@ | ||
482 | <project.fastdfs.networkTimeout>30000</project.fastdfs.networkTimeout> | 488 | <project.fastdfs.networkTimeout>30000</project.fastdfs.networkTimeout> |
483 | <project.fastdfs.charset>utf-8</project.fastdfs.charset> | 489 | <project.fastdfs.charset>utf-8</project.fastdfs.charset> |
484 | 490 | ||
491 | + | ||
492 | + <!-- interface activity --> | ||
493 | + <website.activity.baseUrl>http://activity.1n4j.com</website.activity.baseUrl> | ||
494 | + <website.activity.token>token</website.activity.token> | ||
495 | + | ||
485 | <!-- 上传文件服务 --> | 496 | <!-- 上传文件服务 --> |
486 | <project.store.url>http://up.1n4j.com</project.store.url> | 497 | <project.store.url>http://up.1n4j.com</project.store.url> |
487 | <project.store.imageAccessKey>d6a300418bd6fa2178b3bbb06a421f32</project.store.imageAccessKey> | 498 | <project.store.imageAccessKey>d6a300418bd6fa2178b3bbb06a421f32</project.store.imageAccessKey> |
@@ -628,7 +639,12 @@ | @@ -628,7 +639,12 @@ | ||
628 | <!--cms--> | 639 | <!--cms--> |
629 | <project.cms.baseUrl>http://cms.1n4j.com</project.cms.baseUrl> | 640 | <project.cms.baseUrl>http://cms.1n4j.com</project.cms.baseUrl> |
630 | <project.cms.port>80</project.cms.port> | 641 | <project.cms.port>80</project.cms.port> |
631 | - | 642 | + |
643 | + <!-- interface activity --> | ||
644 | + <website.activity.baseUrl>http://activity.1n4j.com</website.activity.baseUrl> | ||
645 | + <website.activity.token>token</website.activity.token> | ||
646 | + | ||
647 | + | ||
632 | <!-- fastdfs --> | 648 | <!-- fastdfs --> |
633 | <project.fastdfs.trackers>192.168.28.38:22122,192.168.28.39:22122</project.fastdfs.trackers> | 649 | <project.fastdfs.trackers>192.168.28.38:22122,192.168.28.39:22122</project.fastdfs.trackers> |
634 | <project.fastdfs.trackercount>2</project.fastdfs.trackercount> | 650 | <project.fastdfs.trackercount>2</project.fastdfs.trackercount> |
mobsite-getway-web/src/main/java/com/diligrp/mobsite/getway/web/api/activity/ActivityController.java deleted
100644 → 0
1 | -package com.diligrp.mobsite.getway.web.api.activity; | ||
2 | - | ||
3 | -import com.diligrp.mobsite.getway.domain.except.ServiceException; | ||
4 | -import com.diligrp.mobsite.getway.domain.protocol.BaseResp; | ||
5 | -import com.diligrp.mobsite.getway.domain.protocol.activity.*; | ||
6 | -import com.diligrp.mobsite.getway.service.activity.ActivityService; | ||
7 | -import com.diligrp.mobsite.getway.web.api.base.BaseApiController; | ||
8 | -import org.apache.log4j.Logger; | ||
9 | -import org.springframework.beans.factory.annotation.Autowired; | ||
10 | -import org.springframework.stereotype.Controller; | ||
11 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
12 | -import org.springframework.web.bind.annotation.ResponseBody; | ||
13 | - | ||
14 | -@RequestMapping("/mobsiteApp/activity") | ||
15 | -@Controller | ||
16 | -public class ActivityController extends BaseApiController { | ||
17 | - | ||
18 | - private static final Logger log = Logger.getLogger(ActivityController.class); | ||
19 | - | ||
20 | - | ||
21 | - | ||
22 | - @Autowired | ||
23 | - private ActivityService activityService; | ||
24 | - | ||
25 | - @ResponseBody | ||
26 | - @RequestMapping("/getLastActivity") | ||
27 | - public void getLastActivity() { | ||
28 | - try { | ||
29 | - GetLastActivityReq req=this.getRequest(GetLastActivityReq.class); | ||
30 | - GetLastActivityResponse resp = activityService.getLastActivity(req); | ||
31 | - super.sendSuccessResp(resp); | ||
32 | - } catch (ServiceException e) { | ||
33 | - log.error(String.format("Code=%s,ErrorMessage=%s", e.getCode(), e.getMessage()), e); | ||
34 | - sendError(e.getCode(), e.getMessage()); | ||
35 | - } catch (Exception e) { | ||
36 | - log.error(e.getMessage(), e); | ||
37 | - super.sendError(e.getMessage()); | ||
38 | - } | ||
39 | - } | ||
40 | - | ||
41 | - @ResponseBody | ||
42 | - @RequestMapping("/isAlreadyApply") | ||
43 | - public void isAlreadyApply() { | ||
44 | - IsAlreadyApplyRequest req = super.getRequest(IsAlreadyApplyRequest.class); | ||
45 | - try { | ||
46 | - IsAlreadyApplyResponse resp = activityService.isAlreadyApply(req); | ||
47 | - super.sendSuccessResp(resp); | ||
48 | - } catch (ServiceException e) { | ||
49 | - log.error(String.format("Code=%s,ErrorMessage=%s", e.getCode(), e.getMessage()), e); | ||
50 | - sendError(e.getCode(), e.getMessage()); | ||
51 | - } catch (Exception e) { | ||
52 | - log.error(e.getMessage(), e); | ||
53 | - super.sendError(e.getMessage()); | ||
54 | - } | ||
55 | - } | ||
56 | - | ||
57 | - @ResponseBody | ||
58 | - @RequestMapping("/cancelActivityApply") | ||
59 | - public void cancelActivityApply() { | ||
60 | - CancelActivityApplyRequest req = super.getRequest(CancelActivityApplyRequest.class); | ||
61 | - try { | ||
62 | - CancelActivityApplyResponse resp = activityService.cancelActivityApply(req); | ||
63 | - super.sendSuccessResp(resp); | ||
64 | - } catch (ServiceException e) { | ||
65 | - log.error(String.format("Code=%s,ErrorMessage=%s", e.getCode(), e.getMessage()), e); | ||
66 | - sendError(e.getCode(), e.getMessage()); | ||
67 | - } catch (Exception e) { | ||
68 | - log.error(e.getMessage(), e); | ||
69 | - super.sendError(e.getMessage()); | ||
70 | - } | ||
71 | - } | ||
72 | - | ||
73 | - @ResponseBody | ||
74 | - @RequestMapping("/getBeforeActivitys") | ||
75 | - public void getBeforeActivitys() { | ||
76 | - try { | ||
77 | - GetBeforeActivitysResponse resp = activityService.getBeforeActivitys(); | ||
78 | - super.sendSuccessResp(resp); | ||
79 | - } catch (ServiceException e) { | ||
80 | - log.error(String.format("Code=%s,ErrorMessage=%s", e.getCode(), e.getMessage()), e); | ||
81 | - sendError(e.getCode(), e.getMessage()); | ||
82 | - } catch (Exception e) { | ||
83 | - log.error(e.getMessage(), e); | ||
84 | - super.sendError(e.getMessage()); | ||
85 | - } | ||
86 | - } | ||
87 | - | ||
88 | - @ResponseBody | ||
89 | - @RequestMapping("/getActivitysByUserId") | ||
90 | - public void getActivitysByUserId() { | ||
91 | - try { | ||
92 | - GetActivitysByUserIdReq req = this.getRequest(GetActivitysByUserIdReq.class); | ||
93 | - GetActivitysByUserIdResponse resp = activityService.getActivitysByUserId(req); | ||
94 | - this.sendSuccessResp(resp); | ||
95 | - } catch (ServiceException e) { | ||
96 | - log.error(String.format("Code=%s,ErrorMessage=%s", e.getCode(), e.getMessage()), e); | ||
97 | - sendError(e.getCode(), e.getMessage()); | ||
98 | - } catch (Exception e) { | ||
99 | - log.error(e.getMessage(), e); | ||
100 | - super.sendError(e.getMessage()); | ||
101 | - } | ||
102 | - } | ||
103 | - | ||
104 | - @ResponseBody | ||
105 | - @RequestMapping("/getActivityDetail") | ||
106 | - public void getActivityDetail() { | ||
107 | - try { | ||
108 | - GetActivityDetailReq req = this.getRequest(GetActivityDetailReq.class); | ||
109 | - GetActivityDetailResponse resp = this.activityService.getActivityDetail(req); | ||
110 | - this.sendSuccessResp(resp); | ||
111 | - } catch (ServiceException e) { | ||
112 | - log.error(String.format("Code=%s,ErrorMessage=%s", e.getCode(), e.getMessage()), e); | ||
113 | - sendError(e.getCode(), e.getMessage()); | ||
114 | - } catch (Exception e) { | ||
115 | - log.error(e.getMessage(), e); | ||
116 | - super.sendError(e.getMessage()); | ||
117 | - } | ||
118 | - } | ||
119 | - | ||
120 | - //@ApiOperation(value = "根据用户名获取用户对象", httpMethod = "POST", notes = "获取热门活动列表") | ||
121 | - @ResponseBody | ||
122 | - @RequestMapping("/getHotActivities") | ||
123 | - public void getHotActivitys() { | ||
124 | - try { | ||
125 | - GetHotActivitiesReq req = this.getRequest(GetHotActivitiesReq.class); | ||
126 | - GetHotActivitiesResp resp = this.activityService.getHotActivities(req); | ||
127 | - this.sendSuccessResp(resp); | ||
128 | - } catch (ServiceException e) { | ||
129 | - log.error(String.format("Code=%s,ErrorMessage=%s", e.getCode(), e.getMessage()), e); | ||
130 | - sendError(e.getCode(), e.getMessage()); | ||
131 | - } catch (Exception e) { | ||
132 | - log.error(e.getMessage(), e); | ||
133 | - super.sendError(e.getMessage()); | ||
134 | - } | ||
135 | - } | ||
136 | - | ||
137 | - @ResponseBody | ||
138 | - @RequestMapping("/submitActivityApply") | ||
139 | - public void submitActivityApply() { | ||
140 | - try { | ||
141 | - SubmitActivityApplyRequest req = this.getRequest(SubmitActivityApplyRequest.class); | ||
142 | - BaseResp resp = this.activityService.submitActivityApply(req); | ||
143 | - this.sendSuccessResp(resp); | ||
144 | - } catch (ServiceException e) { | ||
145 | - log.error(String.format("Code=%s,ErrorMessage=%s", e.getCode(), e.getMessage()), e); | ||
146 | - sendError(e.getCode(), e.getMessage()); | ||
147 | - } catch (Exception e) { | ||
148 | - log.error(e.getMessage(), e); | ||
149 | - super.sendError(e.getMessage()); | ||
150 | - } | ||
151 | - } | ||
152 | - | ||
153 | - @ResponseBody | ||
154 | - @RequestMapping("/appraiseActivity") | ||
155 | - public void appraiseActivity() { | ||
156 | - try { | ||
157 | - AppraiseActivityRequest req = this.getRequest(AppraiseActivityRequest.class); | ||
158 | - BaseResp resp = this.activityService.appraiseActivity(req); | ||
159 | - this.sendSuccessResp(resp); | ||
160 | - } catch (ServiceException e) { | ||
161 | - log.error(String.format("Code=%s,ErrorMessage=%s", e.getCode(), e.getMessage()), e); | ||
162 | - sendError(e.getCode(), e.getMessage()); | ||
163 | - } catch (Exception e) { | ||
164 | - log.error(e.getMessage(), e); | ||
165 | - super.sendError(e.getMessage()); | ||
166 | - } | ||
167 | - } | ||
168 | - | ||
169 | - | ||
170 | - | ||
171 | - @ResponseBody | ||
172 | - @RequestMapping("/getEvaluates") | ||
173 | - public void getEvaluates() { | ||
174 | - try { | ||
175 | - GetEvaluatesReq req = this.getRequest(GetEvaluatesReq.class); | ||
176 | - GetEvaluatesResp resp = this.activityService.getEvaluates(req); | ||
177 | - this.sendSuccessResp(resp); | ||
178 | - } catch (ServiceException e) { | ||
179 | - log.error(String.format("Code=%s,ErrorMessage=%s", e.getCode(), e.getMessage()), e); | ||
180 | - sendError(e.getCode(), e.getMessage()); | ||
181 | - } catch (Exception e) { | ||
182 | - log.error(e.getMessage(), e); | ||
183 | - super.sendError(e.getMessage()); | ||
184 | - } | ||
185 | - } | ||
186 | - | ||
187 | - | ||
188 | -} |