|
@@ -1,10 +1,7 @@
|
|
|
package com.caimei365.commodity.service.impl;
|
|
|
|
|
|
import com.caimei365.commodity.components.PriceUtilService;
|
|
|
-import com.caimei365.commodity.mapper.PageMapper;
|
|
|
-import com.caimei365.commodity.mapper.PriceMapper;
|
|
|
-import com.caimei365.commodity.mapper.ProductTypeMapper;
|
|
|
-import com.caimei365.commodity.mapper.ShopMapper;
|
|
|
+import com.caimei365.commodity.mapper.*;
|
|
|
import com.caimei365.commodity.model.ResponseJson;
|
|
|
import com.caimei365.commodity.model.po.ProductDetailInfoPo;
|
|
|
import com.caimei365.commodity.model.po.ProductImagePo;
|
|
@@ -50,6 +47,8 @@ public class PageServiceImpl implements PageService {
|
|
|
private ProductTypeMapper productTypeMapper;
|
|
|
@Resource
|
|
|
private PageService pageService;
|
|
|
+ @Resource
|
|
|
+ private CouponMapper couponMapper;
|
|
|
|
|
|
/**
|
|
|
* 获取分类列表
|
|
@@ -206,6 +205,15 @@ public class PageServiceImpl implements PageService {
|
|
|
// 友情链接
|
|
|
List<BaseLinkVo> friendLinks = pageMapper.getFriendLinks();
|
|
|
map.put("friendLinks", friendLinks);
|
|
|
+ //是否显示领取优惠券入口
|
|
|
+ List<CouponVo> couponList = couponMapper.findCouponList(null);
|
|
|
+ if (couponList != null && couponList.size() > 0) {
|
|
|
+ //展示
|
|
|
+ map.put("couponEntry", 1);
|
|
|
+ } else {
|
|
|
+ //隐藏
|
|
|
+ map.put("couponEntry", 2);
|
|
|
+ }
|
|
|
return ResponseJson.success(map);
|
|
|
}
|
|
|
|