Commit 27cb428ae76d89d95cef64184dc749829d1bd770

Authored by weiliwhereareyou@163.com
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 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 9 * <B>Description</B> 合并进货单商品信息 <br />
... ... @@ -18,131 +21,60 @@ public class AddCartProduct implements java.io.Serializable{
18 21 /**
19 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 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 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 21 /**
22 22 * 设备ID
23 23 */
24   - @Deprecated
25   - private String deviceId;
  24 + //@Deprecated
  25 + //private String deviceId;
26 26 /**
27 27 * get value of BaseReq.token
28 28 * @return the token
... ... @@ -43,30 +43,33 @@ public class BaseReq implements java.io.Serializable {
43 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 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 1 package com.diligrp.mobsite.getway.domain.protocol;
2 2  
3 3  
  4 +import io.swagger.annotations.ApiModelProperty;
4 5  
5 6 /**
6 7 * <B>Description</B> 商品分类 <br />
... ... @@ -18,26 +19,29 @@ public class Category {
18 19 /**
19 20 * 分类id
20 21 */
  22 + @ApiModelProperty(value = "分类id")
21 23 private Long id;
22   - @Deprecated
23   - private Long Id;
  24 +
24 25 /**
25 26 * 分类名
26 27 */
  28 + @ApiModelProperty(value = "分类名称")
27 29 private String name;
28   - @Deprecated
29   - private String Name;
  30 +
30 31 /**
31 32 * 分类图标地址
32 33 */
  34 + @ApiModelProperty(value = "分类图标")
33 35 private String imgUrl;
34 36 /**
35 37 * 关联分类id
36 38 */
  39 + @ApiModelProperty(value = "关联分类id")
37 40 private Long relateId;
38 41 /**
39 42 * 分类级别
40 43 */
  44 + @ApiModelProperty(value = "分类级别")
41 45 private String level;
42 46  
43 47 public Long getId() {
... ... @@ -46,7 +50,7 @@ public class Category {
46 50  
47 51 public void setId(Long id) {
48 52 this.id = id;
49   - this.Id = id;
  53 +
50 54 }
51 55  
52 56 public String getName() {
... ... @@ -54,7 +58,7 @@ public class Category {
54 58 }
55 59  
56 60 public void setName(String name) {
57   - this.Name = name;
  61 +
58 62 this.name = name;
59 63 }
60 64  
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/ConsigneeInfo.java
1 1 package com.diligrp.mobsite.getway.domain.protocol;
2 2  
  3 +import io.swagger.annotations.ApiModelProperty;
  4 +
3 5 import java.io.Serializable;
4 6  
5 7  
... ... @@ -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 33 * id
39 34 */
  35 + @ApiModelProperty(value = "id")
40 36 private Long id;
41 37 /**
42 38 * 用户姓名名字
43 39 */
  40 + @ApiModelProperty(value = "联系人姓名")
44 41 private String name;
45 42 /**
46 43 * 电话
47 44 */
  45 + @ApiModelProperty(value = "联系人电话")
48 46 private String mobile;
49   - /**
50   - * 身份证号
51   - */
52   - private String idCard;
  47 +
53 48 /**
54 49 * 是否为默认提货人
55 50 */
  51 + @ApiModelProperty(value = "是否为默认提货人:1-是,2-否")
56 52 private Integer isDefault;
57   - /**
58   - * 城市地址编号
59   - */
60   - private Long cityAddressNo;
  53 +
61 54 /**
62 55 * 城市地址
63 56 */
  57 + @ApiModelProperty(value = "城市地址")
64 58 private String cityAddress;
65 59 /**
66 60 * 街道地址
67 61 */
  62 + @ApiModelProperty(value = "街道地址")
68 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 72 public Long getId() {
104 73 return id;
... ... @@ -132,17 +101,7 @@ public class ConsigneeInfo implements Serializable {
132 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 105 public String getCityAddress() {
147 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 11 */
12 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 1 package com.diligrp.mobsite.getway.domain.protocol;
2 2  
  3 +import io.swagger.annotations.ApiModelProperty;
  4 +
3 5 import java.io.Serializable;
4 6 import java.util.List;
5 7  
... ... @@ -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 21 * 商品ID
54 22 */
  23 + @ApiModelProperty(value = "商品id")
55 24 private Long id;
56 25 /**
57 26 * 商品标题
58 27 */
  28 + @ApiModelProperty(value = "商品标题")
59 29 private String title;
60 30 /**
61 31 * 商品默认图片
62 32 */
  33 + @ApiModelProperty(value = "商品默认图片")
63 34 private String defaultPic;
64 35 /**
65 36 * 商品图片
66 37 */
  38 + @ApiModelProperty(value = "商品图片")
67 39 private List<String> pictures;
68 40 /**
69 41 * 单位
70 42 */
  43 + @ApiModelProperty(value = "商品单位")
71 44 private String unit;
  45 +
  46 +
  47 + /**
  48 + * 规格
  49 + */
  50 + @ApiModelProperty(value = "规格")
  51 + private String standard;
  52 +
72 53 /**
73 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 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 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 67 public Long getId() {
123 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 71 public void setId(Long id) {
134 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 75 public String getTitle() {
145 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 79 public void setTitle(String title) {
156 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 99 public String getUnit() {
237 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 103 public void setUnit(String unit) {
249 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 107 public Integer getState() {
261 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 111 public void setState(Integer state) {
273 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 1 package com.diligrp.mobsite.getway.domain.protocol;
2 2  
3 3  
  4 +import io.swagger.annotations.ApiModelProperty;
4 5  
5 6 /**
6 7 * <B>Description</B> 产品分类 <br />
... ... @@ -20,33 +21,21 @@ public class ProductCategory extends Category{
20 21 * 没有子分类
21 22 */
22 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 27 * 是否子级分类,HASNEXT_*
37 28 */
  29 + @ApiModelProperty(value = "是否有子分类:1-有,2-没有")
38 30 private Integer hasNext;
39 31  
40 32 /**
41 33 * 父级分类ID
42 34 */
  35 + @ApiModelProperty(value = "父分类id")
43 36 private Long pid;
44 37  
45   - /**
46   - * 是否关注
47   - */
48   - private Integer isFocus;
49   -
  38 +
50 39 /**
51 40 * get value of ProductCategory.pid
52 41 * @return the pid
... ... @@ -87,18 +76,6 @@ public class ProductCategory extends Category{
87 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 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 4 * <B>Description</B> 商品简介 <br />
10 5 * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
... ... @@ -13,280 +8,9 @@ import java.util.List;
13 8 * @createTime Aug 14, 2014 8:24:48 PM
14 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 22 private Long marketId;
23 23  
24 24  
25   - @Override
  25 +
26 26 public Long getMarketId() {
27 27 return marketId;
28 28 }
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/cart/ConfirmCartReq.java
1 1 package com.diligrp.mobsite.getway.domain.protocol.cart;
2 2  
3   -import java.util.List;
4   -
5 3 import com.diligrp.mobsite.getway.domain.protocol.BaseReq;
6 4  
  5 +import java.util.List;
  6 +
7 7  
8 8 /**
9 9 * <B>Description</B> 进货单确认请求 <br />
... ... @@ -19,16 +19,13 @@ public class ConfirmCartReq extends BaseReq{
19 19 /**
20 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 1 package com.diligrp.mobsite.getway.domain.protocol.cart;
2 2  
3   -import java.util.List;
4   -
5 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 17 @SuppressWarnings("serial")
17 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 1 package com.diligrp.mobsite.getway.domain.protocol.cart;
2 2  
3 3 import com.diligrp.mobsite.getway.domain.protocol.BaseReq;
  4 +import io.swagger.annotations.ApiModelProperty;
4 5  
5 6 /**
6 7 * <B>Description</B> 删除提货人请求 <br />
... ... @@ -16,6 +17,7 @@ public class DelConsigneeReq extends BaseReq {
16 17 /**
17 18 * 提货人ID
18 19 */
  20 + @ApiModelProperty(value = "收货人id",required = true)
19 21 private Long id;
20 22 /**
21 23 * 是否是默认
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/cart/GetCartByUserResp.java
1 1 package com.diligrp.mobsite.getway.domain.protocol.cart;
2 2  
3   -import java.util.List;
4   -
5 3 import com.diligrp.mobsite.getway.domain.protocol.BaseResp;
6 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 9 * <B>Description</B> 通过用户ID获取进货列表信息 <br />
... ... @@ -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 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 1 package com.diligrp.mobsite.getway.domain.protocol.cart;
2 2  
3 3 import com.diligrp.mobsite.getway.domain.protocol.BaseReq;
  4 +import io.swagger.annotations.ApiModelProperty;
4 5  
5 6 /**
6 7 * <B>Description</B> 获取单个提货人信息 <br />
... ... @@ -16,6 +17,7 @@ public class GetConsigneeReq extends BaseReq {
16 17 /**
17 18 * 提货人ID
18 19 */
  20 + @ApiModelProperty(value = "收货人id",required = true)
19 21 private Long id;
20 22  
21 23 public Long getId() {
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/cart/ModifyAmountReq.java
1 1 package com.diligrp.mobsite.getway.domain.protocol.cart;
2 2  
3 3 import com.diligrp.mobsite.getway.domain.protocol.BaseReq;
  4 +import io.swagger.annotations.ApiModelProperty;
4 5  
5 6 /**
6 7 * <B>Description</B> 修改进货单商品数量信息 <br />
... ... @@ -15,13 +16,15 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq;
15 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 28 private Integer amount;
26 29  
27 30  
... ... @@ -45,14 +48,12 @@ public class ModifyAmountReq extends BaseReq {
45 48 public void setAmount(Integer amount) {
46 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 1 package com.diligrp.mobsite.getway.domain.protocol.cart;
2 2  
3 3 import com.diligrp.mobsite.getway.domain.protocol.BaseReq;
  4 +import io.swagger.annotations.ApiModelProperty;
4 5  
5 6 /**
6 7 * <B>Description</B> 设置默认提货人请求 <br />
... ... @@ -16,6 +17,7 @@ public class SetDefaultConsigneeReq extends BaseReq {
16 17 /**
17 18 * 提货人信息Id
18 19 */
  20 + @ApiModelProperty(value = "收货人id")
19 21 private Long id;
20 22  
21 23 public Long getId() {
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/cart/model/CartProduct.java
1 1 package com.diligrp.mobsite.getway.domain.protocol.cart.model;
2 2  
3 3 import com.diligrp.mobsite.getway.domain.protocol.Goods;
  4 +import io.swagger.annotations.ApiModelProperty;
4 5  
5 6 import java.util.List;
6 7  
... ... @@ -24,100 +25,77 @@ public class CartProduct extends Goods {
24 25 * 2-价格未变化
25 26 */
26 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 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 47 private Long stockNum;
40   - /**
41   - * 价格是否变化
42   - * 1-价格变化
43   - * 2-价格未变化
44   - */
45   - private Integer isPriceChange = PRICE_NO_CHANGE;
  48 +
46 49 /**
47 50 * 卖家id
48 51 */
49 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 91 public Long getSellerId() {
115 92 return sellerId;
116 93 }
117 94  
118   -
119 95 public void setSellerId(Long sellerId) {
120 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 13 @SuppressWarnings("serial")
14 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 18 * 父级分类ID
27 19 */
28 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 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 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 8 * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
9 9 * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
10 10 * <B>Company</B> 地利集团
11   - * @createTime Aug 18, 2014 11:07:07 AM
  11 + * @createTime Aug 18, 2014 11:06:21 AM
12 12 * @author wujianjun
13 13 */
14 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 8 * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
9 9 * <B>Company</B> 地利集团
10 10 * @createTime Aug 14, 2014 8:22:00 PM
11   - * @author wujianjun
  11 + * @author weili
12 12 */
13 13 @SuppressWarnings("serial")
14 14 public class GetProductIntroductionReq extends BaseReq {
... ... @@ -17,18 +17,12 @@ public class GetProductIntroductionReq extends BaseReq {
17 17 * 商品ID
18 18 */
19 19 private Long id;
20   -
21   - /**
22   - * 市场全称
23   - */
24   - @Deprecated
25   - private String marketFullName;
26 20  
27 21 /**
28 22 * get value of GetProductIntroductionReq.id
29 23 * @return the id
30 24 * @createTime Aug 14, 2014 8:23:49 PM
31   - * @author wujianjun
  25 + * @author weili
32 26 */
33 27 public Long getId() {
34 28 return id;
... ... @@ -38,32 +32,12 @@ public class GetProductIntroductionReq extends BaseReq {
38 32 * set value of GetProductIntroductionReq.id
39 33 * @param id the id to set
40 34 * @createTime Aug 14, 2014 8:23:49 PM
41   - * @author wujianjun
  35 + * @author weili
42 36 */
43 37 public void setId(Long id) {
44 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 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 1 package com.diligrp.mobsite.getway.domain.protocol.detail;
2 2  
3   -import java.util.List;
4   -
5 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 9 * <B>Description</B> 获取商品推荐响应 <br />
... ... @@ -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 25 * get value of GetProductRecommendResp.goods
... ... @@ -27,7 +27,7 @@ public class GetProductRecommendResp extends BaseResp {
27 27 * @createTime Aug 14, 2014 8:43:27 PM
28 28 * @author wujianjun
29 29 */
30   - public List<Goods> getGoods() {
  30 + public List<GoodsSuper> getGoods() {
31 31 return goods;
32 32 }
33 33  
... ... @@ -37,7 +37,7 @@ public class GetProductRecommendResp extends BaseResp {
37 37 * @createTime Aug 14, 2014 8:43:27 PM
38 38 * @author wujianjun
39 39 */
40   - public void setGoods(List<Goods> goods) {
  40 + public void setGoods(List<GoodsSuper> goods) {
41 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
  1 +package com.diligrp.mobsite.getway.domain.protocol.detail;
  2 +
  3 +import com.diligrp.mobsite.getway.domain.protocol.BaseResp;
  4 +
  5 +/**
  6 + * Created by xxxzzz on 2016/12/9.
  7 + */
  8 +public class GetShopByIdResp extends BaseResp {
  9 +}
... ...
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 1 package com.diligrp.mobsite.getway.domain.protocol.login;
2 2  
3 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 * <B>Description</B> 检测手机验证码是否一致 <br />
... ... @@ -11,15 +13,18 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq;
11 13 * @author wujianjun
12 14 */
13 15 @SuppressWarnings("serial")
  16 +@ApiModel
14 17 public class CheckVeriCodeReq extends BaseReq {
15 18  
16 19 /**
17 20 * 手机验证码
18 21 */
  22 + @ApiModelProperty(value = "验证码")
19 23 private String veriCode;
20 24 /**
21 25 * 手机号码
22 26 */
  27 + @ApiModelProperty(value = "手机号码")
23 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 22 /**
23 23 * 验证结果:1-验证码正确,2验证码错误
24 24 */
25   - //TODO 后期需要删除
26 25 @Deprecated
27 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 1 package com.diligrp.mobsite.getway.domain.protocol.login;
2 2  
3 3 import com.diligrp.mobsite.getway.domain.protocol.BaseReq;
  4 +import io.swagger.annotations.ApiModelProperty;
4 5  
5 6 /**
6 7 * <B>Description</B> 登录请求 <br />
... ... @@ -10,22 +11,33 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq;
10 11 * @createTime Aug 12, 2014 7:57:01 PM
11 12 * @author wujianjun
12 13 */
13   -@SuppressWarnings("serial")
14 14 public class LoginReq extends BaseReq {
15 15  
16 16 /**
17 17 * 会员名称
18 18 */
  19 + @ApiModelProperty(value = "登录账号",required = true)
19 20 private String accountName;
20 21 /**
21 22 * 密码
22 23 */
  24 + @ApiModelProperty(value = "登录密码",required = true)
23 25 private String password;
  26 +
24 27 /**
25   - * 极光推送-三方系统ID
  28 + * 密码
26 29 */
  30 + @ApiModelProperty(value = "验证码")
  31 + private String authCode;
  32 +
  33 +
  34 + //极光ID
27 35 private String registerNo;
28 36  
  37 +
  38 + public LoginReq() {
  39 + }
  40 +
29 41 public String getRegisterNo() {
30 42 return registerNo;
31 43 }
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/login/LoginResp.java
1 1 package com.diligrp.mobsite.getway.domain.protocol.login;
2 2  
3 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 14 * @author wujianjun
13 15 */
14 16 @SuppressWarnings("serial")
  17 +@ApiModel("返回参数")
15 18 public class LoginResp extends BaseResp {
16 19  
17 20 /**
... ... @@ -54,22 +57,27 @@ public class LoginResp extends BaseResp {
54 57 /**
55 58 * 账户ID
56 59 */
  60 + @ApiModelProperty(value = "账号")
57 61 private Long accountId;
58 62 /**
59 63 * 账户名
60 64 */
  65 + @ApiModelProperty(value = "账号")
61 66 private String accountName;
62 67 /**
63 68 * 手机号码
64 69 */
  70 + @ApiModelProperty(value = "手机号码")
65 71 private String mobile;
66 72 /**
67 73 * 邮箱地址
68 74 */
  75 + @ApiModelProperty(value = "邮箱")
69 76 private String email;
70 77 /**
71 78 * 1:个人用户, 2:企业用户
72 79 */
  80 + @ApiModelProperty(value = "用户类型:个人用户,2:企业用户")
73 81 private Integer userType;
74 82 /**
75 83 * 1 登入 -1 登出 (出场验货专用)
... ... @@ -78,20 +86,24 @@ public class LoginResp extends BaseResp {
78 86 /**
79 87 * 真实姓名
80 88 */
  89 + @ApiModelProperty(value = "真实姓名")
81 90 private String realName;
82 91 /**
83 92 * 登录之后,passport返回
84 93 * 用于支付鉴权
85 94 */
  95 + @ApiModelProperty(value = "token")
86 96 private String token;
87 97 /**
88 98 * 头像图片
89 99 */
  100 + @ApiModelProperty(value = "头像")
90 101 private String headImg;
91 102  
92 103 /**
93 104 * 用户信息是否完善:1-完善 0-不完善
94 105 */
  106 + @ApiModelProperty(value = "用户信息是否完善:1-完善 0-不完善")
95 107 private Integer infoCompleteFlag;
96 108 /**
97 109 * get value of LoginResp.accountId
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/login/SendVeriCodeReq.java
1 1 package com.diligrp.mobsite.getway.domain.protocol.login;
2 2  
3 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 31 /**
31 32 * 电话号码
32 33 */
  34 + @ApiModelProperty(value = "手机号码",required = true)
33 35 private String mobile;
34 36 /**
35 37 * 消息类型
36 38 */
  39 + @ApiModelProperty(value = "消息类型",required = false)
37 40 private Integer msgType;
38 41  
39 42  
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/login/SendVeriCodeResp.java
1 1 package com.diligrp.mobsite.getway.domain.protocol.login;
2 2  
3 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 28 /**
28 29 * 发送结果
29 30 */
30   - @Deprecated
31   - //后期需要删除
  31 + @ApiModelProperty(value = "发送结果")
32 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 9 private Long marketId;
10 10  
11 11  
12   - @Override
  12 +
13 13 public Long getMarketId() {
14 14 return marketId;
15 15 }
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/register/UserRegisterReq.java
1 1 package com.diligrp.mobsite.getway.domain.protocol.register;
2 2  
3 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 * <B>Description</B> 注册个人用户请求 <br />
... ... @@ -10,7 +12,7 @@ import com.diligrp.mobsite.getway.domain.protocol.BaseReq;
10 12 * @createTime Aug 12, 2014 7:48:27 PM
11 13 * @author wujianjun
12 14 */
13   -@SuppressWarnings("serial")
  15 +@ApiModel(value = "请求参数")
14 16 public class UserRegisterReq extends BaseReq {
15 17  
16 18 public static final int USER_TYPE_BUSINESS = 1;//市场商户,企业单位,个体经营,个人
... ... @@ -24,33 +26,44 @@ public class UserRegisterReq extends BaseReq {
24 26 /**
25 27 * 手机号码
26 28 */
  29 + @ApiModelProperty(value = "手机号码",required = true)
27 30 protected String mobile;
28 31  
29 32 /**
30 33 * 密码
31 34 */
  35 + @ApiModelProperty(value = "密码",required = true)
32 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 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 69 * get value of RegisterPersonalReq.mobile
... ... @@ -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 1 package com.diligrp.mobsite.getway.domain.protocol.register;
2 2  
3 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 41 /**
42 42 * 注册结果
43 43 */
  44 + @ApiModelProperty(value = "注册结果")
44 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 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 7 * <B>Description</B> 根据关键字搜索商品请求 <br />
... ... @@ -13,16 +12,17 @@ import org.nutz.json.JsonField;
13 12 * @author wujianjun
14 13 */
15 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 20 private String keyword;
21 21  
22   - /**
23   - * 置顶类型
24   - */
25   - private Integer topOrderType;
  22 + ///**
  23 + // * 置顶类型
  24 + // */
  25 + //private Integer topOrderType;
26 26 /**
27 27 * get value of SearchProductByKeywordReq.keyword
28 28 * @return the keyword
... ... @@ -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 59 \ No newline at end of file
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/search/SearchProductResp.java
1 1 package com.diligrp.mobsite.getway.domain.protocol.search;
2 2  
3   -import java.util.List;
4   -
5 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 9 * <B>Description</B> (抽象)商品搜索响应 <br />
... ... @@ -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 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 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 73 this.mainProducerId = mainProducerId;
74 74 }
75 75  
76   - @Override
  76 +
77 77 public Long getMarketId() {
78 78 return marketId;
79 79 }
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/shop/GetShopDetailsReq.java
1 1 package com.diligrp.mobsite.getway.domain.protocol.shop;
2 2  
3 3 import com.diligrp.mobsite.getway.domain.protocol.BaseReq;
  4 +import io.swagger.annotations.ApiModelProperty;
4 5  
5 6 /**
6 7 * <B>查询商品详情req</B> <br />
... ... @@ -15,6 +16,7 @@ public class GetShopDetailsReq extends BaseReq {
15 16 /**
16 17 * 店铺id
17 18 */
  19 + @ApiModelProperty(value = "店铺id",required = true)
18 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
  1 +package com.diligrp.mobsite.getway.domain.protocol.topic;
  2 +
  3 +import com.diligrp.mobsite.getway.domain.base.BaseListReq;
  4 +
  5 +/**
  6 + * Created by xxxzzz on 2016/12/20.
  7 + */
  8 +public class GetMealListReq extends BaseListReq{
  9 +}
... ...
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 26 * logo图片
27 27 */
28 28 public static final String LOGO_PIC = "LOGO_PIC";
29   -
  29 +
30 30 /**
31 31 * 图片类型
32 32 */
33 33 private String picType;
34 34  
35   -
  35 +
36 36 /**
37 37 * get value of GetPicReq.picType
38 38 * @return the picType
... ... @@ -43,7 +43,7 @@ public class GetPicReq extends BaseReq {
43 43 return picType;
44 44 }
45 45  
46   -
  46 +
47 47 /**
48 48 * set value of GetPicReq.picType
49 49 * @param picType the picType to set
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/topic/GetTopicDetailReq.java
1 1 package com.diligrp.mobsite.getway.domain.protocol.topic;
2 2  
3 3 import com.diligrp.mobsite.getway.domain.protocol.BaseReq;
  4 +import io.swagger.annotations.ApiModelProperty;
4 5  
5 6 /**
6 7 * Created by david on 2016/1/20.
7 8 */
8 9 public class GetTopicDetailReq extends BaseReq {
9 10  
  11 +
  12 + @ApiModelProperty(value = "id",required = true)
10 13 private Long id;
11 14  
12 15 public Long getId() {
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/topic/model/HomeStatisticsTopic.java
1 1 package com.diligrp.mobsite.getway.domain.protocol.topic.model;
2 2  
  3 +import io.swagger.annotations.ApiModelProperty;
  4 +
3 5 import java.io.Serializable;
4 6  
5 7 /**
... ... @@ -14,20 +16,36 @@ public class HomeStatisticsTopic implements Serializable {
14 16 public static final int TOPIC_TYPE_SHOP = 2;
15 17 public static final int TOPIC_TYPE_INFO = 3;
16 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 27 private Integer topicType;
21 28 /**
22 29 *展示的标题名称
23 30 * */
  31 + @ApiModelProperty(value = "标题名称")
24 32 private String topicName;
25 33  
26 34 /**
27 35 *跳转的对应链接
28 36 * */
  37 + @ApiModelProperty(value = "公告内容")
29 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 49 public Integer getTopicType() {
32 50 return topicType;
33 51 }
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/user/ModifyPwdReq.java
1 1 package com.diligrp.mobsite.getway.domain.protocol.user;
2 2  
3 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 13 * @createTime Aug 12, 2014 8:07:31 PM
12 14 * @author wujianjun
13 15 */
14   -@SuppressWarnings("serial")
  16 +@ApiModel(value = "请求参数")
15 17 public class ModifyPwdReq extends BaseReq {
16 18  
17 19 /**
... ... @@ -22,12 +24,14 @@ public class ModifyPwdReq extends BaseReq {
22 24 /**
23 25 * 新的密码
24 26 */
  27 + @ApiModelProperty(value = "新密码")
25 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 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 1 package com.diligrp.mobsite.getway.domain.protocol.user;
2 2  
3 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 13 * @createTime Aug 12, 2014 8:09:21 PM
13 14 * @author wujianjun
14 15 */
15   -@SuppressWarnings("serial")
  16 +@ApiModel(value="返回参数")
16 17 public class ModifyPwdResp extends BaseResp {
17 18  
18 19 /**
... ... @@ -28,6 +29,7 @@ public class ModifyPwdResp extends BaseResp {
28 29 /**
29 30 * 更新结果
30 31 */
  32 + @ApiModelProperty(value = "更新结果")
31 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 69 * @createTime 2015年3月4日 下午6:46:54
70 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 134 goodsInfo.setDefaultPic(product.getDefaultPic());
135 135 goodsInfo.setPrice((long)product.getMinPrice());
136 136 goodsInfo.setUnit(product.getSaleUnit());
137   - goodsInfo.setHasSpecial(product.getHasSpecial());//是否为特价商品
138 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 136 Map<String,String> params = new HashMap<String, String>();
137 137 params.put("mobile", req.getMobile());
138 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 141 // params.put("accountName", req.getAccountName());
142 142 // params.put("source", PASSPORT_REGIST_SOURCE_PNR);
143 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 5 import com.diligrp.mobsite.getway.domain.common.ErrorMessage;
6 6 import com.diligrp.mobsite.getway.domain.common.RedisKey;
7 7 import com.diligrp.mobsite.getway.domain.common.ResultCode;
8   -import com.diligrp.mobsite.getway.domain.common.enums.GoodsPriceTypeEnmu;
9 8 import com.diligrp.mobsite.getway.domain.common.enums.user.FavoriteType;
10 9 import com.diligrp.mobsite.getway.domain.except.ServiceException;
11 10 import com.diligrp.mobsite.getway.domain.protocol.AddCartProduct;
... ... @@ -13,9 +12,7 @@ import com.diligrp.mobsite.getway.domain.protocol.ConsigneeInfo;
13 12 import com.diligrp.mobsite.getway.domain.protocol.cart.ModifyAmountReq;
14 13 import com.diligrp.mobsite.getway.rpc.buyer.GoodsRPC;
15 14 import com.diligrp.mobsite.getway.rpc.buyer.UserRPC;
16   -import com.diligrp.mobsite.getway.rpc.utils.ProductUtils;
17 15 import com.diligrp.titan.sdk.domain.Product;
18   -import com.diligrp.titan.sdk.util.SkuUtil;
19 16 import com.diligrp.website.util.redis.RedisUtil;
20 17 import com.diligrp.website.util.security.Validator;
21 18 import com.diligrp.website.web.interfaces.WebsiteClient;
... ... @@ -32,7 +29,6 @@ import javax.annotation.Resource;
32 29 import java.util.ArrayList;
33 30 import java.util.Date;
34 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 199 ShoppingCartReq item = new ShoppingCartReq();
204 200 item.setUserId(req.getUserId());
205 201 item.setAmount(req.getAmount());
206   - item.setCartId(req.getCartId());
  202 + item.setSku(req.getSku());
207 203 scList.add(item);
208 204 boolean result = userClient.getShoppingCartService().updateCarts(scList);
209 205 if(!result) {
210 206 logger.error("修改购物车商品数量失败,[userId={},cartId={}]",
211   - req.getUserId(),req.getCartId());
  207 + req.getUserId(),req.getSku());
212 208 }else {
213 209 logger.info("修改购物车商品数量成功,[userId={},cartId={}]",
214   - req.getUserId(),req.getCartId());
  210 + req.getUserId(),req.getSku());
215 211 }
216 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 218 @Override
242 219 public boolean addShoppingCart(List<AddCartProduct> cartProducts, Long userId) {
... ... @@ -249,22 +226,22 @@ public class UserRPCImpl implements UserRPC {
249 226 cart = new ShoppingCartReq();
250 227 cart.setAddToCartTime(new Date());
251 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 245 shopCarts.add(cart);
269 246 }
270 247  
... ... @@ -284,6 +261,25 @@ public class UserRPCImpl implements UserRPC {
284 261 }
285 262  
286 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 283 public UserInfoResp getUserByLoginId(String loginId) {
288 284  
289 285 UserInfoResp userInfoResp = null;
... ... @@ -382,13 +378,9 @@ public class UserRPCImpl implements UserRPC {
382 378 info.setDef(consigneeInfo.getIsDefault());
383 379 }
384 380 info.setPhone(consigneeInfo.getMobile());
385   - info.setTradeMarket(consigneeInfo.getMarketId()==null?null:consigneeInfo.getMarketId().intValue());
386 381 info.setUserId(userId);
387   - info.setIdCard(consigneeInfo.getIdCard());
388   - info.setAddrId(consigneeInfo.getCityAddressNo()==null?0L:consigneeInfo.getCityAddressNo());
389 382 info.setAddress(consigneeInfo.getCityAddress());
390 383 info.setAddressDetail(consigneeInfo.getStreetAddress());
391   - info.setDeliveryType(consigneeInfo.getDeliveryType());
392 384 return info;
393 385 }
394 386  
... ... @@ -398,12 +390,8 @@ public class UserRPCImpl implements UserRPC {
398 390 consInfo.setIsDefault(info.getDef());
399 391 consInfo.setMobile(info.getPhone());
400 392 consInfo.setId(info.getId());
401   - consInfo.setIdCard(info.getIdCard());
402   - consInfo.setCityAddressNo(info.getAddrId());
403 393 consInfo.setCityAddress(info.getAddress());
404 394 consInfo.setStreetAddress(info.getAddressDetail());
405   - consInfo.setDeliveryType(info.getDeliveryType());
406   - consInfo.setMarketId(info.getTradeMarket()==null?null:info.getTradeMarket().longValue());
407 395 return consInfo;
408 396 }
409 397  
... ...
mobsite-getway-rpc/src/main/java/com/diligrp/mobsite/getway/rpc/utils/ProductUtils.java
1 1 package com.diligrp.mobsite.getway.rpc.utils;
2 2  
3   -import java.util.ArrayList;
4   -import java.util.List;
5   -
6 3 import com.diligrp.mobsite.getway.domain.protocol.AddCartProduct;
7 4 import com.diligrp.mobsite.getway.domain.protocol.Quotation;
8 5 import com.diligrp.titan.sdk.domain.ProductQuotation;
9 6 import com.diligrp.titan.sdk.util.SkuUtil;
10 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 14 * <B>Description</B> 生成sku字符串 <br />
... ... @@ -31,21 +31,21 @@ public class ProductUtils {
31 31 //根据skuId生成,sku字符串,生成规则
32 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 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 205 //构建商品基础信息
206 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 210 ShopIntroduction shopInfo = null;
... ... @@ -227,12 +215,7 @@ public class GoodsServiceImpl implements GoodsService {
227 215 } catch (Exception e) {
228 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 220 Video video = product.getVideo();
238 221 if (!Validator.isNull(video)) {
... ... @@ -245,7 +228,7 @@ public class GoodsServiceImpl implements GoodsService {
245 228 videoInfo.setStatus(video.getStatus());
246 229 videoInfo.setSource(video.getSource());
247 230 videoInfos.add(videoInfo);
248   - productInfo.setVideos(videoInfos);
  231 +
249 232 }
250 233  
251 234 resp.setProductIntroduction(productInfo);
... ... @@ -260,10 +243,7 @@ public class GoodsServiceImpl implements GoodsService {
260 243 */
261 244 private void buildProductBaseInfo(ProductIntroduction pi, Product product) {
262 245 pi.setId(product.getPid());
263   - pi.setCategoryId(product.getCid().longValue());
264   - pi.setState(sumProductState(product));
265 246 pi.setUnit(product.getSaleUnit());
266   - pi.setSaleType(Integer.valueOf(product.getSaleType()));
267 247  
268 248 String productionAddr = product.getProductionAddr();
269 249 String tempAddr = "";
... ... @@ -271,24 +251,13 @@ public class GoodsServiceImpl implements GoodsService {
271 251 int endStr = productionAddr.indexOf("省")==-1?productionAddr.indexOf("市"):productionAddr.indexOf("省");
272 252 tempAddr = productionAddr.substring(0,endStr+1);
273 253 }
274   - pi.setProducingArea(Validator.isEmpty(tempAddr)?productionAddr:tempAddr);//商品产地
275 254 //if (!Validator.isNull(product.getLocalityId())) {
276 255 // String locationAddr = configRPC.getProvinceAndCityByZoneId((long) product.getLocalityId(), true);
277 256 // pi.setLocationAddr(locationAddr);//商品所在地
278 257 //}
279 258 //pi.setLocationid(product.getLocalityId());
280 259 pi.setTitle(product.getName());
281   - pi.setTransVolume(sumTransVolume(product.getPid()) + product.getSaleUnit()); //交易量
282 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 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 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 308 @Override
401 309 public GetProductAppraiseResp getAppraises(GetProductAppraiseReq req) {
... ... @@ -455,19 +363,7 @@ public class GoodsServiceImpl implements GoodsService {
455 363  
456 364 GetProductRecommendResp resp = new GetProductRecommendResp();
457 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 367 params.setClient(Constant.SEARCH_CLIENT_ANDROID);
472 368 params.setType(RECOMMEND_TYPE_TRADE);
473 369 params.setUserLocalInfo("andriod");
... ... @@ -490,13 +386,11 @@ public class GoodsServiceImpl implements GoodsService {
490 386 goods.setId(product.getPid());
491 387 goods.setPictures(product.getPictures());
492 388 goods.setPrice((long) product.getMinPrice());
493   - goods.setMinPrice((long) product.getMinPrice());
494   - goods.setMaxPrice((long) product.getMaxPrice());
  389 +
495 390 goods.setUnit(product.getSaleUnit());
496 391 goods.setTitle(product.getName());
497 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 422 logger.info("根据关键字搜索商品:keyword=" + req.getKeyword());
529 423 factor.setKey(req.getKeyword());
530 424 }
531   - //转换查询参数
532   - convertSearchParam(req, factor);
533   - // 获取搜索的商品结果
534 425 //转换搜索结果
535 426 SearchGoodsResult goodsResult = searchRPC.searchGoodsInfos(factor);
536   - convertSearchResp(goodsResult, resp, req.getCategoryId());
537 427 return resp;
538 428 }
539 429  
... ... @@ -613,22 +503,7 @@ public class GoodsServiceImpl implements GoodsService {
613 503 */
614 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 563 for (GoodsInfo goodsInfo : goodsList) {
689 564 gs = new Goods();
690 565 gs.setId(goodsInfo.getPid());// id
691   - gs.setSaleType(goodsInfo.getSaleType());
692 566 gs.setPictures(new ArrayList<String>());
693 567 gs.getPictures().add(PicUtils.convertPicUrl(goodsInfo.getImage(), Constant.COMMON_NUM_ONE, Constant.COMMON_NUM_THREE));
694 568 gs.setTitle(goodsInfo.getTitle());// 标题
695 569 gs.setPrice((long) goodsInfo.getPrice());
696 570 gs.setUnit(goodsInfo.getAmountUnit());
697 571  
698   - gs.setSalesNum(goodsInfo.getOrders() == null ? 0 : (long) goodsInfo.getOrders());
699 572 location = "";
700 573 if (!Validator.isNull(goodsInfo.getLocalityProvinceName())) {
701 574 location += goodsInfo.getLocalityProvinceName();
... ... @@ -704,8 +577,6 @@ public class GoodsServiceImpl implements GoodsService {
704 577 location += goodsInfo.getLocalityCityName();
705 578 }
706 579  
707   - gs.setHasSpecial(goodsInfo.getSpecialType()); //是否是特价商品
708   - gs.setLocationAddr(location);
709 580 lstGoods.add(gs);
710 581 }
711 582 return lstGoods;
... ... @@ -729,17 +600,11 @@ public class GoodsServiceImpl implements GoodsService {
729 600 for (GoodsInfo goodsInfo : goodsList) {
730 601 gs = new Goods();
731 602 gs.setId(goodsInfo.getPid());// id
732   - gs.setHasPromotion(goodsInfo.getPromote());
733   - gs.setSaleType(goodsInfo.getSaleType());
734 603 gs.setPictures(new ArrayList<String>());
735 604 gs.getPictures().add(PicUtils.convertPicUrl(goodsInfo.getImage(), Constant.COMMON_NUM_ONE, Constant.COMMON_NUM_THREE));
736 605 gs.setTitle(goodsInfo.getTitle());// 标题
737 606 gs.setPrice((long) goodsInfo.getPrice());
738 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 608 location = "";
744 609 if (!Validator.isNull(goodsInfo.getLocalityProvinceName())) {
745 610 location += goodsInfo.getLocalityProvinceName();
... ... @@ -747,12 +612,6 @@ public class GoodsServiceImpl implements GoodsService {
747 612 if (!Validator.isNull(goodsInfo.getLocalityCityName())) {
748 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 615 lstGoods.add(gs);
757 616 }
758 617 return lstGoods;
... ... @@ -852,7 +711,6 @@ public class GoodsServiceImpl implements GoodsService {
852 711 pCategory.setName(category.getCname());
853 712 pCategory.setHasNext(category.isHasChild() ? ProductCategory.HASNEXT_YES : ProductCategory.HASNEXT_NO);
854 713 pCategory.setPid(Validator.isNull(req) ? null : req.getId());
855   - pCategory.setIsFocus(ProductCategory.FOCUS_NO);
856 714 pCategory.setImgUrl(category.getIcon());
857 715 caList.add(pCategory);
858 716 }
... ... @@ -875,8 +733,6 @@ public class GoodsServiceImpl implements GoodsService {
875 733 pCategory.setHasNext(Validator.isEmpty(productCategoryRPC.getChildrenCategory(Long.valueOf(category.getCid()))) ? ProductCategory.HASNEXT_NO : ProductCategory.HASNEXT_YES);
876 734 }
877 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 736 pCategory.setImgUrl(category.getIcon());
881 737 resp.getProductCategorys().add(pCategory);
882 738 }
... ... @@ -954,15 +810,9 @@ public class GoodsServiceImpl implements GoodsService {
954 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 814 //2.0转换搜索结果
964 815 AppGoodsSearchResult goodsResult = searchRPC.searchGoodsResult(factor);
965   - convertSearchListResp(goodsResult, resp, req.getCategoryId());
966 816 return resp;
967 817 }
968 818  
... ... @@ -1068,34 +918,6 @@ public class GoodsServiceImpl implements GoodsService {
1068 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 260 if (!Validator.isNull(content)){
261 261 content = content.replaceAll("<p>", "").replaceAll("</p>", "");
262 262 }
  263 + topic.setId(articleDTO.getId());
263 264 topic.setTopicContent(content);
264 265 topic.setTopicName(articleDTO.getTitle());
265 266 topic.setTopicType(returnTopicType(articleDTO.getSubTitle()));
... ...
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/buyer/settle/CartService.java
1 1 package com.diligrp.mobsite.getway.service.buyer.settle;
2 2  
  3 +import com.diligrp.mobsite.getway.domain.protocol.BaseResp;
3 4 import com.diligrp.mobsite.getway.domain.protocol.cart.*;
4 5 import com.diligrp.mobsite.getway.domain.protocol.detail.GetServiceByPickupReq;
5 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 6 import com.diligrp.mobsite.getway.domain.common.ErrorMessage;
7 7 import com.diligrp.mobsite.getway.domain.common.ResultCode;
8 8 import com.diligrp.mobsite.getway.domain.common.enums.CreditStateEnum;
9   -import com.diligrp.mobsite.getway.domain.common.enums.user.FavoriteType;
10 9 import com.diligrp.mobsite.getway.domain.except.ServiceException;
11 10 import com.diligrp.mobsite.getway.domain.protocol.*;
12 11 import com.diligrp.mobsite.getway.domain.protocol.cart.*;
... ... @@ -23,7 +22,6 @@ import com.diligrp.mobsite.getway.service.buyer.user.UserService;
23 22 import com.diligrp.mobsite.getway.service.common.utils.DateUtils;
24 23 import com.diligrp.mobsite.getway.service.common.utils.PicUtils;
25 24 import com.diligrp.titan.sdk.domain.Product;
26   -import com.diligrp.titan.sdk.domain.ProductQuotation;
27 25 import com.diligrp.titan.sdk.domain.Sku;
28 26 import com.diligrp.titan.sdk.input.DefindResult;
29 27 import com.diligrp.titan.sdk.util.SkuUtil;
... ... @@ -144,14 +142,14 @@ public class CartServiceImpl implements CartService {
144 142 List<CartItem> cartItems = cartInfo.getCartItemList();
145 143 shop = shopRPC.getShopById(cartItems.get(0).getShopId());
146 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 153 //如果商品信息为空的话,则不设值,如果设值则为null,会影响手机端处理
156 154 if (productMap.size() > 0) {
157 155 cartShopInfo.setProducts(new ArrayList<CartProduct>(productMap.values()));
... ... @@ -169,13 +167,7 @@ public class CartServiceImpl implements CartService {
169 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 171 return resp;
180 172 }
181 173  
... ... @@ -222,99 +214,19 @@ public class CartServiceImpl implements CartService {
222 214 CartProduct cartProduct = productMap.get(productId);
223 215 if (Validator.isNull(cartProduct)) {
224 216 cartProduct = new CartProduct();
225   - cartProduct.setCategoryId((long)cartItem.getCid());
226 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 219 cartProduct.setDefaultPic(PicUtils.convertPicUrl(cartItem.getPicture(), Constant.COMMON_NUM_ONE, Constant.COMMON_NUM_THREE));
251 220 cartProduct.setTitle(cartItem.getTitle());
252 221 cartProduct.setStockNum(Long.valueOf(cartItem.getStock()));
253 222 cartProduct.setUnit(cartItem.getPriceUnit());
254   - cartProduct.setBuyNum(cartItem.getPreAmount());
255 223 cartProduct.setPrice(cartItem.getCurrPrice());
256   - cartProduct.setPriceType(cartItem.getQuotationType());
257 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 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 345  
434 346 String sku = SkuUtil.encode(ProductUtils.getSkuStr(acp,true));
435 347 ShoppingCartReq shopReq = new ShoppingCartReq();
436   - shopReq.setProductId(req.getCartProduct().getProductId());
  348 + // shopReq.setProductId(req.getCartProduct().getProductId());
437 349 shopReq.setSku(sku);
438 350 shopReq.setUserId(req.getUserId());
439 351 List<ShoppingCartResp> shopingResp = userRPC.getCart(shopReq);
... ... @@ -445,11 +357,11 @@ public class CartServiceImpl implements CartService {
445 357 return resp;
446 358 }
447 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 365 convertConfirmResp(cartReq, resp);
454 366 resp.setCartType(req.getCartType());
455 367 return resp;
... ... @@ -465,8 +377,7 @@ public class CartServiceImpl implements CartService {
465 377 private AddCartImmediatelyResp addCreditCart(AddCartImmediatelyReq req){
466 378  
467 379 //检验授信
468   - buildCreditState(req.getCartProduct().getShopId(), req.getUserId());
469   -
  380 +
470 381 AddCartImmediatelyResp resp = new AddCartImmediatelyResp();
471 382 resp.setCartType(req.getCartType());
472 383  
... ... @@ -529,73 +440,10 @@ public class CartServiceImpl implements CartService {
529 440 */
530 441 private ConfirmCartShopInfo buildConfirmCartShopInfo(AddCartProduct addCart){
531 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 448 return cartShopInfo;
601 449 }
... ... @@ -613,7 +461,7 @@ public class CartServiceImpl implements CartService {
613 461 String sku = SkuUtil.encode(ProductUtils.getSkuStr(addCart,true));
614 462  
615 463 CartProductSku cartSku = new CartProductSku();
616   - cartSku.setBuyNum(addCart.getAmount());
  464 + cartSku.setBuyNum(addCart.getQuantity());
617 465 cartSku.setUnit(productInfo.getSaleUnit());
618 466 cartSku.setSku(sku);
619 467  
... ... @@ -639,44 +487,7 @@ public class CartServiceImpl implements CartService {
639 487 * @author zhangshirui
640 488 */
641 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 493 @Override
... ... @@ -699,10 +510,7 @@ public class CartServiceImpl implements CartService {
699 510 if (Validator.isNull(productInfo)) {
700 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 516 judgeStockInvalid(productInfo);
... ... @@ -711,11 +519,9 @@ public class CartServiceImpl implements CartService {
711 519 saleInfo.setId(productInfo.getPid());
712 520 saleInfo.setUnit(productInfo.getSaleUnit());
713 521 saleInfo.setState(productInfo.getStatus());
714   - saleInfo.setMinWholesale(productInfo.getMinNum());
715 522 saleInfo.setStockNum(productInfo.getStockNum());
716 523 saleInfo.setDefaultPic(productInfo.getDefaultPic());
717 524 saleInfo.setTitle(productInfo.getName());
718   - saleInfo.setHasSpecial(productInfo.getHasSpecial());
719 525 ShopInfo shopInfo = new ShopInfo();
720 526 shopInfo.setId(productInfo.getVendorId());
721 527 saleInfo.setShopInfo(shopInfo);
... ... @@ -798,32 +604,7 @@ public class CartServiceImpl implements CartService {
798 604 * @author zhangshirui
799 605 */
800 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 635 logger.error(String.format("SKU解码失败[pid=%s,sku=%s]", productId, sku.getSku()), e);
855 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 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 646 return skuInfoMap;
879 647 }
880 648  
... ... @@ -891,23 +659,7 @@ public class CartServiceImpl implements CartService {
891 659 */
892 660 private void judgeStockInvalid(Product product){
893 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 717 private boolean compareAttribute(final com.diligrp.titan.sdk.domain.AttributeValue valueItem,
966 718 final List<com.diligrp.titan.sdk.domain.Attribute> srcAttribute,
967 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 723 final List<com.diligrp.titan.sdk.domain.AttributeValue> firstRowValues = srcAttribute.get(0).getValues();
1003 724 SKUInfo skuI = null;
1004 725 for (com.diligrp.titan.sdk.domain.AttributeValue firstRowValue : firstRowValues) {
1005 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 729 return false;
1017 730 }
... ... @@ -1088,7 +801,7 @@ public class CartServiceImpl implements CartService {
1088 801 //2.从用户中心获取进货单数据
1089 802 List<ShoppingCartResp> shoppingCartResps = getCartsByUser(userId);
1090 803 //3.进货单列表信息
1091   - List<Long> skuCartIds = req.getSkuCartIds();
  804 + List<String> skuCartIds = req.getSkus();
1092 805 if (Validator.isEmpty(shoppingCartResps) || Validator.isEmpty(skuCartIds)) {
1093 806 return;
1094 807 }
... ... @@ -1164,13 +877,7 @@ public class CartServiceImpl implements CartService {
1164 877 //TODO 后期需要修改,结构体
1165 878 Map<Long, CartProduct> productMap = new HashMap<Long, CartProduct>();
1166 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 881 cartShop.setCartProductMap(productMap);
1175 882 }
1176 883 //店铺价格
... ... @@ -1251,12 +958,7 @@ public class CartServiceImpl implements CartService {
1251 958 int pStartTime = 0;//最小备货时间
1252 959 int pEndTime = 0;//最大备货时间
1253 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 962 Date minDate = null;
1261 963 Date maxDate = null;
1262 964 try {
... ... @@ -1273,7 +975,7 @@ public class CartServiceImpl implements CartService {
1273 975 @Override
1274 976 public DelCartsResp delCartByIds(DelCartsReq req) {
1275 977 DelCartsResp resp = new DelCartsResp();
1276   - userRPC.delCartByIds(req.getUserId(), req.getCartIds());
  978 + userRPC.delCartByIds(req.getUserId(), req.getSkus());
1277 979  
1278 980 resp.setCartNum(getCartNum(req.getUserId()).getCartNum());
1279 981 return resp;
... ... @@ -1301,29 +1003,7 @@ public class CartServiceImpl implements CartService {
1301 1003 for (Product skuInfo : skuMap.values()) {
1302 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 1022 spotSaleInfo.getShopInfo().setName(shop.getShopName());
1343 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 1028 buildCreditState(spotSaleInfo,spotSaleInfo.getShopInfo().getId(), req.getUserId());
... ... @@ -1358,9 +1034,9 @@ public class CartServiceImpl implements CartService {
1358 1034 @Override
1359 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 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 18 @Deprecated
19 19 SearchShopResp searchKeyword(SearchShopReq req);
20 20  
21   - GetShopIntroductionResp getById(GetShopIntroductionReq req);
  21 + GetShopByIdResp getById(GetShopByIdReq req);
22 22  
23 23 GetShopDetailResp getDetailById(GetShopDetailReq req);
24 24  
... ... @@ -28,7 +28,6 @@ public interface ShopService {
28 28  
29 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 36 * @createTime 2015年6月9日 下午2:32:37
38 37 * @author zhangshirui
39 38 */
40   - GetShopIntroductionResp getShopIntroduction(GetShopIntroductionReq req);
41 39 /**
42 40 * 查询店铺资质信息
43 41 * @param req
... ... @@ -103,7 +101,10 @@ public interface ShopService {
103 101 * @param req
104 102 * @return
105 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 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 153 }
154 154  
155 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 161 return resp;
162 162 }
163 163  
... ... @@ -254,13 +254,7 @@ public class ShopServiceImpl implements ShopService {
254 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 259 @Deprecated
266 260 @Override
... ... @@ -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 331 @Override
352 332 public GetShopCreditResp getShopCredit(GetShopCreditReq req) {
... ... @@ -1206,4 +1186,9 @@ public class ShopServiceImpl implements ShopService {
1206 1186  
1207 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 140 List<Long> cartIds = new ArrayList<Long>();
141 141  
142 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 146 List<OrderInfo> orderList = orderRPC.submitOrderNew(input, userId);
... ... @@ -168,7 +168,7 @@ public class OrderServiceImpl implements OrderService {
168 168  
169 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 422 ConsigneeInfo consignee = new ConsigneeInfo();
423 423 consignee.setName(orderInfo.getOrderReceiverInfo().getReceiverName());
424 424 consignee.setMobile(orderInfo.getOrderReceiverInfo().getReceiverPhone());
425   - consignee.setIdCard(orderInfo.getOrderReceiverInfo().getReceiverIdcard());
426 425 consignee.setCityAddress("");
427 426 consignee.setStreetAddress(orderInfo.getOrderReceiverInfo().getReceiverAddress());
428 427 return consignee;
... ... @@ -864,7 +863,7 @@ public class OrderServiceImpl implements OrderService {
864 863 *提交订单
865 864 * */
866 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 867 SubmitOrderInput inputOrder = new SubmitOrderInput();
869 868 List<com.diligrp.orders.client.domain.input.OrderShopInfo> input = new ArrayList<com.diligrp.orders.client.domain.input.OrderShopInfo>();
870 869 String shipAddress = null;
... ... @@ -972,7 +971,6 @@ public class OrderServiceImpl implements OrderService {
972 971 inputOrder.setLogisticsRemarks(logisticsRemarks);
973 972 inputOrder.setOrderType(OrderType.COMMON);
974 973 inputOrder.setOrderShopInputList(input);
975   - inputOrder.setMarketId(marketDeliveryType==ConsigneeInfo.DELIVERYTYPE_NO?null:marketId);
976 974 inputOrder.setWarrantType(WarrantType.Not_Warran);
977 975 inputOrder.setMarketDelivery(MarketDelivery.get(marketDeliveryType));
978 976 return inputOrder;
... ... @@ -1073,7 +1071,6 @@ public class OrderServiceImpl implements OrderService {
1073 1071  
1074 1072 //提货人信息
1075 1073 receiverInput.setReceiverName(consInfo.getName());
1076   - receiverInput.setReceiverIdcard(consInfo.getIdCard());
1077 1074 receiverInput.setReceiverPhone(consInfo.getMobile());
1078 1075 if (!Validator.isEmpty(consInfo.getCityAddress())) {
1079 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 684  
685 685 if (!Validator.isNull(product.getMinPrice())) {
686 686 favProduct.setPrice((long)product.getMinPrice());
687   - favProduct.setMinPrice((long)product.getMinPrice());
688   - favProduct.setMaxPrice((long)product.getMaxPrice());
689 687 }
690 688 favProduct.setUnit(product.getSaleUnit());
691 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 690 shop = shopRPC.getShopById(product.getVendorId());
696 691 if (!Validator.isNull(shop)) {
697 692 shopInfo = new ShopIntroduction();
698 693 shopInfo.setName(shop.getShopName());
699 694 shopInfo.setId(shop.getId());
700   - favProduct.setShopInfo(shopInfo);
701 695 }
702 696  
703 697 resp.getGoods().add(favProduct);
... ... @@ -890,19 +884,19 @@ public class UserServiceImpl implements UserService {
890 884  
891 885 @Override
892 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 894 UserInfoResp userInfo = userRPC.getUserByLoginId(req.getAccountName());
901 895 if (Validator.isNull(userInfo)) {
902 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 901 Map<String,String> params = new HashMap<String, String>();
908 902 params.put("password", req.getPassword());
... ...
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/common/impl/VersionUpdateServiceImpl.java
1 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 3 import com.diligrp.mobsite.getway.domain.AppVersion;
12 4 import com.diligrp.mobsite.getway.domain.FeedBack;
13 5 import com.diligrp.mobsite.getway.domain.common.Constant;
... ... @@ -27,6 +19,12 @@ import com.diligrp.mobsite.getway.rpc.buyer.UserRPC;
27 19 import com.diligrp.mobsite.getway.service.common.VersionUpdateService;
28 20 import com.diligrp.website.util.dao.BaseQuery;
29 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 86 public FeedbackResp feedback(FeedbackReq req) {
89 87 FeedbackResp resp = new FeedbackResp();
90 88 FeedBack feedBack = new FeedBack();
91   - feedBack.setMarketId(req.getMarketId());
92 89 feedBack.setUserId(req.getUserId());
93 90 feedBack.setAppVersion(req.getAppVersion());
94 91 feedBack.setContent(req.getContent());
... ...
mobsite-getway-web/pom.xml
... ... @@ -37,6 +37,7 @@
37 37 <artifactId>tomcat7-maven-plugin</artifactId>
38 38 <version>2.2</version>
39 39 <configuration>
  40 + <port>8082</port>
40 41 <url>http://10.28.11.173:8081/manager</url>
41 42 <username>getway</username>
42 43 <password>123456</password>
... ... @@ -330,7 +331,12 @@
330 331 <project.fastdfs.connectTimeout>2000</project.fastdfs.connectTimeout>
331 332 <project.fastdfs.networkTimeout>30000</project.fastdfs.networkTimeout>
332 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 341 <project.store.url>http://up.1n4j.com</project.store.url>
336 342 <project.store.imageAccessKey>jNvRQi3lLAY7tFpJkWYeF5Fa99Cl6kZRcEiMaZGp</project.store.imageAccessKey>
... ... @@ -482,6 +488,11 @@
482 488 <project.fastdfs.networkTimeout>30000</project.fastdfs.networkTimeout>
483 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 497 <project.store.url>http://up.1n4j.com</project.store.url>
487 498 <project.store.imageAccessKey>d6a300418bd6fa2178b3bbb06a421f32</project.store.imageAccessKey>
... ... @@ -628,7 +639,12 @@
628 639 <!--cms-->
629 640 <project.cms.baseUrl>http://cms.1n4j.com</project.cms.baseUrl>
630 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 648 <!-- fastdfs -->
633 649 <project.fastdfs.trackers>192.168.28.38:22122,192.168.28.39:22122</project.fastdfs.trackers>
634 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   -}