| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.biz.bean.BizUser; |
| | | 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; |
| | |
| | | //查询产品适配的优惠券 |
| | | 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); |
| | | } |
| | |
| | | @ResponseBody |
| | | public AjaxResult getShopProductShowList(@RequestBody ShopProduct shopProduct) { |
| | | List<ShopProduct> shopProducts = null; |
| | | shopProduct.setMallType(ShopProduct.MALL_MICRO); |
| | | //查询是否匹配优惠条件 |
| | | ShopCoupon shopCoupon = shopCouponDao.getCouponByTitle(shopProduct.getTitle(),HostInterceptor.getCompanyId()); |
| | | if (shopCoupon != null && shopProduct.getOffset() < 1) { |
| | |
| | | * @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); |