From 2f4d369d6c2fa36a42893461eb8d3943ac7e3f16 Mon Sep 17 00:00:00 2001 From: xyiege Date: Fri, 18 Nov 2022 03:10:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=AE=A2=E5=8D=95=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E8=BF=87=E7=A8=8B=E4=B8=AD=E7=9A=84=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/chjyj/szwh/controller/api/OrderController.java | 7 ++----- .../cn/chjyj/szwh/service/impl/OrderServiceImpl.java | 10 +++++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main/java/cn/chjyj/szwh/controller/api/OrderController.java b/src/main/java/cn/chjyj/szwh/controller/api/OrderController.java index 6015028..b08e9ff 100644 --- a/src/main/java/cn/chjyj/szwh/controller/api/OrderController.java +++ b/src/main/java/cn/chjyj/szwh/controller/api/OrderController.java @@ -4,10 +4,7 @@ import cn.chjyj.szwh.bean.*; import cn.chjyj.szwh.controller.BaseController; import cn.chjyj.szwh.exception.ChException; import cn.chjyj.szwh.service.*; -import cn.chjyj.szwh.utils.RedisUtil; -import cn.chjyj.szwh.utils.RedisUtils; -import cn.chjyj.szwh.utils.SzOrderUtils; -import cn.chjyj.szwh.utils.SzwhApiUtils; +import cn.chjyj.szwh.utils.*; import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONObject; import org.apache.commons.lang3.StringUtils; @@ -176,7 +173,7 @@ public class OrderController extends BaseController { long end =System.currentTimeMillis(); long howuse = (end-start)/1000l; jsonObject.put("code",200); - jsonObject.put("data",retmap.get("rdata")); + jsonObject.put("data",retmap.get("data")); jsonObject.put("msg",retmap.get("msg")); jsonObject.put("useTime",howuse); return jsonObject; diff --git a/src/main/java/cn/chjyj/szwh/service/impl/OrderServiceImpl.java b/src/main/java/cn/chjyj/szwh/service/impl/OrderServiceImpl.java index 37140b0..c9cd212 100644 --- a/src/main/java/cn/chjyj/szwh/service/impl/OrderServiceImpl.java +++ b/src/main/java/cn/chjyj/szwh/service/impl/OrderServiceImpl.java @@ -745,10 +745,12 @@ public class OrderServiceImpl implements OrderService { } } bretMap.put("batchcode", batchCode); + return bretMap; }else{ bretMap.put("error","订单创建失败"); + return bretMap; } - return bretMap; + } /** @@ -849,6 +851,8 @@ public class OrderServiceImpl implements OrderService { if(ogd.getGoodsEntrust()==1 || (ogd.getChargesType()==1 && ogd.getGoodsEntrust()==2)){ odgmap.put("transaction_count","-"); } + //购买年限 + odgmap.put("transaction_count",ogd.getTransactionCount()); //付费与否? odgmap.put("charges_type",ogd.getChargesType()); // @@ -950,10 +954,10 @@ public class OrderServiceImpl implements OrderService { String errmsg = (String) bmap.get("error"); if (StringUtils.isNotEmpty(errmsg)) { retmap.put("msg", errmsg); - retmap.put("rdata", ""); + retmap.put("data", ""); } else { retmap.put("msg", "成功"); - retmap.put("rdata", getOrderMapByBatch(batchcode, userIsli)); + retmap.put("data", getOrderMapByBatch(batchcode, userIsli)); } return retmap; }