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


import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.dao.entity.operation.ExcelImportLog;
import cn.superdesk.uniorder.dto.param.operation.ExcelImportLogParam;
import cn.superdesk.uniorder.dto.param.operation.ExcelImportLogQueryCriteria;
import cn.superdesk.uniorder.dubbo.facade.operation.DubboExcelImportLogService;
import cn.superdesk.uniorder.service.operation.ExcelImportLogService;
import cn.superdesk.uniorder.common.numerical.AnBeanUtils;
import com.alibaba.dubbo.config.annotation.Service;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;

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

/**
 * @Description: Excel导入日志
 * @Author: linjinyu
 * @Email linjinyu@avic-s.com
 * @CreateDate: 2021-08-23 10:38:52
 * @UpdateUser: linjinyu
 * @UpdateDate: 2021-08-23 10:38:52
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Service(version = "1.0.0", retries = -1, timeout = 10000)
public class DubboExcelImportLogServiceImpl implements DubboExcelImportLogService {

	@Autowired
	private ExcelImportLogService excelImportLogService;


	/****************************************** extends BaseService 部分 start ******************************************/

	@Override
	public void addObj(ExcelImportLogParam param) {

		ExcelImportLog excelImportLog = AnBeanUtils.copy(param, ExcelImportLog.class);
		excelImportLogService.insertSelective(excelImportLog);

	}

	@Override
	public void updateObj(ExcelImportLogParam param) {

		ExcelImportLog excelImportLog = AnBeanUtils.copy(param, ExcelImportLog.class);
		excelImportLogService.updateByPrimaryKeySelective(excelImportLog);
	}

	@Override
	public void deleteObj(Long id) {
		excelImportLogService.deleteObj(id);
	}

	@Override
	public ExcelImportLog findById(Long id) {
		return excelImportLogService.findById(id);
	}

	@Override
	public PageInfo<ExcelImportLog> findByPaging(Map<String, Object> conditions, Integer pageNun, Integer pageSize) {
		return excelImportLogService.findByPaging(conditions, pageNun, pageSize);
	}

	@Override
	public List<ExcelImportLog> findAll(Map<String, Object> queryMap) {

		return excelImportLogService.findAll(queryMap);
	}

	/****************************************** extends BaseService 部分   end ******************************************/


	@Override
	public void addExcelImportLog(ExcelImportLogParam param) {

		ExcelImportLog excelImportLog = AnBeanUtils.copy(param, ExcelImportLog.class);
		excelImportLogService.addExcelImportLog(excelImportLog);
	}

	@Override
	public void updateExcelImportLog(ExcelImportLogParam param) {

		ExcelImportLog excelImportLog = AnBeanUtils.copy(param, ExcelImportLog.class);
		excelImportLogService.updateExcelImportLog(excelImportLog);
	}

	@Override
	public void deleteExcelImportLog(Long id) {
		excelImportLogService.deleteExcelImportLog(id);
	}

	@Override
	public ExcelImportLog findExcelImportLogById(Long id) {
		return excelImportLogService.findExcelImportLogById(id);
	}

	@Override
	public R<List<ExcelImportLog>> pageQuery(Map<String, Object> conditions, int pageNun, int pageSize) {
		return excelImportLogService.pageQuery(conditions, pageNun, pageSize);
	}

	@Override
	public R<List<ExcelImportLog>> pageQueryGenericParam(ExcelImportLogQueryCriteria criteria) {
		return excelImportLogService.pageQueryGenericParam(criteria);
	}
}
