
package com.tmerclub.cloud.supplier.feign;

import com.tmerclub.cloud.api.payment.vo.SplitRuleVO;
import com.tmerclub.cloud.api.supplier.feign.SupplierWalletFeignClient;
import com.tmerclub.cloud.common.response.ServerResponseEntity;
import com.tmerclub.cloud.supplier.service.SupplierWalletService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author tmerclub
 * @date 2020/11/23
 */
@DubboService
public class SupplierWalletFeignController implements SupplierWalletFeignClient {

    @Autowired
    private SupplierWalletService supplierWalletService;


    @Override
    public ServerResponseEntity<SplitRuleVO> calculationSupplierIncome(Long orderId) {
        SplitRuleVO splitRuleVO = supplierWalletService.getSupplierSettledInfoByOrderId(orderId);
        return ServerResponseEntity.success(splitRuleVO);
    }
}
