| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- package com.xunmei.system.api;
- import com.xunmei.common.core.constant.SecurityConstants;
- import com.xunmei.common.core.constant.ServiceNameConstants;
- import com.xunmei.common.core.domain.OrgTreeReq;
- import com.xunmei.common.core.domain.OrgTreeResp;
- import com.xunmei.common.core.domain.R;
- import com.xunmei.common.core.vo.IdNameVo;
- import com.xunmei.system.api.Eto.OrgListByTypesConditionEto;
- import com.xunmei.system.api.domain.SysOrg;
- import com.xunmei.system.api.domain.SysOrgExtend;
- import com.xunmei.system.api.factory.RemoteOrgFallbackFactory;
- import com.xunmei.system.api.vo.SysOrgVO;
- import org.springframework.cloud.openfeign.FeignClient;
- import org.springframework.web.bind.annotation.*;
- import java.util.List;
- @FeignClient(contextId = "remoteOrgService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteOrgFallbackFactory.class)
- public interface RemoteOrgService {
- /**
- * 通过用户名查询用户信息
- *
- * @param source 请求来源
- * @return 结果
- */
- @GetMapping("/org/list/nopage")
- R<List<SysOrg>> getAllOrg(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- @GetMapping("/dept/selectCheckSubOrgIdList")
- List<Long> selectCheckSubOrgIdList(@RequestParam("orgId") Long orgId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- @GetMapping("/dept/selectSysOrgById")
- SysOrg selectSysOrgById(@RequestParam("id") Long id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- /**
- * 查询第一级机构
- *
- * @param source
- * @return
- */
- @GetMapping("/org/selectSysOrgByParentId")
- List<SysOrg> selectSysOrgByParentId(@RequestParam("id") Long id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- @GetMapping("/dept/get/{orgId}")
- SysOrg selectOrgById(@PathVariable("orgId") Long orgId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- @GetMapping("/dept/listByIds")
- R<List<SysOrg>> listByIds(List<Long> ids, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- @PostMapping("/dept/findListByOrgType")
- R<List<Long>> findListByOrgType(@RequestBody Integer execOrgType, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- @PostMapping("/org/sync/batch")
- R<Boolean> batchSaveSyncOrg(@RequestBody List<SysOrg> orgList, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- @PostMapping("/dept/findListByOrgTypes")
- R<List<SysOrg>> listByTypes(@RequestBody OrgListByTypesConditionEto eto);
- @PostMapping("/dept/listByParentIdAndType")
- List<SysOrg> listByParentIdAndType(@RequestBody SysOrg sysOrg, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- @GetMapping("/dept/top")
- SysOrg selectTopOrg(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- @GetMapping("/dept/selectByOrgType/{orgType}")
- List<SysOrg> selectByOrgType(@PathVariable("orgType") Integer orgType, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- @GetMapping("/dept/selectByOrgPathAndOrgType/{orgPath}/{orgType}")
- List<SysOrg> selectByOrgPathAndOrgType(@PathVariable("orgPath") String orgPath, @PathVariable("orgType") Integer orgType, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- @PostMapping("/dept/selectOrgByIdList")
- List<SysOrg> selectOrgByIdList(@RequestBody List<Long> orgList, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- /**
- * 获取上级行社
- *
- * @param orgList
- * @param source
- * @return
- */
- @PostMapping("/dept/selectParentHs")
- List<SysOrg> selectParentHs(@RequestBody List<Long> orgList, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- /**
- * 获取下级所有行社
- *
- * @param orgList
- * @param source
- * @return
- */
- @GetMapping("/dept/selectChildHs/{orgId}")
- List<SysOrg> selectChildHs(@PathVariable("orgId") Long orgId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- @GetMapping("/dept/getSysOrgByUserId/{userId}")
- SysOrg getSysOrgByUserId(@PathVariable("userId") Long userId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- /**
- * 获取机构及其上级机构的id列表
- *
- * @param orgId
- * @return
- */
- @GetMapping("/org/getUpOrgs/{orgId}")
- List<Long> getUpOrgs(@PathVariable("orgId") Long orgId);
- /**
- * @param source
- * @return
- */
- @GetMapping("/org/list/findAllOrg")
- List<SysOrg> findAllOrg(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- /**
- * 获取机构及父级机构的名称
- *
- * @param ids
- * @return
- */
- @PostMapping("/org/getParentNames")
- R<List<IdNameVo>> getParentName(@RequestBody List<Long> ids, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- /**
- * 根据机构ID查询机构信息
- *
- * @param ids
- * @return
- */
- @PostMapping("/dept/selectByOrgIdList")
- List<SysOrg> selectByOrgIdList(@RequestBody List<Long> ids, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- @PostMapping("/dept/selectOrgTypeByIdList")
- List<Long> selectOrgTypeByIdList(@RequestBody List<Long> ids, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- @GetMapping("/extend/selectSysOrgExtendById")
- SysOrgExtend selectSysOrgExtendById(@RequestParam("orgId") Long orgId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- @GetMapping("/dept/findByOrgTypeAndParent")
- List<SysOrg> findByOrgTypeAndParent(@RequestParam("orgType") Integer orgType, @RequestParam("path") String path, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- @PostMapping("/dept/deptTree/hangshewhole")
- R<List<SysOrgVO>> hangsheWholePathTree(@RequestBody Long orgId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- // @PostMapping("/dept/selectParentHs")
- // List<SysOrg> selectParentHs(@RequestBody List<Long> orgList, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
- // 此接口需要获取当前登陆人信息,不可异步
- @GetMapping("/dept/selectOrgTreeReq")
- OrgTreeResp getOrgTreeResp(@RequestParam("orgId") Long orgId,@RequestParam("checkSub") Boolean checkSub);
- }
|