File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -34,7 +34,15 @@ public class DatabusUserChangeConsumer implements RocketMQListener<DatabusUserCh
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMessage(DatabusUserChangeMessage message) {
|
public void onMessage(DatabusUserChangeMessage message) {
|
||||||
log.info("[Databus] 收到用户变更消息, action={}, userId={}", message.getAction(), message.getUserId());
|
log.info("[Databus] 收到用户变更消息, action={}, userId={}, userSource={}",
|
||||||
|
message.getAction(), message.getUserId(), message.getUserSource());
|
||||||
|
|
||||||
|
// ⚠️ 只处理 userSource = 2 的用户
|
||||||
|
if (message.getUserSource() == null || message.getUserSource() != 2) {
|
||||||
|
log.info("[Databus] 跳过非集团用户的变更消息, userId={}, userSource={}",
|
||||||
|
message.getUserId(), message.getUserSource());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Map<String, Object> dataMap = new HashMap<>();
|
Map<String, Object> dataMap = new HashMap<>();
|
||||||
|
|||||||
@@ -0,0 +1,81 @@
|
|||||||
|
package com.zt.plat.framework.databus.server.provider;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
|
import com.zt.plat.framework.databus.server.core.provider.DataProvider;
|
||||||
|
import com.zt.plat.framework.databus.server.core.provider.DataProviderRegistry;
|
||||||
|
import com.zt.plat.module.databus.api.dto.CursorPageReqDTO;
|
||||||
|
import com.zt.plat.module.databus.api.dto.CursorPageResult;
|
||||||
|
import com.zt.plat.module.databus.api.data.DatabusUserDeptData;
|
||||||
|
import com.zt.plat.module.databus.api.provider.DatabusUserDeptProviderApi;
|
||||||
|
import jakarta.annotation.PostConstruct;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户-部门关系数据提供者
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class UserDeptDataFeignProvider implements DataProvider<DatabusUserDeptData> {
|
||||||
|
|
||||||
|
public static final String PROVIDER_TYPE = "USER_DEPT";
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DatabusUserDeptProviderApi userDeptProviderApi;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DataProviderRegistry dataProviderRegistry;
|
||||||
|
|
||||||
|
@PostConstruct
|
||||||
|
public void init() {
|
||||||
|
dataProviderRegistry.register(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getProviderType() {
|
||||||
|
return PROVIDER_TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CursorPageData<DatabusUserDeptData> getPageByCursor(LocalDateTime cursorTime, Long cursorId,
|
||||||
|
int batchSize, Long tenantId) {
|
||||||
|
CursorPageReqDTO reqDTO = CursorPageReqDTO.builder()
|
||||||
|
.cursorTime(cursorTime)
|
||||||
|
.cursorId(cursorId)
|
||||||
|
.batchSize(batchSize)
|
||||||
|
.tenantId(tenantId)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
CommonResult<CursorPageResult<DatabusUserDeptData>> result = userDeptProviderApi.getPageByCursor(reqDTO);
|
||||||
|
if (!result.isSuccess()) {
|
||||||
|
throw new RuntimeException("获取用户-部门关系数据失败: " + result.getMsg());
|
||||||
|
}
|
||||||
|
|
||||||
|
CursorPageResult<DatabusUserDeptData> pageResult = result.getData();
|
||||||
|
return CursorPageData.of(
|
||||||
|
pageResult.getList(),
|
||||||
|
pageResult.getNextCursorTime(),
|
||||||
|
pageResult.getNextCursorId(),
|
||||||
|
pageResult.getCount(),
|
||||||
|
Boolean.TRUE.equals(pageResult.getHasMore()),
|
||||||
|
(pageResult.getTotal() != null ? pageResult.getTotal() : 0L)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long count(Long tenantId) {
|
||||||
|
CommonResult<Long> result = userDeptProviderApi.count(tenantId);
|
||||||
|
if (!result.isSuccess()) {
|
||||||
|
throw new RuntimeException("获取用户-部门关系总数失败: " + result.getMsg());
|
||||||
|
}
|
||||||
|
return result.getData();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long extractUid(DatabusUserDeptData data) {
|
||||||
|
return data.getId();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
package com.zt.plat.framework.databus.server.provider;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
|
import com.zt.plat.framework.databus.server.core.provider.DataProvider;
|
||||||
|
import com.zt.plat.framework.databus.server.core.provider.DataProviderRegistry;
|
||||||
|
import com.zt.plat.module.databus.api.dto.CursorPageReqDTO;
|
||||||
|
import com.zt.plat.module.databus.api.dto.CursorPageResult;
|
||||||
|
import com.zt.plat.module.databus.api.data.DatabusUserPostData;
|
||||||
|
import com.zt.plat.module.databus.api.provider.DatabusUserPostProviderApi;
|
||||||
|
import jakarta.annotation.PostConstruct;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户-岗位关系数据提供者
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class UserPostDataFeignProvider implements DataProvider<DatabusUserPostData> {
|
||||||
|
|
||||||
|
public static final String PROVIDER_TYPE = "USER_POST";
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DatabusUserPostProviderApi userPostProviderApi;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DataProviderRegistry dataProviderRegistry;
|
||||||
|
|
||||||
|
@PostConstruct
|
||||||
|
public void init() {
|
||||||
|
dataProviderRegistry.register(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getProviderType() {
|
||||||
|
return PROVIDER_TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CursorPageData<DatabusUserPostData> getPageByCursor(LocalDateTime cursorTime, Long cursorId,
|
||||||
|
int batchSize, Long tenantId) {
|
||||||
|
CursorPageReqDTO reqDTO = CursorPageReqDTO.builder()
|
||||||
|
.cursorTime(cursorTime)
|
||||||
|
.cursorId(cursorId)
|
||||||
|
.batchSize(batchSize)
|
||||||
|
.tenantId(tenantId)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
CommonResult<CursorPageResult<DatabusUserPostData>> result = userPostProviderApi.getPageByCursor(reqDTO);
|
||||||
|
if (!result.isSuccess()) {
|
||||||
|
throw new RuntimeException("获取用户-岗位关系数据失败: " + result.getMsg());
|
||||||
|
}
|
||||||
|
|
||||||
|
CursorPageResult<DatabusUserPostData> pageResult = result.getData();
|
||||||
|
return CursorPageData.of(
|
||||||
|
pageResult.getList(),
|
||||||
|
pageResult.getNextCursorTime(),
|
||||||
|
pageResult.getNextCursorId(),
|
||||||
|
pageResult.getCount(),
|
||||||
|
Boolean.TRUE.equals(pageResult.getHasMore()),
|
||||||
|
(pageResult.getTotal() != null ? pageResult.getTotal() : 0L)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long count(Long tenantId) {
|
||||||
|
CommonResult<Long> result = userPostProviderApi.count(tenantId);
|
||||||
|
if (!result.isSuccess()) {
|
||||||
|
throw new RuntimeException("获取用户-岗位关系总数失败: " + result.getMsg());
|
||||||
|
}
|
||||||
|
return result.getData();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long extractUid(DatabusUserPostData data) {
|
||||||
|
return data.getId();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
package com.zt.plat.module.databus.api.provider;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
|
import com.zt.plat.module.databus.api.data.DatabusUserDeptData;
|
||||||
|
import com.zt.plat.module.databus.api.dto.CursorPageReqDTO;
|
||||||
|
import com.zt.plat.module.databus.api.dto.CursorPageResult;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Databus 用户-部门关系数据提供者 API
|
||||||
|
* <p>
|
||||||
|
* 供 Databus 调用,获取用户-部门关联数据用于全量/增量同步
|
||||||
|
*
|
||||||
|
* @author ZT
|
||||||
|
*/
|
||||||
|
@FeignClient(name = "${databus.provider.user-dept.service:system-server}")
|
||||||
|
@Tag(name = "RPC 服务 - Databus 用户-部门关系数据提供者")
|
||||||
|
public interface DatabusUserDeptProviderApi {
|
||||||
|
|
||||||
|
String PREFIX = "/rpc/databus/user-dept";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 游标分页查询用户-部门关系数据(用于全量同步)
|
||||||
|
*
|
||||||
|
* @param reqDTO 游标分页请求
|
||||||
|
* @return 用户-部门关系数据分页结果
|
||||||
|
*/
|
||||||
|
@PostMapping(PREFIX + "/page-by-cursor")
|
||||||
|
@Operation(summary = "游标分页查询用户-部门关系数据")
|
||||||
|
CommonResult<CursorPageResult<DatabusUserDeptData>> getPageByCursor(@RequestBody CursorPageReqDTO reqDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询用户-部门关系详情(用于增量同步)
|
||||||
|
*
|
||||||
|
* @param id 关系ID
|
||||||
|
* @return 用户-部门关系数据
|
||||||
|
*/
|
||||||
|
@GetMapping(PREFIX + "/get")
|
||||||
|
@Operation(summary = "查询用户-部门关系详情")
|
||||||
|
@Parameter(name = "id", description = "关系ID", required = true, example = "1001")
|
||||||
|
CommonResult<DatabusUserDeptData> getById(@RequestParam("id") Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量查询用户-部门关系详情(用于增量同步批量获取)
|
||||||
|
*
|
||||||
|
* @param ids 关系ID列表
|
||||||
|
* @return 用户-部门关系数据列表
|
||||||
|
*/
|
||||||
|
@GetMapping(PREFIX + "/list")
|
||||||
|
@Operation(summary = "批量查询用户-部门关系详情")
|
||||||
|
@Parameter(name = "ids", description = "关系ID列表", required = true, example = "1001,1002,1003")
|
||||||
|
CommonResult<List<DatabusUserDeptData>> getListByIds(@RequestParam("ids") List<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计用户-部门关系总数(用于全量同步进度计算)
|
||||||
|
*
|
||||||
|
* @param tenantId 租户ID(可选)
|
||||||
|
* @return 用户-部门关系总数
|
||||||
|
*/
|
||||||
|
@GetMapping(PREFIX + "/count")
|
||||||
|
@Operation(summary = "统计用户-部门关系总数")
|
||||||
|
@Parameter(name = "tenantId", description = "租户ID", example = "1")
|
||||||
|
CommonResult<Long> count(@RequestParam(value = "tenantId", required = false) Long tenantId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
package com.zt.plat.module.databus.api.provider;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
|
import com.zt.plat.module.databus.api.data.DatabusUserPostData;
|
||||||
|
import com.zt.plat.module.databus.api.dto.CursorPageReqDTO;
|
||||||
|
import com.zt.plat.module.databus.api.dto.CursorPageResult;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Databus 用户-岗位关系数据提供者 API
|
||||||
|
* <p>
|
||||||
|
* 供 Databus 调用,获取用户-岗位关联数据用于全量/增量同步
|
||||||
|
*
|
||||||
|
* @author ZT
|
||||||
|
*/
|
||||||
|
@FeignClient(name = "${databus.provider.user-post.service:system-server}")
|
||||||
|
@Tag(name = "RPC 服务 - Databus 用户-岗位关系数据提供者")
|
||||||
|
public interface DatabusUserPostProviderApi {
|
||||||
|
|
||||||
|
String PREFIX = "/rpc/databus/user-post";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 游标分页查询用户-岗位关系数据(用于全量同步)
|
||||||
|
*
|
||||||
|
* @param reqDTO 游标分页请求
|
||||||
|
* @return 用户-岗位关系数据分页结果
|
||||||
|
*/
|
||||||
|
@PostMapping(PREFIX + "/page-by-cursor")
|
||||||
|
@Operation(summary = "游标分页查询用户-岗位关系数据")
|
||||||
|
CommonResult<CursorPageResult<DatabusUserPostData>> getPageByCursor(@RequestBody CursorPageReqDTO reqDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询用户-岗位关系详情(用于增量同步)
|
||||||
|
*
|
||||||
|
* @param id 关系ID
|
||||||
|
* @return 用户-岗位关系数据
|
||||||
|
*/
|
||||||
|
@GetMapping(PREFIX + "/get")
|
||||||
|
@Operation(summary = "查询用户-岗位关系详情")
|
||||||
|
@Parameter(name = "id", description = "关系ID", required = true, example = "1001")
|
||||||
|
CommonResult<DatabusUserPostData> getById(@RequestParam("id") Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量查询用户-岗位关系详情(用于增量同步批量获取)
|
||||||
|
*
|
||||||
|
* @param ids 关系ID列表
|
||||||
|
* @return 用户-岗位关系数据列表
|
||||||
|
*/
|
||||||
|
@GetMapping(PREFIX + "/list")
|
||||||
|
@Operation(summary = "批量查询用户-岗位关系详情")
|
||||||
|
@Parameter(name = "ids", description = "关系ID列表", required = true, example = "1001,1002,1003")
|
||||||
|
CommonResult<List<DatabusUserPostData>> getListByIds(@RequestParam("ids") List<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计用户-岗位关系总数(用于全量同步进度计算)
|
||||||
|
*
|
||||||
|
* @param tenantId 租户ID(可选)
|
||||||
|
* @return 用户-岗位关系总数
|
||||||
|
*/
|
||||||
|
@GetMapping(PREFIX + "/count")
|
||||||
|
@Operation(summary = "统计用户-岗位关系总数")
|
||||||
|
@Parameter(name = "tenantId", description = "租户ID", example = "1")
|
||||||
|
CommonResult<Long> count(@RequestParam(value = "tenantId", required = false) Long tenantId);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -4,9 +4,13 @@ import com.zt.plat.framework.common.biz.system.oauth2.OAuth2TokenCommonApi;
|
|||||||
import com.zt.plat.module.databus.api.provider.DatabusDeptProviderApi;
|
import com.zt.plat.module.databus.api.provider.DatabusDeptProviderApi;
|
||||||
import com.zt.plat.module.databus.api.provider.DatabusPostProviderApi;
|
import com.zt.plat.module.databus.api.provider.DatabusPostProviderApi;
|
||||||
import com.zt.plat.module.databus.api.provider.DatabusUserProviderApi;
|
import com.zt.plat.module.databus.api.provider.DatabusUserProviderApi;
|
||||||
|
import com.zt.plat.module.databus.api.provider.DatabusUserDeptProviderApi;
|
||||||
|
import com.zt.plat.module.databus.api.provider.DatabusUserPostProviderApi;
|
||||||
import com.zt.plat.module.system.api.dept.DeptApi;
|
import com.zt.plat.module.system.api.dept.DeptApi;
|
||||||
import com.zt.plat.module.system.api.dept.PostApi;
|
import com.zt.plat.module.system.api.dept.PostApi;
|
||||||
import com.zt.plat.module.system.api.user.AdminUserApi;
|
import com.zt.plat.module.system.api.user.AdminUserApi;
|
||||||
|
import com.zt.plat.module.system.api.userdept.UserDeptApi;
|
||||||
|
import com.zt.plat.module.system.api.userpost.UserPostApi;
|
||||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
@@ -21,9 +25,12 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
DatabusDeptProviderApi.class,
|
DatabusDeptProviderApi.class,
|
||||||
DatabusUserProviderApi.class,
|
DatabusUserProviderApi.class,
|
||||||
DatabusPostProviderApi.class,
|
DatabusPostProviderApi.class,
|
||||||
|
DatabusUserDeptProviderApi.class,
|
||||||
|
DatabusUserPostProviderApi.class,
|
||||||
PostApi.class,
|
PostApi.class,
|
||||||
DeptApi.class,
|
DeptApi.class,
|
||||||
AdminUserApi.class,
|
UserDeptApi.class,
|
||||||
|
UserPostApi.class,
|
||||||
})
|
})
|
||||||
public class RpcConfiguration {
|
public class RpcConfiguration {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package com.zt.plat.module.system.api.userdept;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||||
|
import com.zt.plat.module.system.api.userdept.dto.UserDeptRespDTO;
|
||||||
|
import com.zt.plat.module.system.api.userdept.dto.UserDeptSaveReqDTO;
|
||||||
|
import com.zt.plat.module.system.enums.ApiConstants;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户-部门关系 Feign API
|
||||||
|
*
|
||||||
|
* @author ZT
|
||||||
|
*/
|
||||||
|
@FeignClient(name = ApiConstants.NAME)
|
||||||
|
@Tag(name = "RPC 服务 - 用户部门关系")
|
||||||
|
public interface UserDeptApi {
|
||||||
|
|
||||||
|
String PREFIX = ApiConstants.PREFIX + "/user-dept";
|
||||||
|
|
||||||
|
@PostMapping(PREFIX + "/create")
|
||||||
|
@Operation(summary = "新增用户部门关系")
|
||||||
|
CommonResult<Long> createUserDept(@RequestBody UserDeptSaveReqDTO reqVO);
|
||||||
|
|
||||||
|
@PutMapping(PREFIX + "/update")
|
||||||
|
@Operation(summary = "修改用户部门关系")
|
||||||
|
CommonResult<Boolean> updateUserDept(@RequestBody UserDeptSaveReqDTO reqVO);
|
||||||
|
|
||||||
|
@DeleteMapping(PREFIX + "/delete")
|
||||||
|
@Operation(summary = "删除用户部门关系")
|
||||||
|
@Parameter(name = "id", description = "关系编号", example = "1", required = true)
|
||||||
|
CommonResult<Boolean> deleteUserDept(@RequestParam("id") Long id);
|
||||||
|
|
||||||
|
@GetMapping(PREFIX + "/get")
|
||||||
|
@Operation(summary = "通过ID查询用户部门关系")
|
||||||
|
@Parameter(name = "id", description = "关系编号", example = "1", required = true)
|
||||||
|
CommonResult<UserDeptRespDTO> getUserDept(@RequestParam("id") Long id);
|
||||||
|
|
||||||
|
@GetMapping(PREFIX + "/list-by-user-id")
|
||||||
|
@Operation(summary = "通过用户ID查询用户部门关系列表")
|
||||||
|
@Parameter(name = "userId", description = "用户编号", example = "1", required = true)
|
||||||
|
CommonResult<List<UserDeptRespDTO>> getUserDeptListByUserId(@RequestParam("userId") Long userId);
|
||||||
|
|
||||||
|
@GetMapping(PREFIX + "/list-by-dept-id")
|
||||||
|
@Operation(summary = "通过部门ID查询用户部门关系列表")
|
||||||
|
@Parameter(name = "deptId", description = "部门编号", example = "1", required = true)
|
||||||
|
CommonResult<List<UserDeptRespDTO>> getUserDeptListByDeptId(@RequestParam("deptId") Long deptId);
|
||||||
|
|
||||||
|
@DeleteMapping(PREFIX + "/delete-by-user-id")
|
||||||
|
@Operation(summary = "通过用户ID删除用户部门关系")
|
||||||
|
@Parameter(name = "userId", description = "用户编号", example = "1", required = true)
|
||||||
|
CommonResult<Boolean> deleteUserDeptByUserId(@RequestParam("userId") Long userId);
|
||||||
|
|
||||||
|
@DeleteMapping(PREFIX + "/delete-by-dept-id")
|
||||||
|
@Operation(summary = "通过部门ID删除用户部门关系")
|
||||||
|
@Parameter(name = "deptId", description = "部门编号", example = "1", required = true)
|
||||||
|
CommonResult<Boolean> deleteUserDeptByDeptId(@RequestParam("deptId") Long deptId);
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.zt.plat.module.system.api.userdept.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户部门关系 Response DTO
|
||||||
|
*
|
||||||
|
* @author ZT
|
||||||
|
*/
|
||||||
|
@Schema(description = "RPC 服务 - 用户部门关系 Response DTO")
|
||||||
|
@Data
|
||||||
|
public class UserDeptRespDTO {
|
||||||
|
|
||||||
|
@Schema(description = "关系编号", example = "1024")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "用户编号", example = "1")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
@Schema(description = "部门编号", example = "100")
|
||||||
|
private Long deptId;
|
||||||
|
|
||||||
|
@Schema(description = "备注", example = "主部门")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user