package cn.superdesk.uniorder.dubbo.provider.sys.logger;


import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.dao.entity.sys.logger.SysMonitorFunctionLog;
import cn.superdesk.uniorder.dto.param.system.logger.SysMonitorFunctionLogParam;
import cn.superdesk.uniorder.dubbo.facade.sys.logger.DubboSysMonitorFunctionLogService;
import cn.superdesk.uniorder.service.sys.logger.SysMonitorFunctionLogService;
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:    监控日志
 * @Author:         linjinyu
 * @Email  linjinyu@avic-s.com
 * @CreateDate:     2021-07-05 16:35:25
 * @UpdateUser:     linjinyu
 * @UpdateDate:     2021-07-05 16:35:25
 * @UpdateRemark:   修改内容
 * @Version:        1.0
 */
@Service(version = "1.0.0", retries = -1, timeout = 10000)
public class DubboSysMonitorFunctionLogServiceImpl implements DubboSysMonitorFunctionLogService {

	@Autowired
	private SysMonitorFunctionLogService sysMonitorFunctionLogService;


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

	@Override
	public void addObj(SysMonitorFunctionLogParam param) {

		SysMonitorFunctionLog sysMonitorFunctionLog = AnBeanUtils.copy(param, SysMonitorFunctionLog.class);
		sysMonitorFunctionLogService.insertSelective(sysMonitorFunctionLog);

	}

	@Override
	public void updateObj(SysMonitorFunctionLogParam param) {

		SysMonitorFunctionLog sysMonitorFunctionLog = AnBeanUtils.copy(param, SysMonitorFunctionLog.class);
		sysMonitorFunctionLogService.updateByPrimaryKeySelective(sysMonitorFunctionLog);
	}

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

	@Override
	public SysMonitorFunctionLog findById(Long id) {
		return sysMonitorFunctionLogService.findById(id);
	}

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

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

		return sysMonitorFunctionLogService.findAll(queryMap);
	}

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


	@Override
	public void addSysMonitorFunctionLog(SysMonitorFunctionLogParam param) {

		SysMonitorFunctionLog sysMonitorFunctionLog = AnBeanUtils.copy(param, SysMonitorFunctionLog.class);
		sysMonitorFunctionLogService.addSysMonitorFunctionLog(sysMonitorFunctionLog);
	}

	@Override
	public void updateSysMonitorFunctionLog(SysMonitorFunctionLogParam param) {

		SysMonitorFunctionLog sysMonitorFunctionLog = AnBeanUtils.copy(param, SysMonitorFunctionLog.class);
		sysMonitorFunctionLogService.updateSysMonitorFunctionLog(sysMonitorFunctionLog);
	}

	@Override
	public void deleteSysMonitorFunctionLog(Long id) {
		sysMonitorFunctionLogService.deleteSysMonitorFunctionLog(id);
	}

	@Override
	public SysMonitorFunctionLog findSysMonitorFunctionLogById(Long id) {
		return sysMonitorFunctionLogService.findSysMonitorFunctionLogById(id);
	}

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

	}
}
