工作流模块提交
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.njcn.user.api;
|
||||
|
||||
import cn.hutool.core.lang.tree.Tree;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
@@ -160,4 +161,7 @@ public interface DeptFeignClient {
|
||||
*/
|
||||
@GetMapping("/getAllDept")
|
||||
HttpResult<List<Dept>> getAllDept();
|
||||
|
||||
@GetMapping("/orgTreeSelector")
|
||||
HttpResult<List<Tree<String>>> orgTreeSelector();
|
||||
}
|
||||
|
||||
@@ -1,16 +1,26 @@
|
||||
package com.njcn.user.api;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.user.api.fallback.UserFeignClientFallbackFactory;
|
||||
import com.njcn.user.pojo.dto.UserDTO;
|
||||
import com.njcn.user.pojo.po.User;
|
||||
import com.njcn.user.pojo.vo.UserVO;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -18,7 +28,7 @@ import java.util.List;
|
||||
* @version 1.0.0
|
||||
* @date 2021年05月08日 15:11
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.USER,path = "/user",fallbackFactory = UserFeignClientFallbackFactory.class,contextId = "user")
|
||||
@FeignClient(value = ServerInfo.USER, path = "/user", fallbackFactory = UserFeignClientFallbackFactory.class, contextId = "user")
|
||||
public interface UserFeignClient {
|
||||
|
||||
/**
|
||||
@@ -37,10 +47,11 @@ public interface UserFeignClient {
|
||||
* @return 用户基本信息
|
||||
*/
|
||||
@GetMapping("/getUserByPhone/{phone}")
|
||||
HttpResult<UserDTO> getUserByPhone(@PathVariable("phone")String phone);
|
||||
HttpResult<UserDTO> getUserByPhone(@PathVariable("phone") String phone);
|
||||
|
||||
/**
|
||||
* 认证后根据用户名判断用户状态
|
||||
*
|
||||
* @param loginName 登录名
|
||||
* @return 校验结果
|
||||
*/
|
||||
@@ -58,6 +69,7 @@ public interface UserFeignClient {
|
||||
|
||||
/**
|
||||
* 根据用户id集合查询用户信息
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@@ -66,10 +78,11 @@ public interface UserFeignClient {
|
||||
|
||||
@PostMapping("/appuserByIdList")
|
||||
@ApiImplicitParam(name = "ids", value = "用户id集合", required = true)
|
||||
HttpResult<List<User>> appuserByIdList(@RequestBody List<String> ids);
|
||||
HttpResult<List<User>> appuserByIdList(@RequestBody List<String> ids);
|
||||
|
||||
/**
|
||||
* 根据部门ids查询接收短信通知的用户信息
|
||||
*
|
||||
* @param deptId
|
||||
* @return
|
||||
*/
|
||||
@@ -78,14 +91,24 @@ public interface UserFeignClient {
|
||||
|
||||
/**
|
||||
* 根据部门ids查询用户信息
|
||||
*
|
||||
* @param deptId
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getUserInfoByDeptIds")
|
||||
HttpResult<List<User>> getUserInfoByDeptIds(@RequestBody List<String> deptId);
|
||||
|
||||
/**
|
||||
* 根据角色id查询用户id
|
||||
*
|
||||
* @param roleId 角色id集合
|
||||
*/
|
||||
@PostMapping("/getUserIdByRoleId")
|
||||
HttpResult<List<String>> getUserIdByRoleId(@RequestBody List<String> roleId);
|
||||
|
||||
/**
|
||||
* 根据角色Code集合查询用户信息
|
||||
*
|
||||
* @param roleCode
|
||||
* @return
|
||||
*/
|
||||
@@ -95,4 +118,7 @@ public interface UserFeignClient {
|
||||
@GetMapping("/getUserById")
|
||||
HttpResult<UserVO> getUserById(@RequestParam("id") String id);
|
||||
|
||||
@PostMapping("/getUserListByIds")
|
||||
HttpResult<List<User>> getUserListByIds(@RequestBody List<String> ids);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.njcn.user.api.fallback;
|
||||
|
||||
import cn.hutool.core.lang.tree.Tree;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
@@ -146,6 +147,12 @@ public class DeptFeignClientFallbackFactory implements FallbackFactory<DeptFeign
|
||||
log.error("{}异常,降级处理,异常为:{}","获取所有单位:",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<Tree<String>>> orgTreeSelector() {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取所有单位树:",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.njcn.user.api.fallback;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
@@ -86,6 +87,12 @@ public class UserFeignClientFallbackFactory implements FallbackFactory<UserFeign
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<String>> getUserIdByRoleId(List<String> roleId) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据角色ids查询用户id",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<User>> getUserListByRoleCode(String roleCode) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据角色Code集合查询用户信息",cause.toString());
|
||||
@@ -98,6 +105,11 @@ public class UserFeignClientFallbackFactory implements FallbackFactory<UserFeign
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<User>> getUserListByIds(List<String> ids) {
|
||||
log.error("{}异常,降级处理,异常为:{}","根据用户id集合获取用户集合",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user