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

import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.dao.entity.organisation.SysClique;
import cn.superdesk.uniorder.dto.param.organisation.SysCliqueFindByTreeCriteria;
import cn.superdesk.uniorder.dto.param.organisation.SysCliqueParam;
import cn.superdesk.uniorder.dto.vo._function.tree.SysCliqueTreeModel;
import cn.superdesk.uniorder.dubbo.facade.organisation.DubboSysCliqueService;
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: 2021-04-28 14:08:25
 * @UpdateUser: linjinyu
 * @UpdateDate: 2021-04-28 14:08:25
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Slf4j
@Component
public class SysCliqueDubboConsumerService {

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


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

	public void addObj(SysCliqueParam param) {

		dubboSysCliqueService.addObj(param);

	}

	public void updateObj(SysCliqueParam param) {

		dubboSysCliqueService.updateObj(param);
	}

	public void deleteObj(Long id) {

		dubboSysCliqueService.deleteObj(id);
	}

	public SysClique findById(Long id) {

		return dubboSysCliqueService.findById(id);
	}

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

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

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

		return dubboSysCliqueService.findAll(queryMap);
	}

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


	public void addSysClique(SysCliqueParam param) {

		dubboSysCliqueService.addSysClique(param);
	}


	public void updateSysClique(SysCliqueParam param) {

		dubboSysCliqueService.updateSysClique(param);
	}


	public void deleteSysClique(Long id) {
		dubboSysCliqueService.deleteSysClique(id);
	}


	public SysClique findSysCliqueById(Long id) {

		return dubboSysCliqueService.findSysCliqueById(id);
	}


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

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

	/****************************************** kafka start ******************************************/

	public void kafkaMergeReceiveClique(String message) {
		dubboSysCliqueService.kafkaMergeReceiveClique(message);
	}

	@Deprecated
	public void kafkaDeleteReceiveClique(String message) {
		dubboSysCliqueService.kafkaDeleteReceiveClique(message);
	}

	/****************************************** kafka   end ******************************************/

	public List<SysCliqueTreeModel> findByTree() {
		return dubboSysCliqueService.findByTree();
	}

	public List<SysCliqueTreeModel> findByTree002(SysCliqueFindByTreeCriteria criteria) {
		return dubboSysCliqueService.findByTree002(criteria);
	}

	public List<SysCliqueTreeModel> findByTree003(SysCliqueFindByTreeCriteria criteria) {
		return dubboSysCliqueService.findByTree003(criteria);
	}

	public List<SysCliqueTreeModel> findByTree004(SysCliqueFindByTreeCriteria criteria) {
		return dubboSysCliqueService.findByTree004(criteria);
	}
}
