package cn.superdesk.uniorder.dubbo.consumer.accounting.qchjc;

import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.dto.param.accounting.qchjc.QchjcCustomerAccountingListRequest;
import cn.superdesk.uniorder.dto.vo._function.select.SelectOptionVirt;
import cn.superdesk.uniorder.dto.vo.thirdpart.qchjc.accounting.QchjcCustomerStatementVo;
import cn.superdesk.uniorder.dubbo.facade.thirdpart.qchjc.accounting.DubboQchjcCustomerStatementService;
import com.alibaba.dubbo.config.annotation.Reference;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author xc
 * @description
 * @date 2022/4/14 20:07
 */
@Slf4j
@Component
public class QchjcCustomerAccountingDubboService {
    @Reference(version = "1.0.0", timeout = 30000, retries = -1)
    private DubboQchjcCustomerStatementService dubboQchjcCustomerStatementService;

    public R<List<QchjcCustomerStatementVo>> list(QchjcCustomerAccountingListRequest request) {
        return dubboQchjcCustomerStatementService.queryQchjcCustomerStatementList(request);
    }

    public R<String> remark(Long id, String remark, String token) {
        return dubboQchjcCustomerStatementService.updateRemark(id, remark, token);
    }

    public R<QchjcCustomerStatementVo> get(Long id) {
        return dubboQchjcCustomerStatementService.queryQchjcCustomerStatementVoById(id);
    }

    public R<List<SelectOptionVirt>> getCustomerList() {
        return dubboQchjcCustomerStatementService.queryCustomerList();
    }
}
