新增OAuth2客户端用户调用功能,添加组织机构、职位、角色调用基础代码
This commit is contained in:
parent
11d910f6e3
commit
025114837e
@ -0,0 +1,45 @@
|
||||
package ink.wgink.login.oauth2.client.controller.apis.user;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.common.component.SecurityComponent;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.login.oauth2.client.service.user.IUserService;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
||||
* 当你想要放弃的时候,想想当初你为何开始
|
||||
*
|
||||
* @ClassName: UserController
|
||||
* @Description: 用户
|
||||
* @Author: WangGeng
|
||||
* @Date: 2021/1/24 17:10
|
||||
* @Version: 1.0
|
||||
**/
|
||||
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "用户")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.API_PREFIX + "/user")
|
||||
public class UserController extends DefaultBaseController {
|
||||
|
||||
@Autowired
|
||||
private IUserService userService;
|
||||
@Autowired
|
||||
private SecurityComponent securityComponent;
|
||||
|
||||
@ApiOperation(value = "获取密码状态", notes = "获取密码状态接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("get-password-status")
|
||||
public SuccessResultData<String> getPasswordStatus() {
|
||||
return userService.getPasswordStatus(securityComponent.getCurrentUser().getUserId());
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package ink.wgink.login.oauth2.client.remote.department;
|
||||
|
||||
import ink.wgink.annotation.rpc.rest.RemoteService;
|
||||
|
||||
/**
|
||||
* @ClassName: IDepartmentRemoteService
|
||||
* @Description: 组织部门调动
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/9/22 10:41 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@RemoteService("/resource/department")
|
||||
public interface IDepartmentRemoteService {
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package ink.wgink.login.oauth2.client.remote.department;
|
||||
|
||||
import ink.wgink.annotation.rpc.rest.RemoteService;
|
||||
|
||||
/**
|
||||
* @ClassName: IDepartmentUserRemoteService
|
||||
* @Description: 组织部门用户调用
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/9/22 10:42 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@RemoteService("/resource/department/user")
|
||||
public interface IDepartmentUserRemoteService {
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package ink.wgink.login.oauth2.client.remote.position;
|
||||
|
||||
import ink.wgink.annotation.rpc.rest.RemoteService;
|
||||
|
||||
/**
|
||||
* @ClassName: IPositionRemoteService
|
||||
* @Description: 职位调用
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/9/22 10:43 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@RemoteService("/resource/position")
|
||||
public interface IPositionRemoteService {
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package ink.wgink.login.oauth2.client.remote.position;
|
||||
|
||||
import ink.wgink.annotation.rpc.rest.RemoteService;
|
||||
|
||||
/**
|
||||
* @ClassName: IPositionUserRemoteService
|
||||
* @Description: 职位用户调用
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/9/22 10:44 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@RemoteService("/resource/position/user")
|
||||
public interface IPositionUserRemoteService {
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package ink.wgink.login.oauth2.client.remote.role;
|
||||
|
||||
import ink.wgink.annotation.rpc.rest.RemoteService;
|
||||
|
||||
/**
|
||||
* @ClassName: IRoleRemoteService
|
||||
* @Description: 角色调用
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/9/22 10:44 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@RemoteService("/resource/role")
|
||||
public interface IRoleRemoteService {
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package ink.wgink.login.oauth2.client.remote.role;
|
||||
|
||||
import ink.wgink.annotation.rpc.rest.RemoteService;
|
||||
|
||||
/**
|
||||
* @ClassName: IRoleUserRemoteService
|
||||
* @Description: 角色用户调用
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/9/22 10:45 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@RemoteService("/resource/role/user")
|
||||
public interface IRoleUserRemoteService {
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package ink.wgink.login.oauth2.client.remote.user;
|
||||
|
||||
import ink.wgink.annotation.rpc.rest.RemoteService;
|
||||
import ink.wgink.annotation.rpc.rest.method.RemoteGetMethod;
|
||||
import ink.wgink.annotation.rpc.rest.method.RemotePostMethod;
|
||||
import ink.wgink.annotation.rpc.rest.params.RemotePathParams;
|
||||
import ink.wgink.annotation.rpc.rest.params.RemoteQueryParams;
|
||||
import ink.wgink.annotation.rpc.rest.params.RemoteQueryParamsMap;
|
||||
import ink.wgink.annotation.rpc.rest.params.RemoteServerParams;
|
||||
import ink.wgink.pojo.dtos.user.UserDTO;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.pojo.vos.IdsVO;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: IUserRemoteService
|
||||
* @Description: 用户远程业务
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/9/22 5:30 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@RemoteService("/resource/user")
|
||||
public interface IUserRemoteService {
|
||||
|
||||
@RemoteGetMethod("/get/{userId}")
|
||||
UserDTO get(@RemoteServerParams String userCenter, @RemotePathParams("userId") String userId, @RemoteQueryParams("access_token") String accessToken);
|
||||
|
||||
@RemoteGetMethod("/get/username/{username}")
|
||||
UserDTO getByUsername(@RemoteServerParams String userCenter, @RemotePathParams("username") String username, @RemoteQueryParams("access_token") String accessToken);
|
||||
|
||||
@RemotePostMethod("/ids")
|
||||
List<UserDTO> listByIds(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RequestBody IdsVO idsVO);
|
||||
|
||||
@RemotePostMethod("/list/username")
|
||||
List<UserDTO> listByUsernames(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RequestBody IdsVO idsVO);
|
||||
|
||||
@RemoteGetMethod("/list")
|
||||
List<UserDTO> list(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteQueryParamsMap Map<String, Object> queryParamsMap);
|
||||
|
||||
@RemoteGetMethod("/listpage")
|
||||
SuccessResultList<List<UserDTO>> listPage(@RemoteServerParams String userCenter, @RemoteQueryParams("page") Integer page, @RemoteQueryParams("rows") Integer rows, @RemoteQueryParams("access_token") String accessToken, @RemoteQueryParamsMap Map<String, Object> queryParamsMap);
|
||||
|
||||
@RemoteGetMethod("/count-date-range/{startDate}/{endDate}")
|
||||
SuccessResultData<Integer> countDateRange(@RemoteServerParams String userCenter, @RemotePathParams("startDate") String startDate, @RemotePathParams("endDate") String endDate, @RemoteQueryParams("access_token") String accessToken);
|
||||
|
||||
@RemoteGetMethod("/count")
|
||||
SuccessResultData<Integer> count(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken);
|
||||
|
||||
@RemoteGetMethod("/count-type/{type}")
|
||||
SuccessResultData<Integer> countType(@RemoteServerParams String userCenter, @RemotePathParams("type") Integer type, @RemoteQueryParams("access_token") String accessToken);
|
||||
|
||||
@RemoteGetMethod("/count-error-type")
|
||||
SuccessResultData<Integer> countErrorType(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken);
|
||||
|
||||
@RemoteGetMethod("/count-state/{state}")
|
||||
SuccessResultData<Integer> countState(@RemoteServerParams String userCenter, @RemotePathParams("state") Integer state, @RemoteQueryParams("access_token") String accessToken);
|
||||
|
||||
@RemoteGetMethod("/get-password-status/{userId}")
|
||||
SuccessResultData<String> getPasswordStatus(@RemoteServerParams String userCenter, @RemotePathParams("userId") String userId, @RemoteQueryParams("access_token") String accessToken);
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package ink.wgink.login.oauth2.client.service.department;
|
||||
|
||||
import ink.wgink.interfaces.department.IDepartmentBaseService;
|
||||
|
||||
/**
|
||||
* @ClassName: IDepartmentService
|
||||
* @Description: 组织机构
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/9/22 10:30 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
public interface IDepartmentService extends IDepartmentBaseService {
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package ink.wgink.login.oauth2.client.service.department;
|
||||
|
||||
import ink.wgink.interfaces.department.IDepartmentUserBaseService;
|
||||
|
||||
/**
|
||||
* @ClassName: IDepartmentUserService
|
||||
* @Description: 组织机构用户
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/9/22 10:30 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
public interface IDepartmentUserService extends IDepartmentUserBaseService {
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
package ink.wgink.login.oauth2.client.service.department.impl;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.login.oauth2.client.remote.department.IDepartmentUserRemoteService;
|
||||
import ink.wgink.login.oauth2.client.service.department.IDepartmentService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||
import ink.wgink.pojo.dtos.department.DepartmentDTO;
|
||||
import ink.wgink.pojo.dtos.department.DepartmentSimpleDTO;
|
||||
import ink.wgink.pojo.pos.DepartmentPO;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.properties.ApiPathProperties;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: DepartmentServiceImpl
|
||||
* @Description: 组织部门
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/9/22 10:33 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Service
|
||||
public class DepartmentServiceImpl extends DefaultBaseService implements IDepartmentService {
|
||||
|
||||
@Autowired
|
||||
private IDepartmentUserRemoteService departmentUserRemoteService;
|
||||
@Autowired
|
||||
private ApiPathProperties apiPathProperties;
|
||||
|
||||
@Override
|
||||
public List<DepartmentDTO> list(Map<String, Object> params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DepartmentDTO get(String departmentId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<DepartmentDTO>> listPage(ListPage page) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<DepartmentDTO>> listPageByParentId(String departmentParentId, ListPage page) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DepartmentDTO> listAll(Map<String, Object> params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZTreeDTO> listZTree(Map<String, Object> params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZTreeDTO> listZTree(String departmentParentId, Map<String, Object> params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> listId(Map<String, Object> params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> listRootId(List<DepartmentSimpleDTO> departmentSimpleDTOs) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DepartmentSimpleDTO getHigherLevel(DepartmentSimpleDTO departmentSimpleDTO1, DepartmentSimpleDTO departmentSimpleDTO2) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer count(Map<String, Object> params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DepartmentPO getPO(String departmentId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DepartmentPO> listPO(Map<String, Object> params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DepartmentPO> listPO(List<String> departmentIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DepartmentPO> listByParentId(String departmentParentId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DepartmentPO> listByParentIdAndAddDate(String departmentParentId, String addDate) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DepartmentPO> listByParentIdAndUpdateDate(String departmentParentId, String updateDate) {
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package ink.wgink.login.oauth2.client.service.department.impl;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.login.oauth2.client.remote.department.IDepartmentUserRemoteService;
|
||||
import ink.wgink.login.oauth2.client.service.department.IDepartmentUserService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.department.DepartmentUserDTO;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.properties.ApiPathProperties;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: DepartmentUserServiceImpl
|
||||
* @Description: 组织机构用户
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/9/22 10:33 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Service
|
||||
public class DepartmentUserServiceImpl extends DefaultBaseService implements IDepartmentUserService {
|
||||
|
||||
@Autowired
|
||||
private IDepartmentUserRemoteService departmentUserRemoteService;
|
||||
@Autowired
|
||||
private ApiPathProperties apiPathProperties;
|
||||
|
||||
@Override
|
||||
public List<DepartmentUserDTO> list(Map<String, Object> params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DepartmentUserDTO> list(String departmentId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DepartmentUserDTO> list(List<String> departmentIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> listUserId(String departmentId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> listUserId(List<String> departmentIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> listUserId(String departmentId, List<String> userIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> listUserId(List<String> departmentIds, List<String> userIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<DepartmentUserDTO>> listPage(String departmentId, ListPage page) {
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package ink.wgink.login.oauth2.client.service.position;
|
||||
|
||||
import ink.wgink.interfaces.position.IPositionBaseService;
|
||||
|
||||
/**
|
||||
* @ClassName: IPositionService
|
||||
* @Description: 职位
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/9/22 10:32 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
public interface IPositionService extends IPositionBaseService {
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package ink.wgink.login.oauth2.client.service.position;
|
||||
|
||||
import ink.wgink.interfaces.position.IPositionUserBaseService;
|
||||
|
||||
/**
|
||||
* @ClassName: IPositionUserService
|
||||
* @Description: 职位用户
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/9/22 10:32 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
public interface IPositionUserService extends IPositionUserBaseService {
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
package ink.wgink.login.oauth2.client.service.position.impl;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.login.oauth2.client.remote.position.IPositionRemoteService;
|
||||
import ink.wgink.login.oauth2.client.service.position.IPositionService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||
import ink.wgink.pojo.dtos.position.PositionDTO;
|
||||
import ink.wgink.pojo.pos.PositionPO;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.properties.ApiPathProperties;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: PositionServiceImpl
|
||||
* @Description: 职位
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/9/22 10:36 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Service
|
||||
public class PositionServiceImpl extends DefaultBaseService implements IPositionService {
|
||||
|
||||
@Autowired
|
||||
private IPositionRemoteService positionRemoteService;
|
||||
@Autowired
|
||||
private ApiPathProperties apiPathProperties;
|
||||
|
||||
@Override
|
||||
public List<PositionDTO> listAllByParentId(String groupParentId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionDTO> listAll(Map<String, Object> params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PositionDTO get(Map<String, Object> params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PositionDTO get(String positionId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZTreeDTO> listZTree(Map<String, Object> params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<PositionDTO>> listPage(ListPage page) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionDTO> list(Map<String, Object> params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionDTO> list(List<String> groupIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionPO> listPO(Map<String, Object> params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionPO> listPO(List<String> positionIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer count(Map<String, Object> params) {
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package ink.wgink.login.oauth2.client.service.position.impl;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.login.oauth2.client.remote.position.IPositionUserRemoteService;
|
||||
import ink.wgink.login.oauth2.client.service.position.IPositionUserService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.position.PositionSimpleDTO;
|
||||
import ink.wgink.pojo.dtos.position.PositionUserDTO;
|
||||
import ink.wgink.pojo.pos.PositionPO;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.properties.ApiPathProperties;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName: PositionUserServiceImpl
|
||||
* @Description: 职位用户
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/9/22 10:37 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Service
|
||||
public class PositionUserServiceImpl extends DefaultBaseService implements IPositionUserService {
|
||||
|
||||
@Autowired
|
||||
private IPositionUserRemoteService positionUserRemoteService;
|
||||
@Autowired
|
||||
private ApiPathProperties apiPathProperties;
|
||||
|
||||
@Override
|
||||
public List<String> listUserId(String positionId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> listUserId(List<String> positionIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<PositionUserDTO>> listPage(String positionId, ListPage page) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionPO> listPositionPOByUserId(String userId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionPO> listPositionPOByUserIds(List<String> userIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionSimpleDTO> listSimple(List<PositionPO> positionPOs) {
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package ink.wgink.login.oauth2.client.service.role;
|
||||
|
||||
import ink.wgink.interfaces.role.IRoleBaseService;
|
||||
|
||||
/**
|
||||
* @ClassName: IRoleService
|
||||
* @Description: 角色
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/9/22 10:31 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
public interface IRoleService extends IRoleBaseService {
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package ink.wgink.login.oauth2.client.service.role;
|
||||
|
||||
import ink.wgink.interfaces.role.IRoleUserBaseService;
|
||||
|
||||
/**
|
||||
* @ClassName: IRoleUserService
|
||||
* @Description: 角色用户
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/9/22 10:31 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
public interface IRoleUserService extends IRoleUserBaseService {
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
package ink.wgink.login.oauth2.client.service.role.impl;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.login.oauth2.client.remote.role.IRoleRemoteService;
|
||||
import ink.wgink.login.oauth2.client.service.role.IRoleService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.ZTreeDTO;
|
||||
import ink.wgink.pojo.dtos.role.RoleDTO;
|
||||
import ink.wgink.pojo.pos.RolePO;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.properties.ApiPathProperties;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: RoleServiceImpl
|
||||
* @Description: 角色
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/9/22 10:35 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Service
|
||||
public class RoleServiceImpl extends DefaultBaseService implements IRoleService {
|
||||
|
||||
@Autowired
|
||||
private IRoleRemoteService roleRemoteService;
|
||||
@Autowired
|
||||
private ApiPathProperties apiPathProperties;
|
||||
|
||||
@Override
|
||||
public RoleDTO get(Map<String, Object> params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RoleDTO get(String roleId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RoleDTO> list(Map<String, Object> params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RolePO> listPO(Map<String, Object> params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RolePO> listPO(List<String> roleIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RoleDTO> listAll(Map<String, Object> params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZTreeDTO> listZTree(Map<String, Object> params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<RoleDTO>> listPage(ListPage page) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer count(Map<String, Object> params) {
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package ink.wgink.login.oauth2.client.service.role.impl;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.login.oauth2.client.remote.role.IRoleUserRemoteService;
|
||||
import ink.wgink.login.oauth2.client.service.role.IRoleUserService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.role.RoleSimpleDTO;
|
||||
import ink.wgink.pojo.dtos.role.RoleUserDTO;
|
||||
import ink.wgink.pojo.pos.RolePO;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.properties.ApiPathProperties;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName: RoleUserServiceImpl
|
||||
* @Description: 角色用户
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/9/22 10:35 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Service
|
||||
public class RoleUserServiceImpl extends DefaultBaseService implements IRoleUserService {
|
||||
|
||||
@Autowired
|
||||
private IRoleUserRemoteService roleUserRemoteService;
|
||||
@Autowired
|
||||
private ApiPathProperties apiPathProperties;
|
||||
|
||||
@Override
|
||||
public List<String> listUserId(String roleId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> listUserId(List<String> roleIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<RoleUserDTO>> listPage(String roleId, ListPage page) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RolePO> listRolePOByUserId(String userId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RoleSimpleDTO> listSimple(List<RolePO> rolePOs) {
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package ink.wgink.login.oauth2.client.service.user;
|
||||
|
||||
import ink.wgink.interfaces.user.IUserBaseService;
|
||||
|
||||
/**
|
||||
* @ClassName: IUserService
|
||||
* @Description: 用户业务
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/9/22 5:31 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
public interface IUserService extends IUserBaseService {
|
||||
}
|
@ -0,0 +1,129 @@
|
||||
package ink.wgink.login.oauth2.client.service.user.impl;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.exceptions.base.SystemException;
|
||||
import ink.wgink.login.oauth2.client.remote.user.IUserRemoteService;
|
||||
import ink.wgink.login.oauth2.client.service.user.IUserService;
|
||||
import ink.wgink.module.oauth2.manager.OAuth2ClientTokenManager;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.user.UserDTO;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.pojo.vos.IdsVO;
|
||||
import ink.wgink.properties.ApiPathProperties;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: UserServiceImpl
|
||||
* @Description: 用户业务
|
||||
* @Author: wanggeng
|
||||
* @Date: 2021/9/22 5:32 下午
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Service
|
||||
public class UserServiceImpl extends DefaultBaseService implements IUserService {
|
||||
|
||||
@Autowired
|
||||
private IUserRemoteService userRemoteService;
|
||||
@Autowired
|
||||
private ApiPathProperties apiPathProperties;
|
||||
|
||||
@Override
|
||||
public UserDTO get(String userId) {
|
||||
return userRemoteService.get(apiPathProperties.getUserCenter(), userId, OAuth2ClientTokenManager.getInstance().getAccessToken().getAccessToken());
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserDTO getByUsername(String username) {
|
||||
return userRemoteService.getByUsername(apiPathProperties.getUserCenter(), username, OAuth2ClientTokenManager.getInstance().getAccessToken().getAccessToken());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserDTO> listByUserIds(List<String> userIds) {
|
||||
IdsVO idsVO = new IdsVO();
|
||||
idsVO.setIds(userIds);
|
||||
return userRemoteService.listByIds(apiPathProperties.getUserCenter(), OAuth2ClientTokenManager.getInstance().getAccessToken().getAccessToken(), idsVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserDTO> listByUsernames(List<String> usernames) {
|
||||
IdsVO idsVO = new IdsVO();
|
||||
idsVO.setIds(usernames);
|
||||
return userRemoteService.listByUsernames(apiPathProperties.getUserCenter(), OAuth2ClientTokenManager.getInstance().getAccessToken().getAccessToken(), idsVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserDTO> list(Map<String, Object> params) {
|
||||
return userRemoteService.list(apiPathProperties.getUserCenter(), OAuth2ClientTokenManager.getInstance().getAccessToken().getAccessToken(), params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<UserDTO>> listPage(ListPage page) {
|
||||
return userRemoteService.listPage(apiPathProperties.getUserCenter(), page.getPage(), page.getRows(), OAuth2ClientTokenManager.getInstance().getAccessToken().getAccessToken(), page.getParams());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<UserDTO>> listPageByIds(List<String> userIds, ListPage page) {
|
||||
page.getParams().put("userIds", userIds);
|
||||
return userRemoteService.listPage(apiPathProperties.getUserCenter(), page.getPage(), page.getRows(), OAuth2ClientTokenManager.getInstance().getAccessToken().getAccessToken(), page.getParams());
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<UserDTO>> listPageByExcludeIds(List<String> excludeUserIds, ListPage page) {
|
||||
page.getParams().put("excludeUserIds", excludeUserIds);
|
||||
return userRemoteService.listPage(apiPathProperties.getUserCenter(), page.getPage(), page.getRows(), OAuth2ClientTokenManager.getInstance().getAccessToken().getAccessToken(), page.getParams());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int countDateRange(String startDate, String endDate) {
|
||||
SuccessResultData<Integer> successResultData = userRemoteService.countDateRange(apiPathProperties.getUserCenter(), startDate, endDate, OAuth2ClientTokenManager.getInstance().getAccessToken().getAccessToken());
|
||||
return successResultData.getData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int count() {
|
||||
SuccessResultData<Integer> successResultData = userRemoteService.count(apiPathProperties.getUserCenter(), OAuth2ClientTokenManager.getInstance().getAccessToken().getAccessToken());
|
||||
return successResultData.getData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int countType(int userType) {
|
||||
SuccessResultData<Integer> successResultData = userRemoteService.countType(apiPathProperties.getUserCenter(), userType, OAuth2ClientTokenManager.getInstance().getAccessToken().getAccessToken());
|
||||
return successResultData.getData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int countErrorType() {
|
||||
SuccessResultData<Integer> successResultData = userRemoteService.countErrorType(apiPathProperties.getUserCenter(), OAuth2ClientTokenManager.getInstance().getAccessToken().getAccessToken());
|
||||
return successResultData.getData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer countState(int userState) {
|
||||
SuccessResultData<Integer> successResultData = userRemoteService.countState(apiPathProperties.getUserCenter(), userState, OAuth2ClientTokenManager.getInstance().getAccessToken().getAccessToken());
|
||||
return successResultData.getData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultData<String> getPasswordStatus(String userId) {
|
||||
return userRemoteService.getPasswordStatus(apiPathProperties.getUserCenter(), userId, OAuth2ClientTokenManager.getInstance().getAccessToken().getAccessToken());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserDTO> listByKeywords(String keywords) {
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
try {
|
||||
params.put("keywords", URLEncoder.encode(keywords, "UTF-8"));
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
throw new SystemException("编码异常");
|
||||
}
|
||||
return list(params);
|
||||
}
|
||||
|
||||
}
|
@ -88,8 +88,7 @@
|
||||
<div id="sideMenu" class="layui-side layui-side-menu layui-side-menu-hidden">
|
||||
<div class="layui-side-scroll">
|
||||
<div class="layui-logo">
|
||||
<img th:src="'route/file/download/true/'+ ${systemShortLogo}" style="width: 32px; height: 32px;" th:if="${systemShortLogo ne ''}">
|
||||
<span th:text="${systemShortTitle}" style="font-weight: bold;"></span>
|
||||
<span th:text="${systemTitle}" style="font-weight: bold;"></span>
|
||||
</div>
|
||||
|
||||
<ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
|
||||
|
Loading…
Reference in New Issue
Block a user