Commit 7fe1d191baf341d0785b660eb382defd35191b37

Authored by alexyang
1 parent 5d20766a

fix

Signed-off-by: alexyang <akhuting@hotmail.com>
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/Attribute.java
... ... @@ -18,12 +18,12 @@ public class Attribute {
18 18 * 商品属性Id
19 19 */
20 20 @ApiModelProperty(value = "商品属性id")
21   - private Long id;
  21 + private Long attId;
22 22 /**
23 23 * 商品属性名称
24 24 */
25 25 @ApiModelProperty(value = "商品属性名称")
26   - private String name;
  26 + private String attName;
27 27  
28 28 /**
29 29 * 属性取值
... ... @@ -40,38 +40,20 @@ public class Attribute {
40 40 * @createTime Aug 14, 2014 7:48:02 PM
41 41 * @author wujianjun
42 42 */
43   - public Long getId() {
44   - return id;
  43 + public Long getAttId() {
  44 + return attId;
45 45 }
46 46  
47   - /**
48   - * set value of Attribute.id
49   - * @param id the id to set
50   - * @createTime Aug 14, 2014 7:48:02 PM
51   - * @author wujianjun
52   - */
53   - public void setId(Long id) {
54   - this.id = id;
  47 + public void setAttId(Long attId) {
  48 + this.attId = attId;
55 49 }
56 50  
57   - /**
58   - * get value of Attribute.name
59   - * @return the name
60   - * @createTime Aug 14, 2014 7:48:02 PM
61   - * @author wujianjun
62   - */
63   - public String getName() {
64   - return name;
  51 + public String getAttName() {
  52 + return attName;
65 53 }
66 54  
67   - /**
68   - * set value of Attribute.name
69   - * @param name the name to set
70   - * @createTime Aug 14, 2014 7:48:02 PM
71   - * @author wujianjun
72   - */
73   - public void setName(String name) {
74   - this.name = name;
  55 + public void setAttName(String attName) {
  56 + this.attName = attName;
75 57 }
76 58  
77 59 /**
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/AttributeValue.java
... ... @@ -27,12 +27,12 @@ public class AttributeValue {
27 27 * 属性值ID
28 28 */
29 29 @ApiModelProperty(value = "属性值id")
30   - private Long id;
  30 + private Long attValueId;
31 31 /**
32 32 * 属性值名称
33 33 */
34 34 @ApiModelProperty(value = "属性值名称")
35   - private String name;
  35 + private String attValueName;
36 36  
37 37 /**
38 38 * sku是否失效
... ... @@ -40,47 +40,22 @@ public class AttributeValue {
40 40 */
41 41 private Integer validType = VALID_TYPE_NO;
42 42  
43   - /**
44   - * get value of AttributeValue.id
45   - * @return the id
46   - * @createTime Aug 14, 2014 7:49:03 PM
47   - * @author wujianjun
48   - */
49   - public Long getId() {
50   - return id;
  43 + public Long getAttValueId() {
  44 + return attValueId;
51 45 }
52 46  
53   - /**
54   - * set value of AttributeValue.id
55   - * @param id the id to set
56   - * @createTime Aug 14, 2014 7:49:03 PM
57   - * @author wujianjun
58   - */
59   - public void setId(Long id) {
60   - this.id = id;
  47 + public void setAttValueId(Long attValueId) {
  48 + this.attValueId = attValueId;
61 49 }
62 50  
63   - /**
64   - * get value of AttributeValue.name
65   - * @return the name
66   - * @createTime Aug 14, 2014 7:49:03 PM
67   - * @author wujianjun
68   - */
69   - public String getName() {
70   - return name;
  51 + public String getAttValueName() {
  52 + return attValueName;
71 53 }
72 54  
73   - /**
74   - * set value of AttributeValue.name
75   - * @param name the name to set
76   - * @createTime Aug 14, 2014 7:49:03 PM
77   - * @author wujianjun
78   - */
79   - public void setName(String name) {
80   - this.name = name;
  55 + public void setAttValueName(String attValueName) {
  56 + this.attValueName = attValueName;
81 57 }
82 58  
83   -
84 59 /**
85 60 * get value of AttributeValue.validType
86 61 * @return the validType
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/SKUInfo.java
... ... @@ -67,4 +67,12 @@ public class SKUInfo {
67 67 public void setStatus(Integer status) {
68 68 this.status = status;
69 69 }
  70 +
  71 + public String getSku() {
  72 + return sku;
  73 + }
  74 +
  75 + public void setSku(String sku) {
  76 + this.sku = sku;
  77 + }
70 78 }
... ...
mobsite-getway-domain/src/main/java/com/diligrp/mobsite/getway/domain/protocol/product/AddGoodsReq.java
... ... @@ -11,17 +11,16 @@ public class AddGoodsReq extends BaseReq {
11 11  
12 12  
13 13 @ApiModelProperty(value = "店铺id")
14   - private Long ShopId;
  14 + private Long shopId;
15 15  
16 16 private GoodsSuper goods;
17 17  
18   -
19 18 public Long getShopId() {
20   - return ShopId;
  19 + return shopId;
21 20 }
22 21  
23 22 public void setShopId(Long shopId) {
24   - ShopId = shopId;
  23 + this.shopId = shopId;
25 24 }
26 25  
27 26 public GoodsSuper getGoods() {
... ...
mobsite-getway-service/src/main/java/com/diligrp/mobsite/getway/service/seller/impl/SellerGoodsServiceImpl.java
... ... @@ -217,8 +217,7 @@ public class SellerGoodsServiceImpl implements SellerGoodsService {
217 217 skus = new ArrayList<>();
218 218 for (SKUInfo info : skusInfo) {
219 219 Sku sku = new Sku();
220   -
221   -
  220 + sku.setSku(info.getSku());
222 221 skus.add(sku);
223 222 }
224 223 }
... ... @@ -256,7 +255,19 @@ public class SellerGoodsServiceImpl implements SellerGoodsService {
256 255  
257 256 @Override
258 257 public ListCategoryResp listCategory(ListCategoryReq req) {
259   - return null;
  258 + List<Category> categories = goodsRPC.listCategory(req.getParentId(), req.getShopId());
  259 + ListCategoryResp resp = new ListCategoryResp();
  260 + List<com.diligrp.mobsite.getway.domain.protocol.Category> list = new ArrayList<>();
  261 + for (Category category : categories) {
  262 + com.diligrp.mobsite.getway.domain.protocol.Category c = new com.diligrp.mobsite.getway.domain.protocol.Category();
  263 + c.setName(category.getCname());
  264 + c.setImgUrl(category.getIcon());
  265 + c.setParentId((long) category.getPcid());
  266 + list.add(c);
  267 + }
  268 + resp.setCategories(list);
  269 +
  270 + return resp;
260 271 }
261 272  
262 273 @Override
... ...