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

import cn.superdesk.uniorder.common.numerical.AnBeanUtils;
import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.dao.entity.sys.role.SysRoleExtDataSamplePermission;
import cn.superdesk.uniorder.dto.dubbo.sys.role.SysRoleExtDataSamplePermissionParam;
import cn.superdesk.uniorder.dubbo.facade.sys.role.DubboSysRoleExtDataSamplePermissionService;
import cn.superdesk.uniorder.service.sys.role.SysRoleExtDataSamplePermissionService;
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: 2020-08-26 14:15:28
 * @UpdateUser: linjinyu
 * @UpdateDate: 2020-08-26 14:15:28
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Service(version = "1.0.0", retries = -1, timeout = 10000)
public class DubboSysRoleExtDataSamplePermissionServiceImpl implements DubboSysRoleExtDataSamplePermissionService {

	@Autowired
	private SysRoleExtDataSamplePermissionService sysRoleExtDataSamplePermissionService;


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

	@Override
	public void addObj(SysRoleExtDataSamplePermissionParam param) {

		SysRoleExtDataSamplePermission sysRoleExtDataSamplePermission = AnBeanUtils.copy(param, SysRoleExtDataSamplePermission.class);
		sysRoleExtDataSamplePermissionService.insertSelective(sysRoleExtDataSamplePermission);

	}

	@Override
	public void updateObj(SysRoleExtDataSamplePermissionParam param) {

		SysRoleExtDataSamplePermission sysRoleExtDataSamplePermission = AnBeanUtils.copy(param, SysRoleExtDataSamplePermission.class);
		sysRoleExtDataSamplePermissionService.updateByPrimaryKeySelective(sysRoleExtDataSamplePermission);
	}

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

	@Override
	public SysRoleExtDataSamplePermission findById(Long id) {
		return sysRoleExtDataSamplePermissionService.findById(id);
	}

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

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

		return sysRoleExtDataSamplePermissionService.findAll(queryMap);
	}

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


	@Override
	public void addSysRoleExtDataSamplePermission(SysRoleExtDataSamplePermissionParam param) {

		SysRoleExtDataSamplePermission sysRoleExtDataSamplePermission = AnBeanUtils.copy(param, SysRoleExtDataSamplePermission.class);
		sysRoleExtDataSamplePermissionService.addSysRoleExtDataSamplePermission(sysRoleExtDataSamplePermission);
	}

	@Override
	public void updateSysRoleExtDataSamplePermission(SysRoleExtDataSamplePermissionParam param) {

		SysRoleExtDataSamplePermission sysRoleExtDataSamplePermission = AnBeanUtils.copy(param, SysRoleExtDataSamplePermission.class);
		sysRoleExtDataSamplePermissionService.updateSysRoleExtDataSamplePermission(sysRoleExtDataSamplePermission);
	}

	@Override
	public void deleteSysRoleExtDataSamplePermission(Long id) {
		sysRoleExtDataSamplePermissionService.deleteSysRoleExtDataSamplePermission(id);
	}

	@Override
	public SysRoleExtDataSamplePermission findSysRoleExtDataSamplePermissionById(Long id) {
		return sysRoleExtDataSamplePermissionService.findSysRoleExtDataSamplePermissionById(id);
	}

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

	}
}
