admin
2020-06-15 3e4ef41ffacd7f5fda2e81c3810cd11a6375b83c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.yeshi.fanli.service.impl.goods.vipshop;
 
import java.util.ArrayList;
import java.util.List;
 
import org.springframework.stereotype.Service;
 
import com.yeshi.fanli.dto.vip.VIPSearchResult;
import com.yeshi.fanli.dto.vip.goods.VIPGoodsInfo;
import com.yeshi.fanli.entity.bus.clazz.GoodsClass;
import com.yeshi.fanli.service.inter.goods.vipshop.VipShopGoodsService;
import com.yeshi.fanli.util.vipshop.VipShopApiUtil;
 
@Service
public class VipShopGoodsServiceImpl implements VipShopGoodsService {
 
    @Override
    public List<GoodsClass> getSpecialClass() {
        List<GoodsClass> list = new ArrayList<GoodsClass>();
        list.add(new GoodsClass(1L, "推荐"));
        // list.add(new GoodsClass(6L, "9.9"));
        // list.add(new GoodsClass(2L, "热销"));
        // list.add(new GoodsClass(3L, "热推"));
        // list.add(new GoodsClass(4L, "爆款"));
        return list;
    }
 
    @Override
    public List<VIPGoodsInfo> specialSearch(Integer page, Long cid) {
        VIPSearchResult result = VipShopApiUtil.getGoodsList(Integer.parseInt(cid + ""), page);
        if (result != null)
            return result.getGoodsList();
        return null;
    }
 
}