package com.bonus.core.customer.service;

import cn.hutool.core.lang.tree.Tree;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.bonus.core.customer.dto.CustAccExcelModel;
import com.bonus.core.customer.dto.CustOrgPageDTO;
import com.bonus.core.customer.dto.CustOrgTreeDTO;
import com.bonus.core.customer.model.CustOrg;
import com.bonus.core.customer.po.QueryOrgsBasicInfoPO;
import com.bonus.core.customer.vo.CustOrgVO;
import com.bonus.core.customer.vo.OrgBasicInfoVO;
import com.fasterxml.jackson.databind.JsonNode;

import java.util.List;

public interface CustOrgService extends IService<CustOrg> {
   Page<CustOrgVO> pageCustOrgByParams(Page<CustOrg> page, CustOrgPageDTO content);

   CustOrg getCustOrg(Long id);

   CustOrg getCustOrgByOrgId(Long orgId);

   CustOrg getTopOrg();

   List<Long> queryChildCustOrgId(CustOrg superOrg);

   void addCustOrg(CustOrg custOrg);

   void updateOrg(CustOrg custOrg);

   void deleteByOrdId(Long orgId);

   List<Tree<Long>> getSystemOrgTree();

   List<Tree<Long>> getTenantOrgTree();

   List<CustOrgVO> queryCustOrgList(List<Long> orgIdList);

   JsonNode queryDiningPlaceByOrgId(Long orgId);

   CustOrg initTopCustOrg(String merchantName);

   CustOrg initTempCustOrg(CustOrg superOrg);

   CustOrg getTempCustOrg();

   List<OrgBasicInfoVO> listOrgBasicInfoByParams(QueryOrgsBasicInfoPO queryOrgsBasicInfoPO);

   List<CustOrg> listOrgByLevel(Integer orgLeave);

   void batchAddCustOrgAndSerOrgIdNotCheck(List<CustAccExcelModel> custAccExcelModelList);

   boolean isTopOrg(Long orgId);

   List<CustOrgVO> getOrgLazyTree(CustOrgTreeDTO content);

   void dragOrgSort(CustOrgTreeDTO content);
}
