
package com.tmerclub.cloud.order.feign;

import com.tmerclub.cloud.api.order.feign.OrderAddrFeignClient;
import com.tmerclub.cloud.common.order.vo.OrderAddrVO;
import com.tmerclub.cloud.common.response.ServerResponseEntity;
import com.tmerclub.cloud.order.service.OrderAddrService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Author lth
 * @Date 2021/11/22 9:21
 */
@DubboService
public class OrderAddrFeignController implements OrderAddrFeignClient {

    @Autowired
    private OrderAddrService orderAddrService;

    @Override
    public ServerResponseEntity<OrderAddrVO> getOrderAddrByOrderId(Long orderId) {
        OrderAddrVO orderAddrVO = orderAddrService.getByOrderId(orderId);
        return ServerResponseEntity.success(orderAddrVO);
    }
}
