
package com.tmerclub.cloud.combo.feign;

import com.tmerclub.cloud.api.combo.feign.ComboSpuFeignClient;
import com.tmerclub.cloud.combo.service.ComboSpuService;
import com.tmerclub.cloud.common.product.vo.ComboSpuVO;
import com.tmerclub.cloud.common.response.ServerResponseEntity;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @author xxw
 * @date 2022/9/28 9:49
 */
@DubboService
public class ComboSpuFeignController implements ComboSpuFeignClient {
    @Autowired
    private ComboSpuService comboSpuService;

    @Override
    public ServerResponseEntity<List<ComboSpuVO>> comboSpuByComboId(Long comboId) {
        List<ComboSpuVO> matchSpuByComboId = comboSpuService.comboSpuByComboId(comboId);
        return ServerResponseEntity.success(matchSpuByComboId);
    }
}
