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

import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.dao.entity.unified.UnifiedWarning;
import cn.superdesk.uniorder.dto.vo.unified.UnifiedWarningVo;
import cn.superdesk.uniorder.dto.vo.unified.WarningOrderInvoiceVo;
import cn.superdesk.uniorder.dubbo.facade.unified.DubboUnifiedWarningService;
import cn.superdesk.uniorder.service.unified.UnifiedWarningService;
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 DubboUnifiedWarningServiceImpl implements DubboUnifiedWarningService {

	@Autowired
	private UnifiedWarningService warningService;

	@Override
	public R<List<UnifiedWarningVo>> getDataByPage(Map<String, Object> params, int pageNum, int pageSize) {

		return warningService.getDataByPage(params, pageNum, pageSize);
	}

	@Override
	public void addObj(UnifiedWarning uw) {

		warningService.insertSelective(uw);
	}

	@Override
	public List<WarningOrderInvoiceVo> getWarningOrderInv(Map<String, Object> queryMap) {

		return warningService.getWarningOrderInv(queryMap);
	}
}
