
package com.tmerclub.cloud.product.feign;

import com.tmerclub.cloud.api.product.feign.SpuCommFeignClient;
import com.tmerclub.cloud.common.response.ServerResponseEntity;
import com.tmerclub.cloud.product.service.SpuCommService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @author tmerclub
 * @date 2020/11/27
 */
@DubboService
public class SpuCommFeignController implements SpuCommFeignClient {

    @Autowired
    private SpuCommService spuCommService;

    @Override
    public ServerResponseEntity<List<Long>> getCommNumRankSpuIdsByShopIdAndTime(String key, Long shopId, Integer time, Integer expireTime, Integer esRenovationSpuSort, Long primaryCategoryId) {
        List<Long> spuIds = spuCommService.getCommNumRankShopIdAndTime(key, shopId, time, expireTime, esRenovationSpuSort, primaryCategoryId);
        return ServerResponseEntity.success(spuIds);
    }

}
