package cn.superdesk.uniorder.dubbo.provider.fund;

import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.common.exception.UnifiedOrderRuntimeException;
import cn.superdesk.uniorder.dao.entity.fund.SysFundGrant;
import cn.superdesk.uniorder.dto.vo.fund.SysFundGrantVoEx;
import cn.superdesk.uniorder.service.fund.SysFundGrantService;
import cn.superdesk.uniorder.dubbo.facade.fund.DubboSysFundGrantService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.Map;

@Service(version = "1.0.0", retries = -1, timeout = 10000)
public class DubboSysFundGrantServiceImpl implements DubboSysFundGrantService {

	@Autowired
	private SysFundGrantService sysFundGrantService;

	@Override
	public void create(String token, SysFundGrant sysFundGrant) throws UnifiedOrderRuntimeException {
		sysFundGrantService.create(sysFundGrant, token);
	}

	@Override
	public R<List<SysFundGrantVoEx>> findAllViewPage(Map<String, Object> params, int pageNum, int pageSize) {
		return sysFundGrantService.findAllViewPage(params, pageNum, pageSize);
	}

	@Override
	public void importExcel(String token, Map<String, List<Map<String, Object>>> map) throws UnifiedOrderRuntimeException {
		sysFundGrantService.importExcel(map, token);
	}
}
