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

import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.dao.entity.channel.UnifiedChannelProfitSync;
import cn.superdesk.uniorder.dto.dubbo.channel.UnifiedChannelProfitSyncParam;
import cn.superdesk.uniorder.dto.vo.unified.UnifiedChannelProfitSyncPage;
import cn.superdesk.uniorder.dubbo.facade.channel.DubboUnifiedChannelProfitSyncService;
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 UnifiedChannelProfitSyncDubboConsumerService {

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


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

	public void addObj(UnifiedChannelProfitSyncParam param) {

		dubboUnifiedChannelProfitSyncService.addObj(param);

	}

	public void updateObj(UnifiedChannelProfitSyncParam param) {

		dubboUnifiedChannelProfitSyncService.updateObj(param);
	}

	public void deleteObj(Long id) {

		dubboUnifiedChannelProfitSyncService.deleteObj(id);
	}

	public UnifiedChannelProfitSync findById(Long id) {

		return dubboUnifiedChannelProfitSyncService.findById(id);
	}

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

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

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

		return dubboUnifiedChannelProfitSyncService.findAll(queryMap);
	}

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


	public void addUnifiedChannelProfitSync(UnifiedChannelProfitSyncParam param) {

		dubboUnifiedChannelProfitSyncService.addUnifiedChannelProfitSync(param);
	}

	public void addUnifiedChannelProfitSync(UnifiedChannelProfitSync entity) {
		dubboUnifiedChannelProfitSyncService.addUnifiedChannelProfitSync(entity);
	}


	public void updateUnifiedChannelProfitSync(UnifiedChannelProfitSyncParam param) {

		dubboUnifiedChannelProfitSyncService.updateUnifiedChannelProfitSync(param);
	}

	public void updateUnifiedChannelProfitSync(UnifiedChannelProfitSync entity) {
		dubboUnifiedChannelProfitSyncService.updateUnifiedChannelProfitSync(entity);
	}


	public void deleteUnifiedChannelProfitSync(Long id) {
		dubboUnifiedChannelProfitSyncService.deleteUnifiedChannelProfitSync(id);
	}
//	public void deleteUnifiedChannelProfitSync(Long id) {
//		dubboUnifiedChannelProfitSyncService.deleteUnifiedChannelProfitSync(id);
//	}


	public UnifiedChannelProfitSync findUnifiedChannelProfitSyncById(Long id) {

		return dubboUnifiedChannelProfitSyncService.findUnifiedChannelProfitSyncById(id);
	}


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

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

	/***************************************************** 关于 UnifiedChannelProfitSync start *****************************************************/
	public UnifiedChannelProfitSync findUnifiedChannelProfitSyncBySyncId(Long id) {
		return dubboUnifiedChannelProfitSyncService.findUnifiedChannelProfitSyncBySyncId(id);
	}

	/***************************************************** 关于 UnifiedChannelProfitSync   end *****************************************************/


	public List<UnifiedChannelProfitSync> getChannelProfitAll(Map<String, Object> params) {
		return dubboUnifiedChannelProfitSyncService.getChannelProfitAll(params);
	}

	public R<List<UnifiedChannelProfitSyncPage>> getChannelPage(String token, Map<String, Object> params, int pageNum, int pageSize) {
		return dubboUnifiedChannelProfitSyncService.getChannelPage(params, pageNum, pageSize);
	}


	/***************************************************** 关于 UnifiedChannelProfitSync kafka同步 start *****************************************************/
	public void deleteReceiveUnifiedOperaterBusinessProfit(String message) {
		dubboUnifiedChannelProfitSyncService.deleteReceiveUnifiedChannelProfitSync(message);
	}

	public void mergeReceiveUnifiedOperaterBusinessProfit(String message) {
		dubboUnifiedChannelProfitSyncService.mergeReceiveUnifiedChannelProfitSync(message);
	}
	/***************************************************** 关于 UnifiedChannelProfitSync kafka同步   end *****************************************************/


}
