From 95f9ea7eb339c36cade6c67d0385c49ec2d81477 Mon Sep 17 00:00:00 2001
From: 935090232@qq.com <ak473600000>
Date: Wed, 14 Apr 2021 19:39:45 +0800
Subject: [PATCH] Merge branch 'score_shop' into api_score_meger

---
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopProduct.java |   21 ++++++++-------------
 1 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopProduct.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopProduct.java
index 6023fa5..ac983d3 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopProduct.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopProduct.java
@@ -1,18 +1,15 @@
 package com.matrix.system.shopXcx.api.action;
 
-import com.matrix.core.pojo.AjaxResult;
-import com.matrix.core.pojo.PaginationVO;
-import com.matrix.core.tools.StringUtils;
-import com.matrix.biz.bean.BizUser;
-import com.matrix.system.common.bean.CustomerDataDictionary;
-import com.matrix.system.common.dao.CustomerDataDictionaryDao;
+import com.matrix.system.hive.bean.SysVipInfo;
 import com.matrix.component.redis.RedisUserLoginUtils;
+import com.matrix.core.pojo.AjaxResult;
+import com.matrix.core.tools.StringUtils;
 import com.matrix.system.common.constance.AppConstance;
-
+import com.matrix.system.common.dao.CustomerDataDictionaryDao;
 import com.matrix.system.common.interceptor.HostInterceptor;
+import com.matrix.system.shopXcx.api.service.WxShopCouponService;
 import com.matrix.system.shopXcx.bean.*;
 import com.matrix.system.shopXcx.dao.*;
-import com.matrix.system.shopXcx.api.service.WxShopCouponService;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -93,7 +90,6 @@
         List<ShopProductAttrRef> shopProductAttrRefs = shopProductAttrRefDao.selectByPid(id);
         List<ShopProductImg> shopProductImgs = shopProductImgDao.selectByPid(id);
         List<ShopSku> shopSkus = shopSkuDao.selectByPid(id);
-//        List<ShopSku> shopSkus = shopSkuDao.selectByPidAndShopid(id, shopId);
         List<ShopProductParamRef> shopProductParamRefs = shopProductParamRefDao.selectByPid(id);
         shopProduct.setAttrRefs(shopProductAttrRefs);
         shopProduct.setProductImgs(shopProductImgs);
@@ -115,7 +111,7 @@
             //查询产品适配的优惠券
             result.putInMap("couponList", shopCouponService.getCouponListByProductId(id));
             //查询产品是否被用户收藏
-            result.putInMap("checkCollect", CollectionUtils.isNotEmpty(collectionDao.selectByUserIdAndProid(id, redisUserLoginUtils.getLoginUser(BizUser.class).getOpenId())));
+            result.putInMap("checkCollect", CollectionUtils.isNotEmpty(collectionDao.selectByUserIdAndProid(id, redisUserLoginUtils.getLoginUser(SysVipInfo.class).getOpenId())));
         } else {
             result.putInMap("checkCollect", false);
         }
@@ -150,7 +146,6 @@
     @ResponseBody
     public AjaxResult getShopProductShowList(@RequestBody ShopProduct shopProduct) {
         List<ShopProduct> shopProducts = null;
-
         //查询是否匹配优惠条件
         ShopCoupon shopCoupon = shopCouponDao.getCouponByTitle(shopProduct.getTitle(),HostInterceptor.getCompanyId());
         if (shopCoupon != null && shopProduct.getOffset() < 1) {
@@ -214,13 +209,13 @@
      * @param shopProduct
      */
     private void saveSearchHistroy(@RequestBody ShopProduct shopProduct) {
-        BizUser bigUser = redisUserLoginUtils.getLoginUser(BizUser.class);
+        SysVipInfo bigUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         ShopSearchRecord searchBean = new ShopSearchRecord();
         if (StringUtils.isNotBlank(shopProduct.getTitle())) {
             searchBean.setSearchType(AppConstance.SEARCH_TYPE);
             searchBean.setSearchContent(shopProduct.getTitle());
         }
-        searchBean.setUserId(bigUser.getOpenId());
+        searchBean.setUserId(bigUser.getId());
         searchBean.setSearchPriceStart(shopProduct.getStartPrice());
         searchBean.setSearchPriceEnd(shopProduct.getEndPrice());
         searchBean.setSearchDel(AppConstance.DATA_USEABLE);

--
Gitblit v1.9.1