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

import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.dao.entity.channel.UnifiedChannelSync;
import cn.superdesk.uniorder.dto.dubbo.channel.UnifiedChannelSyncParam;
import cn.superdesk.uniorder.dubbo.facade.channel.DubboUnifiedChannelSyncService;
import com.alibaba.dubbo.config.annotation.Reference;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

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
 */
@Slf4j
@Component
public class UnifiedChannelSyncDubboConsumerService {

	@Reference(version = "1.0.0", timeout = 10000, retries = -1)
	private DubboUnifiedChannelSyncService dubboUnifiedChannelSyncService;


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

	public void addObj(UnifiedChannelSyncParam param) {

		dubboUnifiedChannelSyncService.addObj(param);

	}

	public void updateObj(UnifiedChannelSyncParam param) {

		dubboUnifiedChannelSyncService.updateObj(param);
	}

	public void deleteObj(Long id) {

		dubboUnifiedChannelSyncService.deleteObj(id);
	}

	public UnifiedChannelSync findById(Long id) {

		return dubboUnifiedChannelSyncService.findById(id);
	}

	public PageInfo<UnifiedChannelSync> findByPaging(Map<String, Object> conditions, Integer pageNun, Integer pageSize) {

		return dubboUnifiedChannelSyncService.findByPaging(conditions, pageNun, pageSize);
	}

	public List<UnifiedChannelSync> findAll(Map<String, Object> queryMap) {

		return dubboUnifiedChannelSyncService.findAll(queryMap);
	}

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


	public void addUnifiedChannelSync(UnifiedChannelSyncParam param) {

		dubboUnifiedChannelSyncService.addUnifiedChannelSync(param);
	}

	public void addUnifiedChannelSync(UnifiedChannelSync entity) {

		dubboUnifiedChannelSyncService.addUnifiedChannelSync(entity);
	}


	public void updateUnifiedChannelSync(UnifiedChannelSyncParam param) {

		dubboUnifiedChannelSyncService.updateUnifiedChannelSync(param);
	}

	public void updateUnifiedChannelSync(UnifiedChannelSync entity) {
		dubboUnifiedChannelSyncService.updateUnifiedChannelSync(entity);
	}


	public void deleteUnifiedChannelSync(Long id) {
		dubboUnifiedChannelSyncService.deleteUnifiedChannelSync(id);
	}
//	public void deleteUnifiedChannelSync(Long id) {
//		dubboUnifiedChannelSyncService.deleteUnifiedChannelSync(id);
//	}

	public UnifiedChannelSync findUnifiedChannelSyncById(Long id) {

		return dubboUnifiedChannelSyncService.findUnifiedChannelSyncById(id);
	}


	public R<List<UnifiedChannelSync>> pageQuery(Map<String, Object> conditions, int pageNun, int pageSize) {

		return dubboUnifiedChannelSyncService.pageQuery(conditions, pageNun, pageSize);
	}


	/***************************************************** 关于 UnifiedChannelSync start *****************************************************/
	public UnifiedChannelSync findUnifiedChannelSyncByChannelId(Long id) {
		return dubboUnifiedChannelSyncService.findUnifiedChannelSyncByChannelId(id);
	}

	/***************************************************** 关于 UnifiedChannelSync   end *****************************************************/


	public List<UnifiedChannelSync> getChannelAll(Map<String, Object> params) {
		return dubboUnifiedChannelSyncService.getChannelAll(params);
	}


	/***************************************************** 关于 UnifiedChannelSync kafka同步 start *****************************************************/
	public void deleteReceiveUnifiedChannelOperater(String message) {
		dubboUnifiedChannelSyncService.deleteReceiveUnifiedChannelSync(message);
	}

	public void mergeReceiveUnifiedChannelOperater(String message) {
		dubboUnifiedChannelSyncService.mergeReceiveUnifiedChannelSync(message);
	}
	/***************************************************** 关于 UnifiedChannelSync kafka同步   end *****************************************************/


}
