Browse Source

return code in /product/<pid>/relatedPkg, move shopQR into Goods

xuchaolang 6 years ago
parent
commit
5b06485ee2

+ 2 - 0
rankin-api-web/src/main/java/cn/rankin/apiweb/controller/ProductController.java

@@ -59,12 +59,14 @@ public class ProductController {
                tmp.put("id", content.getPid());
                tmp.put("name", content.getName());
                tmp.put("type", content.getType());
+               tmp.put("code", content.getCode());
                lightProducts.add(tmp);
             }
 
             Map<String, Object> rec = new HashMap<String, Object>();
             rec.put("id", pkg.getPid());
             rec.put("name", pkg.getName());
+            rec.put("code", pkg.getCode());
             rec.put("goods", pkg.getGoods());
             rec.put("recs", lightProducts);
 

+ 2 - 0
rankin-data-api/src/main/java/cn/rankin/data/api/app/vo/ItemGoodsVo.java

@@ -17,4 +17,6 @@ public class ItemGoodsVo implements Serializable {
     private BigDecimal terminalPrice;
 
     private Boolean isInCart;
+
+    private String shopQR;
 }

+ 4 - 0
rankin-data-api/src/main/java/cn/rankin/data/api/product/entity/Goods.java

@@ -82,6 +82,10 @@ public class Goods implements Serializable {
     @Temporal(TemporalType.TIMESTAMP)
     private Date gmtModified;
 
+    @Column(name = "shop_qr")
+    //shop qr code
+    private String shopQR;
+
     @Transient
     private Boolean isInCart;
 }

+ 0 - 4
rankin-data-api/src/main/java/cn/rankin/data/api/product/entity/Support.java

@@ -67,10 +67,6 @@ public class Support implements Serializable {
     @Temporal(TemporalType.TIMESTAMP)
     private Date gmtModified;
 
-    //QR code
-    @Column(name = "shop_qr")
-    private String shopQR;
-
     @Transient
     private List<Support> supportList;
 }

+ 1 - 0
rankin-product-service/src/main/java/cn/rankin/productservice/service/app/ItemService.java

@@ -401,6 +401,7 @@ public class ItemService {
         itemGoodsVo.setId(goods.getId());
         itemGoodsVo.setChargeUnit(goods.getChargeUnit());
         itemGoodsVo.setTerminalPrice(goods.getTerminalPrice());
+        itemGoodsVo.setShopQR(goods.getShopQR());
         return itemGoodsVo;
     }
 }