Browse Source

查看商品详情时,直接添加选品库

zhangwl 3 weeks ago
parent
commit
a551fbcee7

+ 8 - 0
src/main/java/zs/payment/controller/YxSupplyChannelManualController.java

@@ -143,8 +143,16 @@ public class YxSupplyChannelManualController {
 
 
         JSONObject respJson = JSONObject.parseObject(resp);
         JSONObject respJson = JSONObject.parseObject(resp);
         if (respJson.getIntValue("code") != 0) {
         if (respJson.getIntValue("code") != 0) {
+            log.info("查看商品详情失败,{}",req.getIds());
             return Result.fail(respJson.getString("msg"));
             return Result.fail(respJson.getString("msg"));
         }
         }
+        //添加到我的选品库
+        resp = HttpUtil.restTemplatePost(prefixUrl + "/supplyapi/app/product/storage/addStorage", params, headers);
+        JSONObject respJson2 = JSONObject.parseObject(resp);
+        if (respJson2.getIntValue("code") != 0) {
+            log.info("添加选品库失败,{}",req.getIds());
+            return Result.fail(respJson2.getString("msg"));
+        }
 
 
         return Result.success(respJson.getJSONObject("data"));
         return Result.success(respJson.getJSONObject("data"));
     }
     }