|
@@ -16,10 +16,7 @@ import com.zswl.cloud.shop.client.vo.life.AccountDetailVo;
|
|
|
import com.zswl.cloud.shop.client.vo.life.SharePlatformVo;
|
|
|
import com.zswl.cloud.shop.client.vo.life.ShopInfoSimpleVo;
|
|
|
import com.zswl.cloud.springBatch.client.model.ypp.kfc.request.CreateOrdereRquest;
|
|
|
-import com.zswl.cloud.springBatch.client.model.ypp.kfc.response.CityListResponse;
|
|
|
-import com.zswl.cloud.springBatch.client.model.ypp.kfc.response.CreateOrdereResponse;
|
|
|
-import com.zswl.cloud.springBatch.client.model.ypp.kfc.response.ShopResponse;
|
|
|
-import com.zswl.cloud.springBatch.client.model.ypp.kfc.response.ShopsResponse;
|
|
|
+import com.zswl.cloud.springBatch.client.model.ypp.kfc.response.*;
|
|
|
import com.zswl.cloud.springBtach.server.core.api.ypp.KfcApi;
|
|
|
import com.zswl.cloud.springBtach.server.core.api.ypp.request.KfcGoodsDetailRequest;
|
|
|
import com.zswl.cloud.springBtach.server.core.api.ypp.request.KfcShopDetailRequest;
|
|
@@ -89,7 +86,7 @@ public class KfcServiceImpl {
|
|
|
}
|
|
|
AccountDetailVo accountDetailVo = shopSetting.getContent();
|
|
|
List<ShopInfoSimpleVo> shops = accountDetailVo.getShops();
|
|
|
- if (shops.isEmpty()){
|
|
|
+ if (shops.isEmpty()) {
|
|
|
return ResultContent.build(ResultState.Fail, "点餐店铺未创建");
|
|
|
}
|
|
|
// 分账信息
|
|
@@ -100,6 +97,7 @@ public class KfcServiceImpl {
|
|
|
|
|
|
kfcGoodsDetailRequest.setPhone(kfcGoodsDetailRequest.getPhone());
|
|
|
CreateOrdereResponse createOrdereResponse = kfcApi.create_order(kfcGoodsDetailRequest);
|
|
|
+ OrderDetailResponse orderDetailResponse = kfcApi.order_detail(createOrdereResponse.getData().getOrderId());
|
|
|
BigDecimal bigDecimal = BigDecimal.valueOf(createOrdereResponse.getData().getPayAmount());
|
|
|
|
|
|
KfcShopDetailRequest kfcShopDetailRequest = new KfcShopDetailRequest();
|
|
@@ -125,6 +123,7 @@ public class KfcServiceImpl {
|
|
|
goodsInfo.set("goodsName", kfcGoodsDetailRequest.getGoodsName());
|
|
|
goodsInfo.set("goodsPath", kfcGoodsDetailRequest.getImageCnUrl());
|
|
|
goodsInfo.set("channelOrderId", createOrdereResponse.getData().getOrderId());
|
|
|
+ goodsInfo.set("products", orderDetailResponse.getData().getProductsInfo());
|
|
|
|
|
|
|
|
|
CreateOrder2Model.Goods goods = new CreateOrder2Model.Goods();
|