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

import cn.superdesk.uniorder.common.numerical.AnBeanUtils;
import cn.superdesk.uniorder.dubbo.facade.channel.DubboUnifiedChannelProfitXVirtService;
import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.dao.entity.channel.UnifiedChannelProfitXVirt;
import cn.superdesk.uniorder.dto.dubbo.channel.UnifiedChannelProfitXVirtParam;
import cn.superdesk.uniorder.service.channel.UnifiedChannelProfitXVirtService;
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-28 17:10:10
 * @UpdateUser: linjinyu
 * @UpdateDate: 2020-08-28 17:10:10
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Service(version = "1.0.0", retries = -1, timeout = 10000)
public class DubboUnifiedChannelProfitXVirtServiceImpl implements DubboUnifiedChannelProfitXVirtService {

	@Autowired
	private UnifiedChannelProfitXVirtService unifiedChannelProfitXVirtService;


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

	@Override
	public void addObj(UnifiedChannelProfitXVirtParam param) {

		UnifiedChannelProfitXVirt unifiedChannelProfitXVirt = AnBeanUtils.copy(param, UnifiedChannelProfitXVirt.class);
		unifiedChannelProfitXVirtService.insertSelective(unifiedChannelProfitXVirt);

	}

	@Override
	public void updateObj(UnifiedChannelProfitXVirtParam param) {

		UnifiedChannelProfitXVirt unifiedChannelProfitXVirt = AnBeanUtils.copy(param, UnifiedChannelProfitXVirt.class);
		unifiedChannelProfitXVirtService.updateByPrimaryKeySelective(unifiedChannelProfitXVirt);
	}

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

	@Override
	public UnifiedChannelProfitXVirt findById(Long id) {
		return unifiedChannelProfitXVirtService.findById(id);
	}

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

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

		return unifiedChannelProfitXVirtService.findAll(queryMap);
	}

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


	@Override
	public void addUnifiedChannelProfitXVirt(UnifiedChannelProfitXVirtParam param) {

		UnifiedChannelProfitXVirt unifiedChannelProfitXVirt = AnBeanUtils.copy(param, UnifiedChannelProfitXVirt.class);
		unifiedChannelProfitXVirtService.addUnifiedChannelProfitXVirt(unifiedChannelProfitXVirt);
	}

	@Override
	public void updateUnifiedChannelProfitXVirt(UnifiedChannelProfitXVirtParam param) {

		UnifiedChannelProfitXVirt unifiedChannelProfitXVirt = AnBeanUtils.copy(param, UnifiedChannelProfitXVirt.class);
		unifiedChannelProfitXVirtService.updateUnifiedChannelProfitXVirt(unifiedChannelProfitXVirt);
	}

	@Override
	public void deleteUnifiedChannelProfitXVirt(Long id) {
		unifiedChannelProfitXVirtService.deleteUnifiedChannelProfitXVirt(id);
	}

	@Override
	public UnifiedChannelProfitXVirt findUnifiedChannelProfitXVirtById(Long id) {
		return unifiedChannelProfitXVirtService.findUnifiedChannelProfitXVirtById(id);
	}

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

	}

	////////////////////



	@Override
	public List<Long> getVirtsByChannelId(Long channelId) {
		return unifiedChannelProfitXVirtService.getVirtsByChannelId(channelId);

	}

	@Override
	public List<UnifiedChannelProfitXVirt> findVirtsByChannelId(Long channelId) {
		return unifiedChannelProfitXVirtService.findVirtsByChannelId(channelId);

	}
}
