From d1e8d1027a6f49baefaf544fd7c971e984248d33 Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期六, 08 五月 2021 14:05:35 +0800
Subject: [PATCH] 小程序商品订单bug修复

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopOrderServiceImpl.java |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopOrderServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopOrderServiceImpl.java
index 735e451..5a17a5c 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopOrderServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopOrderServiceImpl.java
@@ -389,6 +389,16 @@
                 orderGoodsVO.setNum(orderGoods.getAmount());
                 orderGoodsVO.setGoodsPic(orderGoods.getGoodsAttrPic());
                 orderGoodsVO.setPrice(orderGoods.getGoodsAttrPrice());
+                //查询商品信息判断商品状态
+                ComShopGoodsDO goodsDO = comShopGoodsDAO.selectById(orderGoods.getGoodsId());
+                if(goodsDO == null || goodsDO.getDeleteStatus().equals(ComShopGoodsDO.deleteStatus.yes) || goodsDO.getDeleteStatus().equals(ComShopGoodsDO.status.recovery)){
+                    orderGoodsVO.setGoodsStatus(ComShopOrderGoodsVO.goodsStatus.ysc);
+                }else if(goodsDO.getStatus().equals(ComShopGoodsDO.status.lower)){
+                    orderGoodsVO.setGoodsStatus(ComShopOrderGoodsVO.goodsStatus.yxj);
+                }else if(goodsDO.getStatus().equals(ComShopGoodsDO.status.sell)){
+                    orderGoodsVO.setGoodsStatus(ComShopOrderGoodsVO.goodsStatus.csz);
+                }
+
                 //根据商品规格id查询商品规格
                 ComShopGoodsAttrDO goodsAttrDO = comShopGoodsAttrDAO.selectById(orderGoods.getGoodsAttrId());
                 if(goodsAttrDO != null){

--
Gitblit v1.7.1