同步框架更新
This commit is contained in:
@ -6,6 +6,7 @@ import com.xjrsoft.organization.fallback.DepartmentClientFallBack;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
@ -56,6 +57,7 @@ public interface IDepartmentClient {
|
||||
/**
|
||||
* 获取root部门
|
||||
*/
|
||||
@GetMapping(GlobalConstant.CLIENT_API_PRE + GlobalConstant.MODULE_ORGANIZATION_NAME + "/queryPathFromRootFeign")
|
||||
List<Department> queryPathFromRoot(List<Department> list);
|
||||
@PostMapping(value = GlobalConstant.CLIENT_API_PRE + GlobalConstant.MODULE_ORGANIZATION_NAME + "/queryPathFromRootFeign")
|
||||
List<Department> queryPathFromRoot(@RequestBody List<Department> list);
|
||||
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.xjrsoft.organization.fallback;
|
||||
import com.xjrsoft.organization.client.IDepartmentClient;
|
||||
import com.xjrsoft.organization.entity.Department;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -33,8 +34,7 @@ public class DepartmentClientFallBack implements IDepartmentClient {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Department> queryPathFromRoot(List<Department> list) {
|
||||
public List<Department> queryPathFromRoot(@RequestBody List<Department> list) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,53 +0,0 @@
|
||||
package com.xjrsoft.organization.mapper;
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.organization.entity.Department;
|
||||
import org.apache.ibatis.annotations.MapKey;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 机构 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author tzx
|
||||
* @since 2022-03-02
|
||||
*/
|
||||
@Mapper
|
||||
public interface DepartmentMapper extends MPJBaseMapper<Department> {
|
||||
|
||||
@Deprecated
|
||||
@Select("WITH RECURSIVE parent_path AS ( SELECT id, parent_id FROM xjr_department WHERE id = #{id} UNION ALL SELECT c.id, c.parent_id FROM xjr_department c INNER JOIN parent_path pp ON c.id = pp.parent_id WHERE delete_mark = 0 ) SELECT parent_id FROM parent_path")
|
||||
List<String> findDeptPIds(@Param("id")String id);
|
||||
|
||||
/**
|
||||
* 查询指定节点的所有父节点id
|
||||
* 传参:
|
||||
* queryType=parent
|
||||
* startIds=Long[]{指定节点}
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<String> findParentIds(@Param("params") Map<String,Object> params);
|
||||
|
||||
/**
|
||||
* 查询部门路径
|
||||
* 传参:
|
||||
* queryType=parent
|
||||
* startIds=Long[]{指定节点开始}
|
||||
* stopParentIds=Long[]{查询到该节点为止}
|
||||
* isQueryIdPath是否返回id,默认返回部门名称
|
||||
* isQueryOrderDesc是否由指定节点到根节点的顺序,默认是从根节点到指定节点的顺序
|
||||
* pathSeparator路径分隔符,默认是/
|
||||
* @param params
|
||||
* @return 部门id,部门路径的map
|
||||
*/
|
||||
@MapKey("flag")
|
||||
Map<Long,Map>queryDeptPath(@Param("params") Map<String,Object> params);
|
||||
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
package com.xjrsoft.organization.mapper;
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.organization.entity.Post;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 岗位 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author tzx
|
||||
* @since 2022-03-02
|
||||
*/
|
||||
@Mapper
|
||||
public interface PostMapper extends MPJBaseMapper<Post> {
|
||||
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
package com.xjrsoft.organization.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.xjrsoft.organization.entity.Role;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 角色 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author tzx
|
||||
* @since 2022-03-02
|
||||
*/
|
||||
@Mapper
|
||||
public interface RoleMapper extends BaseMapper<Role> {
|
||||
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
package com.xjrsoft.organization.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.organization.entity.SyncOrgAndUserFromDataCenter;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface SyncOrgAndUserFromDataCenterMapper extends MPJBaseMapper<SyncOrgAndUserFromDataCenter> {
|
||||
@InterceptorIgnore(blockAttack = "true")
|
||||
@Delete("delete from xjr_sync_datacenter_org_user")
|
||||
Integer emptyAllData()throws Exception;
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
package com.xjrsoft.organization.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.xjrsoft.organization.entity.UserChargeDept;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户负责部门表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author hnyyzy
|
||||
* @since 2023-12-20
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserChargeDeptMapper extends BaseMapper<UserChargeDept> {
|
||||
|
||||
}
|
||||
@ -1,9 +0,0 @@
|
||||
package com.xjrsoft.organization.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.xjrsoft.organization.entity.UserDeptRelation;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface UserDeptRelationMapper extends BaseMapper<UserDeptRelation> {
|
||||
}
|
||||
@ -1,25 +0,0 @@
|
||||
package com.xjrsoft.organization.mapper;
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.organization.entity.User;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.xjrsoft.organization.entity.Department;
|
||||
import com.xjrsoft.organization.vo.UserRoleVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author tzx
|
||||
* @since 2022-03-02
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserMapper extends MPJBaseMapper<User> {
|
||||
|
||||
List<Department> queryDepartmentsOfUser(Long id);
|
||||
|
||||
List<UserRoleVo> queryRolesOfUser(Long id);
|
||||
}
|
||||
@ -1,9 +0,0 @@
|
||||
package com.xjrsoft.organization.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.xjrsoft.organization.entity.UserPostRelation;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface UserPostRelationMapper extends BaseMapper<UserPostRelation> {
|
||||
}
|
||||
@ -1,17 +0,0 @@
|
||||
package com.xjrsoft.organization.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.xjrsoft.organization.entity.UserRoleRelation;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
/**
|
||||
* <p>
|
||||
* 用户关联角色表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author tzx
|
||||
* @since 2022-03-02
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserRoleRelationMapper extends BaseMapper<UserRoleRelation> {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user