|
|
@@ -3,6 +3,7 @@ package com.ruoyi.api.fake;
|
|
|
import cn.hutool.json.JSONArray;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
import com.ruoyi.api.pojo.bo.ProductsBO;
|
|
|
+import com.ruoyi.api.pojo.bo.ProductsSkusBO;
|
|
|
import com.ruoyi.common.utils.uuid.IdUtils;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
@@ -16,7 +17,7 @@ public class PushProductFake {
|
|
|
* 推送商品Fake数据
|
|
|
* @return
|
|
|
*/
|
|
|
- public static ProductsBO productsBO() {
|
|
|
+ public static ProductsBO pushProduct() {
|
|
|
ProductsBO productsBO = new ProductsBO();
|
|
|
productsBO.setTitle("测试商品" + IdUtils.fastUUID().toString());
|
|
|
productsBO.setDetailImages("<figure class=\"image\"><img src=\"https://img.yunzhonghe.com/image/1570588776975JFmOBwQXph.jpg\"></figure>");
|
|
|
@@ -86,7 +87,7 @@ public class PushProductFake {
|
|
|
* @return
|
|
|
*/
|
|
|
public static ProductsBO updateCloudProduct() {
|
|
|
- ProductsBO productsBO = PushProductFake.productsBO();
|
|
|
+ ProductsBO productsBO = PushProductFake.pushProduct();
|
|
|
productsBO.setId(397L);
|
|
|
productsBO.setCode("t0001");
|
|
|
// 属性
|
|
|
@@ -103,4 +104,26 @@ public class PushProductFake {
|
|
|
productsBO.setAttrs(attrList);
|
|
|
return productsBO;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 更新sku到中台Fake数据
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static ProductsSkusBO updateCloudSku() {
|
|
|
+ ProductsSkusBO productsSkusBO = new ProductsSkusBO();
|
|
|
+ // id,title,stock,price,guide_price,origin_price,cost_price,activity_price,image_url,sn,code,describe
|
|
|
+ productsSkusBO.setId(397L);
|
|
|
+ productsSkusBO.setTitle("新款+微微辣");
|
|
|
+ productsSkusBO.setStock(199L);
|
|
|
+ productsSkusBO.setPrice(2L);
|
|
|
+ productsSkusBO.setGuidePrice(4L);
|
|
|
+ productsSkusBO.setOriginPrice(4L);
|
|
|
+ productsSkusBO.setCostPrice(2L);
|
|
|
+ productsSkusBO.setActivityPrice(1L);
|
|
|
+ productsSkusBO.setImageUrl("https://testzt.yd1518.com/uploads/file/880b9460958a6b0f08564b7d97205d3a_20230524103209.webp");
|
|
|
+ productsSkusBO.setSn("0002");
|
|
|
+ productsSkusBO.setCode("c001");
|
|
|
+ productsSkusBO.setDescribe("sku描述");
|
|
|
+ return productsSkusBO;
|
|
|
+ }
|
|
|
}
|