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.SysFundUser;
import cn.superdesk.uniorder.dto.vo.fund.SysFundUserVoEx;
import cn.superdesk.uniorder.service.fund.SysFundUserService;
import cn.superdesk.uniorder.dubbo.facade.fund.DubboSysFundUserService;
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 DubboSysFundUserServiceImpl implements DubboSysFundUserService {

	@Autowired
	private SysFundUserService sysFundUserService;

	@Override
	public void create(String token, SysFundUser sysFundUser) throws UnifiedOrderRuntimeException {
		sysFundUserService.create(sysFundUser, token);
	}

	@Override
	public void update(String token, SysFundUser sysFundUser) {
		sysFundUserService.update(sysFundUser, token);
	}

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

	public SysFundUserVoEx selectById(Map<String, Object> params) throws UnifiedOrderRuntimeException {
		return sysFundUserService.selectById(params);
	}
}
