package cn.superdesk.uniorder.dubbo.provider.order._leaveover;

import cn.superdesk.uniorder.common.numerical.AnBeanUtils;
import cn.superdesk.uniorder.dao.entity.sys.SysBackAccount;
import cn.superdesk.uniorder.dto.vo.sys.SysBackAccountVo;
import cn.superdesk.uniorder.dubbo.facade.order._leaveover.DubboSysBackAccountService;
import cn.superdesk.uniorder.service.order._leaveover.SysBackAccountService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

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

/**
 * @Description: Java类作用描述
 * @Author: linjinyu
 * @CreateDate: 2021/12/1 下午3:22
 * @UpdateUser: linjinyu
 * @UpdateDate: 2021/12/1 下午3:22
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Service(version = "1.0.0", retries = -1, timeout = 10000)
public class DubboSysBackAccountServiceImpl implements DubboSysBackAccountService {


	@Autowired
	private SysBackAccountService sysBackAccountService;

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

		List<SysBackAccountVo> resultVoList     = new ArrayList<>();
		List<SysBackAccount>   resultEntityList = sysBackAccountService.findAll(queryMap);

		resultVoList = AnBeanUtils.copy(resultEntityList, SysBackAccountVo.class);

		return resultVoList;
	}

	@Override
	public void addObj(SysBackAccount t) {
		sysBackAccountService.insertSelective(t);
	}

	@Override
	public SysBackAccount findById(Long id) {
		return sysBackAccountService.findById(id);
	}

	@Override
	public void updateObj(SysBackAccount t) {
		sysBackAccountService.updateByPrimaryKeySelective(t);
	}

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

}
