feat: 更改字段类型
This commit is contained in:
@@ -13,5 +13,5 @@ public interface SchisandraAuthFeignService {
|
|||||||
Boolean wechatRegister(@RequestParam(name = "appId") String appId, @RequestParam(name = "openId") String openId, @RequestParam("clientId") String clientId);
|
Boolean wechatRegister(@RequestParam(name = "appId") String appId, @RequestParam(name = "openId") String openId, @RequestParam("clientId") String clientId);
|
||||||
|
|
||||||
@GetMapping("/auth/user/getUserInfo")
|
@GetMapping("/auth/user/getUserInfo")
|
||||||
Result<SchisandraAuthUserDTO> getUserInfo(@RequestParam("userId") Long userId);
|
Result<SchisandraAuthUserDTO> getUserInfo(@RequestParam("userId") String userId);
|
||||||
}
|
}
|
||||||
|
@@ -128,7 +128,7 @@ public class SchisandraAuthPermissionController {
|
|||||||
* @date: 2024/7/8 下午4:09
|
* @date: 2024/7/8 下午4:09
|
||||||
*/
|
*/
|
||||||
@GetMapping("selectUserPermission")
|
@GetMapping("selectUserPermission")
|
||||||
public Result<Object> selectUserPermission(@RequestParam("userId") Long userId) {
|
public Result<Object> selectUserPermission(@RequestParam("userId") String userId) {
|
||||||
if (userId == null) {
|
if (userId == null) {
|
||||||
return Result.fail("userId不能为空");
|
return Result.fail("userId不能为空");
|
||||||
}
|
}
|
||||||
|
@@ -100,7 +100,7 @@ public class SchisandraAuthRoleController {
|
|||||||
* @date 2024/4/3 22:12
|
* @date 2024/4/3 22:12
|
||||||
*/
|
*/
|
||||||
@GetMapping("delete/{id}")
|
@GetMapping("delete/{id}")
|
||||||
public Result delete(@PathVariable Long id){
|
public Result delete(@PathVariable String id){
|
||||||
try{
|
try{
|
||||||
if(log.isInfoEnabled()){
|
if(log.isInfoEnabled()){
|
||||||
log.info("RoleController.insert.dto:{}",id);
|
log.info("RoleController.insert.dto:{}",id);
|
||||||
|
@@ -249,9 +249,9 @@ public class SchisandraAuthUserController {
|
|||||||
* @author: landaiqing
|
* @author: landaiqing
|
||||||
* @date: 2024/6/2 0:37
|
* @date: 2024/6/2 0:37
|
||||||
*/
|
*/
|
||||||
private void userInfoPersistence(Long authUserId) {
|
private void userInfoPersistence(String authUserId) {
|
||||||
// 查询用户角色并存入redis
|
// 查询用户角色并存入redis
|
||||||
SchisandraAuthRole schisandraAuthRole = schisandraAuthRoleDomainService.queryByRoleId(UserRoleEnum.NORMAL_USER.getCode());
|
SchisandraAuthRole schisandraAuthRole = schisandraAuthRoleDomainService.queryByRoleId(String.valueOf(UserRoleEnum.NORMAL_USER.getCode()));
|
||||||
String roleKey = redisUtil.buildKey(AUTH_ROLE_PREFIX, String.valueOf(authUserId));
|
String roleKey = redisUtil.buildKey(AUTH_ROLE_PREFIX, String.valueOf(authUserId));
|
||||||
List<SchisandraAuthRole> roleList = new LinkedList<>();
|
List<SchisandraAuthRole> roleList = new LinkedList<>();
|
||||||
roleList.add(schisandraAuthRole);
|
roleList.add(schisandraAuthRole);
|
||||||
@@ -259,10 +259,10 @@ public class SchisandraAuthUserController {
|
|||||||
|
|
||||||
// 查询用户权限并存入redis
|
// 查询用户权限并存入redis
|
||||||
SchisandraAuthRolePermissionDTO schisandraAuthRolePermission = new SchisandraAuthRolePermissionDTO();
|
SchisandraAuthRolePermissionDTO schisandraAuthRolePermission = new SchisandraAuthRolePermissionDTO();
|
||||||
schisandraAuthRolePermission.setRoleId(UserRoleEnum.NORMAL_USER.getCode());
|
schisandraAuthRolePermission.setRoleId(String.valueOf(UserRoleEnum.NORMAL_USER.getCode()));
|
||||||
SchisandraAuthRolePermissionBO schisandraAuthRolePermissionBO = SchisandraAuthRolePermissionDTOConverter.INSTANCE.convertDTOToBO(schisandraAuthRolePermission);
|
SchisandraAuthRolePermissionBO schisandraAuthRolePermissionBO = SchisandraAuthRolePermissionDTOConverter.INSTANCE.convertDTOToBO(schisandraAuthRolePermission);
|
||||||
List<SchisandraAuthRolePermissionBO> rolePermissionList = schisandraAuthRolePermissionDomainService.queryByRoleId(schisandraAuthRolePermissionBO);
|
List<SchisandraAuthRolePermissionBO> rolePermissionList = schisandraAuthRolePermissionDomainService.queryByRoleId(schisandraAuthRolePermissionBO);
|
||||||
List<Long> permissionIdList = rolePermissionList.stream()
|
List<String> permissionIdList = rolePermissionList.stream()
|
||||||
.map(SchisandraAuthRolePermissionBO::getPermissionId).collect(Collectors.toList());
|
.map(SchisandraAuthRolePermissionBO::getPermissionId).collect(Collectors.toList());
|
||||||
List<SchisandraAuthPermission> permissionList = schisandraAuthPermissionDomainService.queryListByIds(permissionIdList);
|
List<SchisandraAuthPermission> permissionList = schisandraAuthPermissionDomainService.queryListByIds(permissionIdList);
|
||||||
String permissionKey = redisUtil.buildKey(AUTH_PERMISSION_PREFIX, String.valueOf(authUserId));
|
String permissionKey = redisUtil.buildKey(AUTH_PERMISSION_PREFIX, String.valueOf(authUserId));
|
||||||
@@ -382,7 +382,7 @@ public class SchisandraAuthUserController {
|
|||||||
* @date: 2024/7/11 9:39
|
* @date: 2024/7/11 9:39
|
||||||
*/
|
*/
|
||||||
@GetMapping("getUserInfo")
|
@GetMapping("getUserInfo")
|
||||||
public Result<SchisandraAuthUserDTO> getUserInfo(@RequestParam("userId") Long userId) {
|
public Result<SchisandraAuthUserDTO> getUserInfo(@RequestParam("userId") String userId) {
|
||||||
SchisandraAuthUserDTO schisandraAuthUserDTO = SchisandraAuthUserDTOConverter.INSTANCE.convertBOToDTO(schisandraAuthUserDomainService.queryById(userId));
|
SchisandraAuthUserDTO schisandraAuthUserDTO = SchisandraAuthUserDTOConverter.INSTANCE.convertBOToDTO(schisandraAuthUserDomainService.queryById(userId));
|
||||||
if ( schisandraAuthUserDTO== null) {
|
if ( schisandraAuthUserDTO== null) {
|
||||||
return Result.fail("该用户不存在");
|
return Result.fail("该用户不存在");
|
||||||
|
@@ -16,7 +16,7 @@ public class SchisandraAuthPermissionDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 主键id
|
* 主键id
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
/**
|
/**
|
||||||
* 权限名称
|
* 权限名称
|
||||||
*/
|
*/
|
||||||
@@ -24,7 +24,7 @@ public class SchisandraAuthPermissionDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 权限父id
|
* 权限父id
|
||||||
*/
|
*/
|
||||||
private Long parentId;
|
private String parentId;
|
||||||
/**
|
/**
|
||||||
* 权限类型
|
* 权限类型
|
||||||
*/
|
*/
|
||||||
|
@@ -20,7 +20,7 @@ public class SchisandraAuthRoleDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色名称
|
* 角色名称
|
||||||
|
@@ -17,17 +17,17 @@ public class SchisandraAuthRolePermissionDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色id
|
* 角色id
|
||||||
*/
|
*/
|
||||||
private Long roleId;
|
private String roleId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 权限id
|
* 权限id
|
||||||
*/
|
*/
|
||||||
private Long permissionId;
|
private String permissionId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
|
@@ -17,7 +17,7 @@ public class SchisandraAuthUserDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
/**
|
/**
|
||||||
* 用户名
|
* 用户名
|
||||||
*/
|
*/
|
||||||
|
@@ -17,17 +17,17 @@ public class SchisandraAuthUserRoleDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户id
|
* 用户id
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色id
|
* 角色id
|
||||||
*/
|
*/
|
||||||
private Long roleId;
|
private String roleId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
|
@@ -17,17 +17,17 @@ public class SchisandraSocialUserAuthDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long socialUserId;
|
private String socialUserId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
|
@@ -17,7 +17,7 @@ public class SchisandraSocialUserDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 第三方系统的唯一ID
|
* 第三方系统的唯一ID
|
||||||
|
@@ -18,11 +18,11 @@ SchisandraAuthPermissionBO implements Serializable {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
private Long parentId;
|
private String parentId;
|
||||||
|
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@ public class SchisandraAuthRoleBO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色名称
|
* 角色名称
|
||||||
|
@@ -17,17 +17,17 @@ public class SchisandraAuthRolePermissionBO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long roleId;
|
private String roleId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long permissionId;
|
private String permissionId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
|
@@ -17,7 +17,7 @@ public class SchisandraAuthUserBO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@@ -17,17 +17,17 @@ public class SchisandraAuthUserRoleBO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long roleId;
|
private String roleId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
|
@@ -16,17 +16,17 @@ public class SchisandraSocialUserAuthBO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long socialUserId;
|
private String socialUserId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
|
@@ -16,7 +16,7 @@ public class SchisandraSocialUserBO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 第三方系统的唯一ID
|
* 第三方系统的唯一ID
|
||||||
|
@@ -11,11 +11,11 @@ import java.util.List;
|
|||||||
|
|
||||||
public interface SchisandraAuthPermissionDomainService {
|
public interface SchisandraAuthPermissionDomainService {
|
||||||
|
|
||||||
Result<Object> selectUserPermissionTree(Long userId);
|
Result<Object> selectUserPermissionTree(String userId);
|
||||||
int update(SchisandraAuthPermissionBO schisandraAuthPermissionBO);
|
int update(SchisandraAuthPermissionBO schisandraAuthPermissionBO);
|
||||||
Object delete(SchisandraAuthPermissionBO schisandraAuthPermissionBO);
|
Object delete(SchisandraAuthPermissionBO schisandraAuthPermissionBO);
|
||||||
Object insert(SchisandraAuthPermissionBO schisandraAuthPermissionBO);
|
Object insert(SchisandraAuthPermissionBO schisandraAuthPermissionBO);
|
||||||
SchisandraAuthPermissionBO select(SchisandraAuthPermissionBO schisandraAuthPermissionBO);
|
SchisandraAuthPermissionBO select(SchisandraAuthPermissionBO schisandraAuthPermissionBO);
|
||||||
|
|
||||||
List<SchisandraAuthPermission> queryListByIds(List<Long> permissionIdList);
|
List<SchisandraAuthPermission> queryListByIds(List<String> permissionIdList);
|
||||||
}
|
}
|
||||||
|
@@ -30,7 +30,7 @@ public interface SchisandraAuthRoleDomainService {
|
|||||||
*@Date 2024/4/4
|
*@Date 2024/4/4
|
||||||
*@Time 21:03
|
*@Time 21:03
|
||||||
*/
|
*/
|
||||||
Object delete(Long id);
|
Object delete(String id);
|
||||||
|
|
||||||
/***
|
/***
|
||||||
*@ClassName: SchisandraAuthRoleDomainService
|
*@ClassName: SchisandraAuthRoleDomainService
|
||||||
@@ -52,5 +52,5 @@ public interface SchisandraAuthRoleDomainService {
|
|||||||
|
|
||||||
Object select(SchisandraAuthRoleBO schisandraAuthRoleBO);
|
Object select(SchisandraAuthRoleBO schisandraAuthRoleBO);
|
||||||
|
|
||||||
SchisandraAuthRole queryByRoleId(Long code);
|
SchisandraAuthRole queryByRoleId(String code);
|
||||||
}
|
}
|
||||||
|
@@ -85,7 +85,7 @@ public interface SchisandraAuthUserDomainService {
|
|||||||
* @date: 2024/5/26 17:27
|
* @date: 2024/5/26 17:27
|
||||||
*/
|
*/
|
||||||
@Cacheable(value = "userInfo", key = "#userId")
|
@Cacheable(value = "userInfo", key = "#userId")
|
||||||
SchisandraAuthUserBO queryById(Long userId);
|
SchisandraAuthUserBO queryById(String userId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param schisandraAuthUserBO
|
* @param schisandraAuthUserBO
|
||||||
@@ -102,7 +102,7 @@ public interface SchisandraAuthUserDomainService {
|
|||||||
* @author msz
|
* @author msz
|
||||||
*/
|
*/
|
||||||
@CacheEvict(value = "userInfo",key = "id")
|
@CacheEvict(value = "userInfo",key = "id")
|
||||||
Object deleteById(Long id);
|
Object deleteById(String id);
|
||||||
|
|
||||||
SchisandraAuthUser queryByPhone(String phone);
|
SchisandraAuthUser queryByPhone(String phone);
|
||||||
|
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
package com.schisandra.auth.domain.service.impl;
|
package com.schisandra.auth.domain.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.schisandra.auth.common.entity.Result;
|
import com.schisandra.auth.common.entity.Result;
|
||||||
import com.schisandra.auth.domain.bo.SchisandraAuthPermissionBO;
|
import com.schisandra.auth.domain.bo.SchisandraAuthPermissionBO;
|
||||||
import com.schisandra.auth.domain.convert.SchisandraAuthPermissionBOConverter;
|
import com.schisandra.auth.domain.convert.SchisandraAuthPermissionBOConverter;
|
||||||
@@ -15,7 +14,9 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -38,8 +39,7 @@ public class SchisandraAuthPermissionDomainServiceImpl implements SchisandraAuth
|
|||||||
});
|
});
|
||||||
if (schisandraAuthPermissions1.size() == 0) {
|
if (schisandraAuthPermissions1.size() == 0) {
|
||||||
selectTreeList1.add(e);
|
selectTreeList1.add(e);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
List<Object> list1 = selectTree(schisandraAuthPermissions, schisandraAuthPermissions1);
|
List<Object> list1 = selectTree(schisandraAuthPermissions, schisandraAuthPermissions1);
|
||||||
e.setRoutes(list1);
|
e.setRoutes(list1);
|
||||||
selectTreeList1.add(e);
|
selectTreeList1.add(e);
|
||||||
@@ -49,12 +49,12 @@ public class SchisandraAuthPermissionDomainServiceImpl implements SchisandraAuth
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result<Object> selectUserPermissionTree(Long userId) {
|
public Result<Object> selectUserPermissionTree(String userId) {
|
||||||
SchisandraAuthUserRole schisandraAuthRole = schisandraAuthUserRoleService.queryById(userId);
|
SchisandraAuthUserRole schisandraAuthRole = schisandraAuthUserRoleService.queryById(userId);
|
||||||
if (schisandraAuthRole == null || schisandraAuthRole.getRoleId() == null) {
|
if (schisandraAuthRole == null || schisandraAuthRole.getRoleId() == null) {
|
||||||
return Result.fail("用户没有角色");
|
return Result.fail("用户没有角色");
|
||||||
}
|
}
|
||||||
List<SchisandraAuthRolePermission> schisandraAuthRolePermissions = schisandraAuthRolePermissionService.queryByRoleId(schisandraAuthRole.getRoleId());
|
List<SchisandraAuthRolePermission> schisandraAuthRolePermissions = schisandraAuthRolePermissionService.queryByRoleId(Long.valueOf(schisandraAuthRole.getRoleId()));
|
||||||
if (schisandraAuthRolePermissions.size() == 0) {
|
if (schisandraAuthRolePermissions.size() == 0) {
|
||||||
return Result.fail("当前角色用户没有权限");
|
return Result.fail("当前角色用户没有权限");
|
||||||
}
|
}
|
||||||
@@ -65,7 +65,7 @@ public class SchisandraAuthPermissionDomainServiceImpl implements SchisandraAuth
|
|||||||
});
|
});
|
||||||
|
|
||||||
schisandraAuthPermissions.forEach(e -> {
|
schisandraAuthPermissions.forEach(e -> {
|
||||||
if (e.getParentId()==0){
|
if (Long.parseLong(e.getParentId()) == 0) {
|
||||||
schisandraAuthPermissionParents.add(e);
|
schisandraAuthPermissionParents.add(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -98,7 +98,7 @@ public class SchisandraAuthPermissionDomainServiceImpl implements SchisandraAuth
|
|||||||
@Override
|
@Override
|
||||||
public Object delete(SchisandraAuthPermissionBO schisandraAuthPermissionBO) {
|
public Object delete(SchisandraAuthPermissionBO schisandraAuthPermissionBO) {
|
||||||
SchisandraAuthPermission schisandraAuthPermission = SchisandraAuthPermissionBOConverter.INSTANCE.convertBOToEntity(schisandraAuthPermissionBO);
|
SchisandraAuthPermission schisandraAuthPermission = SchisandraAuthPermissionBOConverter.INSTANCE.convertBOToEntity(schisandraAuthPermissionBO);
|
||||||
boolean schisandraAuthPermission1 = schisandraAuthPermissionService.deleteById(schisandraAuthPermission.getId());
|
boolean schisandraAuthPermission1 = schisandraAuthPermissionService.deleteById(Long.valueOf(schisandraAuthPermission.getId()));
|
||||||
return schisandraAuthPermission1;
|
return schisandraAuthPermission1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,7 +134,7 @@ public class SchisandraAuthPermissionDomainServiceImpl implements SchisandraAuth
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SchisandraAuthPermission> queryListByIds(List<Long> permissionIdList) {
|
public List<SchisandraAuthPermission> queryListByIds(List<String> permissionIdList) {
|
||||||
return schisandraAuthPermissionService.queryListByIds(permissionIdList);
|
return schisandraAuthPermissionService.queryListByIds(permissionIdList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -33,7 +33,7 @@ public class SchisandraAuthRoleDomainServiceImpl implements SchisandraAuthRoleDo
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object delete(Long id) {
|
public Object delete(String id) {
|
||||||
boolean isDeleted = schisandraAuthRoleService.deleteById(id);
|
boolean isDeleted = schisandraAuthRoleService.deleteById(id);
|
||||||
return isDeleted;
|
return isDeleted;
|
||||||
}
|
}
|
||||||
@@ -55,7 +55,7 @@ public class SchisandraAuthRoleDomainServiceImpl implements SchisandraAuthRoleDo
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SchisandraAuthRole queryByRoleId(Long code) {
|
public SchisandraAuthRole queryByRoleId(String code) {
|
||||||
return schisandraAuthRoleService.queryByRoleId(code);
|
return schisandraAuthRoleService.queryByRoleId(code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -50,7 +50,7 @@ public class SchisandraAuthRolePermissionDomainServiceImpl implements Schisandra
|
|||||||
@Override
|
@Override
|
||||||
public List<SchisandraAuthRolePermissionBO> queryByRoleId(SchisandraAuthRolePermissionBO schisandraAuthRolePermissionBO) {
|
public List<SchisandraAuthRolePermissionBO> queryByRoleId(SchisandraAuthRolePermissionBO schisandraAuthRolePermissionBO) {
|
||||||
SchisandraAuthRolePermission schisandraAuthRolePermission = SchisandraAuthRolePermissionBOConverter.INSTANCE.convertBOToEntity(schisandraAuthRolePermissionBO);
|
SchisandraAuthRolePermission schisandraAuthRolePermission = SchisandraAuthRolePermissionBOConverter.INSTANCE.convertBOToEntity(schisandraAuthRolePermissionBO);
|
||||||
List<SchisandraAuthRolePermission> schisandraAuthRolePermissions = schisandraAuthRolePermissionService.queryByRoleId(schisandraAuthRolePermission.getRoleId());
|
List<SchisandraAuthRolePermission> schisandraAuthRolePermissions = schisandraAuthRolePermissionService.queryByRoleId(Long.valueOf(schisandraAuthRolePermission.getRoleId()));
|
||||||
List<SchisandraAuthRolePermissionBO> schisandraAuthRolePermissionBOS = SchisandraAuthRolePermissionBOConverter.INSTANCE.convertEntityToBOList(schisandraAuthRolePermissions);
|
List<SchisandraAuthRolePermissionBO> schisandraAuthRolePermissionBOS = SchisandraAuthRolePermissionBOConverter.INSTANCE.convertEntityToBOList(schisandraAuthRolePermissions);
|
||||||
return schisandraAuthRolePermissionBOS;
|
return schisandraAuthRolePermissionBOS;
|
||||||
}
|
}
|
||||||
|
@@ -99,7 +99,7 @@ public class SchisandraAuthUserDomainServiceImpl implements SchisandraAuthUserDo
|
|||||||
if (insert) {
|
if (insert) {
|
||||||
SchisandraAuthUserRoleBO schisandraAuthUserRoleBO = new SchisandraAuthUserRoleBO();
|
SchisandraAuthUserRoleBO schisandraAuthUserRoleBO = new SchisandraAuthUserRoleBO();
|
||||||
schisandraAuthUserRoleBO.setUserId(authUser.getId());
|
schisandraAuthUserRoleBO.setUserId(authUser.getId());
|
||||||
schisandraAuthUserRoleBO.setRoleId(UserRoleEnum.NORMAL_USER.getCode());
|
schisandraAuthUserRoleBO.setRoleId(String.valueOf(UserRoleEnum.NORMAL_USER.getCode()));
|
||||||
SchisandraAuthUserRole schisandraAuthUserRole = SchisandraAuthUserRoleBOConverter.INSTANCE.convertBOToEntity(schisandraAuthUserRoleBO);
|
SchisandraAuthUserRole schisandraAuthUserRole = SchisandraAuthUserRoleBOConverter.INSTANCE.convertBOToEntity(schisandraAuthUserRoleBO);
|
||||||
return schisandraAuthUserRoleService.insert(schisandraAuthUserRole) > 0;
|
return schisandraAuthUserRoleService.insert(schisandraAuthUserRole) > 0;
|
||||||
} else {
|
} else {
|
||||||
@@ -174,7 +174,7 @@ public class SchisandraAuthUserDomainServiceImpl implements SchisandraAuthUserDo
|
|||||||
* @date 2024/4/3 22:10
|
* @date 2024/4/3 22:10
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public SchisandraAuthUserBO queryById(Long userId) {
|
public SchisandraAuthUserBO queryById(String userId) {
|
||||||
SchisandraAuthUser schisandraAuthUser = schisandraAuthUserService.queryById(userId);
|
SchisandraAuthUser schisandraAuthUser = schisandraAuthUserService.queryById(userId);
|
||||||
SchisandraAuthUserBO schisandraAuthUserBO1 = SchisandraAuthUserBOConverter.INSTANCE.convertEntityToBO(schisandraAuthUser);
|
SchisandraAuthUserBO schisandraAuthUserBO1 = SchisandraAuthUserBOConverter.INSTANCE.convertEntityToBO(schisandraAuthUser);
|
||||||
return schisandraAuthUserBO1;
|
return schisandraAuthUserBO1;
|
||||||
@@ -201,7 +201,7 @@ public class SchisandraAuthUserDomainServiceImpl implements SchisandraAuthUserDo
|
|||||||
* @date 2024/4/3 22:30
|
* @date 2024/4/3 22:30
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Object deleteById(Long id) {
|
public Object deleteById(String id) {
|
||||||
return schisandraAuthUserService.deleteById(id);
|
return schisandraAuthUserService.deleteById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,7 +228,7 @@ public class SchisandraAuthUserDomainServiceImpl implements SchisandraAuthUserDo
|
|||||||
public Boolean wechatRegister(String appId, String openId,String clientId) {
|
public Boolean wechatRegister(String appId, String openId,String clientId) {
|
||||||
SchisandraSocialUser socialUser = schisandraSocialUserService.selectByOpenId(openId);
|
SchisandraSocialUser socialUser = schisandraSocialUserService.selectByOpenId(openId);
|
||||||
if (ObjectUtils.isNotEmpty(socialUser)) {
|
if (ObjectUtils.isNotEmpty(socialUser)) {
|
||||||
Long userId = socialUser.getId();
|
String userId = socialUser.getId();
|
||||||
// redis存储用户角色与权限信息
|
// redis存储用户角色与权限信息
|
||||||
userInfoPersistence(userId);
|
userInfoPersistence(userId);
|
||||||
StpUtil.login(userId);
|
StpUtil.login(userId);
|
||||||
@@ -260,12 +260,12 @@ public class SchisandraAuthUserDomainServiceImpl implements SchisandraAuthUserDo
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Long authUserId = schisandraAuthUser.getId();
|
String authUserId = schisandraAuthUser.getId();
|
||||||
Long socialUserId = schisandraSocialUser.getId();
|
String socialUserId = schisandraSocialUser.getId();
|
||||||
// 建立社会用户与用户信息映射
|
// 建立社会用户与用户信息映射
|
||||||
SchisandraSocialUserAuthBO socialUserAuthBO = new SchisandraSocialUserAuthBO();
|
SchisandraSocialUserAuthBO socialUserAuthBO = new SchisandraSocialUserAuthBO();
|
||||||
socialUserAuthBO.setUserId(authUserId);
|
socialUserAuthBO.setUserId(String.valueOf(authUserId));
|
||||||
socialUserAuthBO.setSocialUserId(socialUserId);
|
socialUserAuthBO.setSocialUserId(String.valueOf(socialUserId));
|
||||||
SchisandraSocialUserAuth schisandraSocialUserAuth = SchisandraSocialUserAuthBOConverter.INSTANCE.convertBOToEntity(socialUserAuthBO);
|
SchisandraSocialUserAuth schisandraSocialUserAuth = SchisandraSocialUserAuthBOConverter.INSTANCE.convertBOToEntity(socialUserAuthBO);
|
||||||
int insertMapper = schisandraSocialUserAuthService.insert(schisandraSocialUserAuth);
|
int insertMapper = schisandraSocialUserAuthService.insert(schisandraSocialUserAuth);
|
||||||
if (insertMapper <= 0) {
|
if (insertMapper <= 0) {
|
||||||
@@ -276,8 +276,8 @@ public class SchisandraAuthUserDomainServiceImpl implements SchisandraAuthUserDo
|
|||||||
}
|
}
|
||||||
// 建立用户与角色映射关系
|
// 建立用户与角色映射关系
|
||||||
SchisandraAuthUserRoleBO schisandraAuthUserRoleBO = new SchisandraAuthUserRoleBO();
|
SchisandraAuthUserRoleBO schisandraAuthUserRoleBO = new SchisandraAuthUserRoleBO();
|
||||||
schisandraAuthUserRoleBO.setUserId(authUserId);
|
schisandraAuthUserRoleBO.setUserId(String.valueOf(authUserId));
|
||||||
schisandraAuthUserRoleBO.setRoleId(UserRoleEnum.NORMAL_USER.getCode());
|
schisandraAuthUserRoleBO.setRoleId(String.valueOf(UserRoleEnum.NORMAL_USER.getCode()));
|
||||||
schisandraAuthUserRoleBO.setIsDeleted(IsDeletedFlagEnum.UN_DELETED.getCode());
|
schisandraAuthUserRoleBO.setIsDeleted(IsDeletedFlagEnum.UN_DELETED.getCode());
|
||||||
SchisandraAuthUserRole schisandraAuthUserRole = SchisandraAuthUserRoleBOConverter.INSTANCE.convertBOToEntity(schisandraAuthUserRoleBO);
|
SchisandraAuthUserRole schisandraAuthUserRole = SchisandraAuthUserRoleBOConverter.INSTANCE.convertBOToEntity(schisandraAuthUserRoleBO);
|
||||||
int insert = schisandraAuthUserRoleService.insert(schisandraAuthUserRole);
|
int insert = schisandraAuthUserRoleService.insert(schisandraAuthUserRole);
|
||||||
@@ -338,7 +338,7 @@ public class SchisandraAuthUserDomainServiceImpl implements SchisandraAuthUserDo
|
|||||||
}
|
}
|
||||||
return Result.fail("Social User update fail");
|
return Result.fail("Social User update fail");
|
||||||
}
|
}
|
||||||
Long userId = socialUser.getId();
|
String userId = socialUser.getId();
|
||||||
// redis存储用户角色与权限信息
|
// redis存储用户角色与权限信息
|
||||||
userInfoPersistence(userId);
|
userInfoPersistence(userId);
|
||||||
StpUtil.login(userId, SaLoginConfig.setToken(token.getAccessToken()));
|
StpUtil.login(userId, SaLoginConfig.setToken(token.getAccessToken()));
|
||||||
@@ -388,13 +388,13 @@ public class SchisandraAuthUserDomainServiceImpl implements SchisandraAuthUserDo
|
|||||||
}
|
}
|
||||||
return Result.fail("insertAuthUser fail");
|
return Result.fail("insertAuthUser fail");
|
||||||
}
|
}
|
||||||
Long authUserId = schisandraAuthUser.getId();
|
String authUserId = schisandraAuthUser.getId();
|
||||||
Long socialUserId = schisandraSocialUser.getId();
|
String socialUserId = schisandraSocialUser.getId();
|
||||||
|
|
||||||
// 建立社会用户与用户信息映射
|
// 建立社会用户与用户信息映射
|
||||||
SchisandraSocialUserAuthBO socialUserAuthBO = new SchisandraSocialUserAuthBO();
|
SchisandraSocialUserAuthBO socialUserAuthBO = new SchisandraSocialUserAuthBO();
|
||||||
socialUserAuthBO.setUserId(authUserId);
|
socialUserAuthBO.setUserId(String.valueOf(authUserId));
|
||||||
socialUserAuthBO.setSocialUserId(socialUserId);
|
socialUserAuthBO.setSocialUserId(String.valueOf(socialUserId));
|
||||||
SchisandraSocialUserAuth schisandraSocialUserAuth = SchisandraSocialUserAuthBOConverter.INSTANCE.convertBOToEntity(socialUserAuthBO);
|
SchisandraSocialUserAuth schisandraSocialUserAuth = SchisandraSocialUserAuthBOConverter.INSTANCE.convertBOToEntity(socialUserAuthBO);
|
||||||
int insertMapper = schisandraSocialUserAuthService.insert(schisandraSocialUserAuth);
|
int insertMapper = schisandraSocialUserAuthService.insert(schisandraSocialUserAuth);
|
||||||
if (insertMapper <= 0) {
|
if (insertMapper <= 0) {
|
||||||
@@ -406,8 +406,8 @@ public class SchisandraAuthUserDomainServiceImpl implements SchisandraAuthUserDo
|
|||||||
|
|
||||||
// 建立用户与角色映射关系
|
// 建立用户与角色映射关系
|
||||||
SchisandraAuthUserRoleBO schisandraAuthUserRoleBO = new SchisandraAuthUserRoleBO();
|
SchisandraAuthUserRoleBO schisandraAuthUserRoleBO = new SchisandraAuthUserRoleBO();
|
||||||
schisandraAuthUserRoleBO.setUserId(authUserId);
|
schisandraAuthUserRoleBO.setUserId(String.valueOf(authUserId));
|
||||||
schisandraAuthUserRoleBO.setRoleId(UserRoleEnum.NORMAL_USER.getCode());
|
schisandraAuthUserRoleBO.setRoleId(String.valueOf(UserRoleEnum.NORMAL_USER.getCode()));
|
||||||
schisandraAuthUserRoleBO.setIsDeleted(IsDeletedFlagEnum.UN_DELETED.getCode());
|
schisandraAuthUserRoleBO.setIsDeleted(IsDeletedFlagEnum.UN_DELETED.getCode());
|
||||||
SchisandraAuthUserRole schisandraAuthUserRole = SchisandraAuthUserRoleBOConverter.INSTANCE.convertBOToEntity(schisandraAuthUserRoleBO);
|
SchisandraAuthUserRole schisandraAuthUserRole = SchisandraAuthUserRoleBOConverter.INSTANCE.convertBOToEntity(schisandraAuthUserRoleBO);
|
||||||
int insert = schisandraAuthUserRoleService.insert(schisandraAuthUserRole);
|
int insert = schisandraAuthUserRoleService.insert(schisandraAuthUserRole);
|
||||||
@@ -432,9 +432,9 @@ public class SchisandraAuthUserDomainServiceImpl implements SchisandraAuthUserDo
|
|||||||
* @author: landaiqing
|
* @author: landaiqing
|
||||||
* @date: 2024/6/2 0:37
|
* @date: 2024/6/2 0:37
|
||||||
*/
|
*/
|
||||||
private void userInfoPersistence(Long authUserId) {
|
private void userInfoPersistence(String authUserId) {
|
||||||
// 查询用户角色并存入redis
|
// 查询用户角色并存入redis
|
||||||
SchisandraAuthRole schisandraAuthRole = schisandraAuthRoleService.queryByRoleId(UserRoleEnum.NORMAL_USER.getCode());
|
SchisandraAuthRole schisandraAuthRole = schisandraAuthRoleService.queryByRoleId(String.valueOf(UserRoleEnum.NORMAL_USER.getCode()));
|
||||||
String roleKey = redisUtil.buildKey(AUTH_ROLE_PREFIX, String.valueOf(authUserId));
|
String roleKey = redisUtil.buildKey(AUTH_ROLE_PREFIX, String.valueOf(authUserId));
|
||||||
List<SchisandraAuthRole> roleList = new LinkedList<>();
|
List<SchisandraAuthRole> roleList = new LinkedList<>();
|
||||||
roleList.add(schisandraAuthRole);
|
roleList.add(schisandraAuthRole);
|
||||||
@@ -442,9 +442,9 @@ public class SchisandraAuthUserDomainServiceImpl implements SchisandraAuthUserDo
|
|||||||
|
|
||||||
// 查询用户权限并存入redis
|
// 查询用户权限并存入redis
|
||||||
SchisandraAuthRolePermission schisandraAuthRolePermission = new SchisandraAuthRolePermission();
|
SchisandraAuthRolePermission schisandraAuthRolePermission = new SchisandraAuthRolePermission();
|
||||||
schisandraAuthRolePermission.setRoleId(UserRoleEnum.NORMAL_USER.getCode());
|
schisandraAuthRolePermission.setRoleId(String.valueOf(UserRoleEnum.NORMAL_USER.getCode()));
|
||||||
List<SchisandraAuthRolePermission> rolePermissionList = schisandraAuthRolePermissionService.queryByRoleId(schisandraAuthRolePermission.getRoleId());
|
List<SchisandraAuthRolePermission> rolePermissionList = schisandraAuthRolePermissionService.queryByRoleId(Long.valueOf(schisandraAuthRolePermission.getRoleId()));
|
||||||
List<Long> permissionIdList = rolePermissionList.stream()
|
List<String> permissionIdList = rolePermissionList.stream()
|
||||||
.map(SchisandraAuthRolePermission::getPermissionId).collect(Collectors.toList());
|
.map(SchisandraAuthRolePermission::getPermissionId).collect(Collectors.toList());
|
||||||
List<SchisandraAuthPermission> permissionList = schisandraAuthPermissionService.queryListByIds(permissionIdList);
|
List<SchisandraAuthPermission> permissionList = schisandraAuthPermissionService.queryListByIds(permissionIdList);
|
||||||
String permissionKey = redisUtil.buildKey(AUTH_PERMISSION_PREFIX, String.valueOf(authUserId));
|
String permissionKey = redisUtil.buildKey(AUTH_PERMISSION_PREFIX, String.valueOf(authUserId));
|
||||||
|
@@ -21,7 +21,7 @@ import java.util.Date;
|
|||||||
public class SchisandraAuthPermission implements Serializable {
|
public class SchisandraAuthPermission implements Serializable {
|
||||||
|
|
||||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@@ -24,7 +24,7 @@ public class SchisandraAuthRole implements Serializable {
|
|||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色名称
|
* 角色名称
|
||||||
|
@@ -24,19 +24,19 @@ public class SchisandraAuthRolePermission implements Serializable {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Column("role_id")
|
@Column("role_id")
|
||||||
private Long roleId;
|
private String roleId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Column("permission_id")
|
@Column("permission_id")
|
||||||
private Long permissionId;
|
private String permissionId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
|
@@ -23,7 +23,7 @@ public class SchisandraAuthUser implements Serializable {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
@Column(value = "user_name")
|
@Column(value = "user_name")
|
||||||
private String userName;
|
private String userName;
|
||||||
|
@@ -25,19 +25,19 @@ public class SchisandraAuthUserRole implements Serializable {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Column("user_id")
|
@Column("user_id")
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Column("role_id")
|
@Column("role_id")
|
||||||
private Long roleId;
|
private String roleId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
|
@@ -24,7 +24,7 @@ public class SchisandraSocialUser implements Serializable {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 第三方系统的唯一ID
|
* 第三方系统的唯一ID
|
||||||
|
@@ -24,19 +24,19 @@ public class SchisandraSocialUserAuth implements Serializable {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
@Id(keyType=KeyType.Generator, value= KeyGenerators.flexId)
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Column("user_id")
|
@Column("user_id")
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Column("social_user_id")
|
@Column("social_user_id")
|
||||||
private Long socialUserId;
|
private String socialUserId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
|
@@ -1,8 +1,6 @@
|
|||||||
package com.schisandra.auth.infra.basic.service;
|
package com.schisandra.auth.infra.basic.service;
|
||||||
|
|
||||||
import com.schisandra.auth.infra.basic.entity.SchisandraAuthPermission;
|
import com.schisandra.auth.infra.basic.entity.SchisandraAuthPermission;
|
||||||
import org.springframework.data.domain.Page;
|
|
||||||
import org.springframework.data.domain.PageRequest;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -20,7 +18,7 @@ public interface SchisandraAuthPermissionService {
|
|||||||
* @param id 主键
|
* @param id 主键
|
||||||
* @return 实例对象
|
* @return 实例对象
|
||||||
*/
|
*/
|
||||||
SchisandraAuthPermission queryById(Long id);
|
SchisandraAuthPermission queryById(String id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -47,5 +45,5 @@ public interface SchisandraAuthPermissionService {
|
|||||||
*/
|
*/
|
||||||
boolean deleteById(Long id);
|
boolean deleteById(Long id);
|
||||||
|
|
||||||
List<SchisandraAuthPermission> queryListByIds(List<Long> permissionIdList);
|
List<SchisandraAuthPermission> queryListByIds(List<String> permissionIdList);
|
||||||
}
|
}
|
||||||
|
@@ -18,7 +18,7 @@ public interface SchisandraAuthRolePermissionService {
|
|||||||
* @param id 主键
|
* @param id 主键
|
||||||
* @return 实例对象
|
* @return 实例对象
|
||||||
*/
|
*/
|
||||||
SchisandraAuthRolePermission queryById(Long id);
|
SchisandraAuthRolePermission queryById(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增数据
|
* 新增数据
|
||||||
|
@@ -18,7 +18,7 @@ public interface SchisandraAuthRoleService {
|
|||||||
* @param id 主键
|
* @param id 主键
|
||||||
* @return 实例对象
|
* @return 实例对象
|
||||||
*/
|
*/
|
||||||
SchisandraAuthRole queryById(Long id);
|
SchisandraAuthRole queryById(String id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -43,7 +43,7 @@ public interface SchisandraAuthRoleService {
|
|||||||
* @param id 主键
|
* @param id 主键
|
||||||
* @return 是否成功
|
* @return 是否成功
|
||||||
*/
|
*/
|
||||||
boolean deleteById(Long id);
|
boolean deleteById(String id);
|
||||||
|
|
||||||
SchisandraAuthRole queryByRoleId(Long code);
|
SchisandraAuthRole queryByRoleId(String code);
|
||||||
}
|
}
|
||||||
|
@@ -17,7 +17,7 @@ public interface SchisandraAuthUserRoleService {
|
|||||||
* @param id 主键
|
* @param id 主键
|
||||||
* @return 实例对象
|
* @return 实例对象
|
||||||
*/
|
*/
|
||||||
SchisandraAuthUserRole queryById(Long id);
|
SchisandraAuthUserRole queryById(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增数据
|
* 新增数据
|
||||||
@@ -41,7 +41,7 @@ public interface SchisandraAuthUserRoleService {
|
|||||||
* @param id 主键
|
* @param id 主键
|
||||||
* @return 是否成功
|
* @return 是否成功
|
||||||
*/
|
*/
|
||||||
boolean deleteById(Long id);
|
boolean deleteById(String id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@ public interface SchisandraAuthUserService {
|
|||||||
* @param id 主键
|
* @param id 主键
|
||||||
* @return 实例对象
|
* @return 实例对象
|
||||||
*/
|
*/
|
||||||
SchisandraAuthUser queryById(Long id);
|
SchisandraAuthUser queryById(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增数据
|
* 新增数据
|
||||||
@@ -46,7 +46,7 @@ public interface SchisandraAuthUserService {
|
|||||||
* @param id 主键
|
* @param id 主键
|
||||||
* @return 是否成功
|
* @return 是否成功
|
||||||
*/
|
*/
|
||||||
boolean deleteById(Long id);
|
boolean deleteById(String id);
|
||||||
|
|
||||||
|
|
||||||
int insertAuthUserByOauth(SchisandraAuthUser schisandraAuthUser);
|
int insertAuthUserByOauth(SchisandraAuthUser schisandraAuthUser);
|
||||||
|
@@ -16,7 +16,7 @@ public interface SchisandraSocialUserAuthService {
|
|||||||
* @param id 主键
|
* @param id 主键
|
||||||
* @return 实例对象
|
* @return 实例对象
|
||||||
*/
|
*/
|
||||||
SchisandraSocialUserAuth queryById(Long id);
|
SchisandraSocialUserAuth queryById(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增数据
|
* 新增数据
|
||||||
@@ -40,7 +40,7 @@ public interface SchisandraSocialUserAuthService {
|
|||||||
* @param id 主键
|
* @param id 主键
|
||||||
* @return 是否成功
|
* @return 是否成功
|
||||||
*/
|
*/
|
||||||
boolean deleteById(Long id);
|
boolean deleteById(String id);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -16,7 +16,7 @@ public interface SchisandraSocialUserService {
|
|||||||
* @param id 主键
|
* @param id 主键
|
||||||
* @return 实例对象
|
* @return 实例对象
|
||||||
*/
|
*/
|
||||||
SchisandraSocialUser queryById(Long id);
|
SchisandraSocialUser queryById(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增数据
|
* 新增数据
|
||||||
@@ -40,7 +40,7 @@ public interface SchisandraSocialUserService {
|
|||||||
* @param id 主键
|
* @param id 主键
|
||||||
* @return 是否成功
|
* @return 是否成功
|
||||||
*/
|
*/
|
||||||
boolean deleteById(Long id);
|
boolean deleteById(String id);
|
||||||
|
|
||||||
|
|
||||||
SchisandraSocialUser selectByUuidAndType(String uuid, String type);
|
SchisandraSocialUser selectByUuidAndType(String uuid, String type);
|
||||||
|
@@ -31,7 +31,7 @@ public class SchisandraAuthPermissionServiceImpl extends CacheableServiceImpl<Sc
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Cacheable(key = "#id")
|
@Cacheable(key = "#id")
|
||||||
public SchisandraAuthPermission queryById(Long id) {
|
public SchisandraAuthPermission queryById(String id) {
|
||||||
return this.schisandraAuthPermissionDao.selectOneById(id);
|
return this.schisandraAuthPermissionDao.selectOneById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ public class SchisandraAuthPermissionServiceImpl extends CacheableServiceImpl<Sc
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SchisandraAuthPermission> queryListByIds(List<Long> permissionIdList) {
|
public List<SchisandraAuthPermission> queryListByIds(List<String> permissionIdList) {
|
||||||
return schisandraAuthPermissionDao.selectListByIds(permissionIdList);
|
return schisandraAuthPermissionDao.selectListByIds(permissionIdList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -29,7 +29,7 @@ public class SchisandraAuthRolePermissionServiceImpl implements SchisandraAuthRo
|
|||||||
* @return 实例对象
|
* @return 实例对象
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public SchisandraAuthRolePermission queryById(Long id) {
|
public SchisandraAuthRolePermission queryById(String id) {
|
||||||
return this.schisandraAuthRolePermissionDao.selectOneById(id);
|
return this.schisandraAuthRolePermissionDao.selectOneById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@ public class SchisandraAuthRoleServiceImpl implements SchisandraAuthRoleService
|
|||||||
* @return 实例对象
|
* @return 实例对象
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public SchisandraAuthRole queryById(Long id) {
|
public SchisandraAuthRole queryById(String id) {
|
||||||
return this.schisandraAuthRoleDao.selectOneById(id);
|
return this.schisandraAuthRoleDao.selectOneById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,12 +64,12 @@ public class SchisandraAuthRoleServiceImpl implements SchisandraAuthRoleService
|
|||||||
* @return 是否成功
|
* @return 是否成功
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean deleteById(Long id) {
|
public boolean deleteById(String id) {
|
||||||
return this.schisandraAuthRoleDao.deleteById(id) > 0;
|
return this.schisandraAuthRoleDao.deleteById(id) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SchisandraAuthRole queryByRoleId(Long code) {
|
public SchisandraAuthRole queryByRoleId(String code) {
|
||||||
return schisandraAuthRoleDao.selectOneByCondition(SchisandraAuthRoleTableDef.SCHISANDRA_AUTH_ROLE.ID.eq(code));
|
return schisandraAuthRoleDao.selectOneByCondition(SchisandraAuthRoleTableDef.SCHISANDRA_AUTH_ROLE.ID.eq(code));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -38,7 +38,7 @@ public class SchisandraAuthUserRoleServiceImpl implements SchisandraAuthUserRole
|
|||||||
* @return 实例对象
|
* @return 实例对象
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public SchisandraAuthUserRole queryById(Long id) {
|
public SchisandraAuthUserRole queryById(String id) {
|
||||||
return this.schisandraAuthUserRoleDao.selectOneByCondition(SchisandraAuthUserRoleTableDef.SCHISANDRA_AUTH_USER_ROLE.USER_ID.eq(id));
|
return this.schisandraAuthUserRoleDao.selectOneByCondition(SchisandraAuthUserRoleTableDef.SCHISANDRA_AUTH_USER_ROLE.USER_ID.eq(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ public class SchisandraAuthUserRoleServiceImpl implements SchisandraAuthUserRole
|
|||||||
* @return 是否成功
|
* @return 是否成功
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean deleteById(Long id) {
|
public boolean deleteById(String id) {
|
||||||
return this.schisandraAuthUserRoleDao.deleteById(id) > 0;
|
return this.schisandraAuthUserRoleDao.deleteById(id) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -41,7 +41,7 @@ public class SchisandraAuthUserServiceImpl implements SchisandraAuthUserService
|
|||||||
* @return 实例对象
|
* @return 实例对象
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public SchisandraAuthUser queryById(Long id) {
|
public SchisandraAuthUser queryById(String id) {
|
||||||
return this.schisandraAuthUserDao.selectOneById(id);
|
return this.schisandraAuthUserDao.selectOneById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ public class SchisandraAuthUserServiceImpl implements SchisandraAuthUserService
|
|||||||
* @return 是否成功
|
* @return 是否成功
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean deleteById(Long id) {
|
public boolean deleteById(String id) {
|
||||||
return this.schisandraAuthUserDao.deleteById(id) > 0;
|
return this.schisandraAuthUserDao.deleteById(id) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -26,7 +26,7 @@ public class SchisandraSocialUserAuthServiceImpl implements SchisandraSocialUser
|
|||||||
* @return 实例对象
|
* @return 实例对象
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public SchisandraSocialUserAuth queryById(Long id) {
|
public SchisandraSocialUserAuth queryById(String id) {
|
||||||
return this.schisandraSocialUserAuthDao.selectOneById(id);
|
return this.schisandraSocialUserAuthDao.selectOneById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ public class SchisandraSocialUserAuthServiceImpl implements SchisandraSocialUser
|
|||||||
* @return 是否成功
|
* @return 是否成功
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean deleteById(Long id) {
|
public boolean deleteById(String id) {
|
||||||
return this.schisandraSocialUserAuthDao.deleteById(id) > 0;
|
return this.schisandraSocialUserAuthDao.deleteById(id) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -27,7 +27,7 @@ public class SchisandraSocialUserServiceImpl implements SchisandraSocialUserServ
|
|||||||
* @return 实例对象
|
* @return 实例对象
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public SchisandraSocialUser queryById(Long id) {
|
public SchisandraSocialUser queryById(String id) {
|
||||||
return this.schisandraSocialUserDao.selectOneById(id);
|
return this.schisandraSocialUserDao.selectOneById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ public class SchisandraSocialUserServiceImpl implements SchisandraSocialUserServ
|
|||||||
* @return 是否成功
|
* @return 是否成功
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean deleteById(Long id) {
|
public boolean deleteById(String id) {
|
||||||
return this.schisandraSocialUserDao.deleteById(id) > 0;
|
return this.schisandraSocialUserDao.deleteById(id) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -16,7 +16,7 @@ public class SmsConfigInfo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
private Integer id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 配置id
|
* 配置id
|
||||||
|
@@ -3,9 +3,9 @@
|
|||||||
<mapper namespace="com.schisandra.auth.infra.basic.dao.SchisandraAuthPermissionDao">
|
<mapper namespace="com.schisandra.auth.infra.basic.dao.SchisandraAuthPermissionDao">
|
||||||
|
|
||||||
<resultMap type="com.schisandra.auth.infra.basic.entity.SchisandraAuthPermission" id="SchisandraAuthPermissionMap">
|
<resultMap type="com.schisandra.auth.infra.basic.entity.SchisandraAuthPermission" id="SchisandraAuthPermissionMap">
|
||||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||||
<result property="parentId" column="parent_id" jdbcType="INTEGER"/>
|
<result property="parentId" column="parent_id" jdbcType="VARCHAR"/>
|
||||||
<result property="type" column="type" jdbcType="INTEGER"/>
|
<result property="type" column="type" jdbcType="INTEGER"/>
|
||||||
<result property="path" column="path" jdbcType="VARCHAR"/>
|
<result property="path" column="path" jdbcType="VARCHAR"/>
|
||||||
<result property="status" column="status" jdbcType="INTEGER"/>
|
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
<mapper namespace="com.schisandra.auth.infra.basic.dao.SchisandraAuthRoleDao">
|
<mapper namespace="com.schisandra.auth.infra.basic.dao.SchisandraAuthRoleDao">
|
||||||
|
|
||||||
<resultMap type="com.schisandra.auth.infra.basic.entity.SchisandraAuthRole" id="SchisandraAuthRoleMap">
|
<resultMap type="com.schisandra.auth.infra.basic.entity.SchisandraAuthRole" id="SchisandraAuthRoleMap">
|
||||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||||
<result property="roleName" column="role_name" jdbcType="VARCHAR"/>
|
<result property="roleName" column="role_name" jdbcType="VARCHAR"/>
|
||||||
<result property="roleKey" column="role_key" jdbcType="VARCHAR"/>
|
<result property="roleKey" column="role_key" jdbcType="VARCHAR"/>
|
||||||
<result property="createdBy" column="created_by" jdbcType="VARCHAR"/>
|
<result property="createdBy" column="created_by" jdbcType="VARCHAR"/>
|
||||||
|
@@ -3,9 +3,9 @@
|
|||||||
<mapper namespace="com.schisandra.auth.infra.basic.dao.SchisandraAuthRolePermissionDao">
|
<mapper namespace="com.schisandra.auth.infra.basic.dao.SchisandraAuthRolePermissionDao">
|
||||||
|
|
||||||
<resultMap id="BaseResultMap" type="com.schisandra.auth.infra.basic.entity.SchisandraAuthRolePermission">
|
<resultMap id="BaseResultMap" type="com.schisandra.auth.infra.basic.entity.SchisandraAuthRolePermission">
|
||||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
<id column="id" jdbcType="VARCHAR" property="id"/>
|
||||||
<result column="role_id" jdbcType="BIGINT" property="roleId"/>
|
<result column="role_id" jdbcType="VARCHAR" property="roleId"/>
|
||||||
<result column="permission_id" jdbcType="BIGINT" property="permissionId"/>
|
<result column="permission_id" jdbcType="VARCHAR" property="permissionId"/>
|
||||||
<result column="created_by" jdbcType="VARCHAR" property="createdBy"/>
|
<result column="created_by" jdbcType="VARCHAR" property="createdBy"/>
|
||||||
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime"/>
|
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime"/>
|
||||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
<mapper namespace="com.schisandra.auth.infra.basic.dao.SchisandraAuthUserDao">
|
<mapper namespace="com.schisandra.auth.infra.basic.dao.SchisandraAuthUserDao">
|
||||||
|
|
||||||
<resultMap id="BaseResultMap" type="com.schisandra.auth.infra.basic.entity.SchisandraAuthUser">
|
<resultMap id="BaseResultMap" type="com.schisandra.auth.infra.basic.entity.SchisandraAuthUser">
|
||||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
<id column="id" jdbcType="VARCHAR" property="id"/>
|
||||||
<result column="user_name" jdbcType="VARCHAR" property="userName"/>
|
<result column="user_name" jdbcType="VARCHAR" property="userName"/>
|
||||||
<result column="uuid" jdbcType="VARCHAR" property="uuid"/>
|
<result column="uuid" jdbcType="VARCHAR" property="uuid"/>
|
||||||
<result column="source" jdbcType="VARCHAR" property="source"/>
|
<result column="source" jdbcType="VARCHAR" property="source"/>
|
||||||
|
@@ -3,9 +3,9 @@
|
|||||||
<mapper namespace="com.schisandra.auth.infra.basic.dao.SchisandraAuthUserRoleDao">
|
<mapper namespace="com.schisandra.auth.infra.basic.dao.SchisandraAuthUserRoleDao">
|
||||||
|
|
||||||
<resultMap id="BaseResultMap" type="com.schisandra.auth.infra.basic.entity.SchisandraAuthUserRole">
|
<resultMap id="BaseResultMap" type="com.schisandra.auth.infra.basic.entity.SchisandraAuthUserRole">
|
||||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
<id column="id" jdbcType="VARCHAR" property="id"/>
|
||||||
<result column="user_id" jdbcType="BIGINT" property="userId"/>
|
<result column="user_id" jdbcType="VARCHAR" property="userId"/>
|
||||||
<result column="role_id" jdbcType="BIGINT" property="roleId"/>
|
<result column="role_id" jdbcType="VARCHAR" property="roleId"/>
|
||||||
<result column="created_by" jdbcType="VARCHAR" property="createdBy"/>
|
<result column="created_by" jdbcType="VARCHAR" property="createdBy"/>
|
||||||
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime"/>
|
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime"/>
|
||||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
|
||||||
|
@@ -3,9 +3,9 @@
|
|||||||
<mapper namespace="com.schisandra.auth.infra.basic.dao.SchisandraSocialUserAuthDao">
|
<mapper namespace="com.schisandra.auth.infra.basic.dao.SchisandraSocialUserAuthDao">
|
||||||
|
|
||||||
<resultMap id="BaseResultMap" type="com.schisandra.auth.infra.basic.entity.SchisandraSocialUserAuth">
|
<resultMap id="BaseResultMap" type="com.schisandra.auth.infra.basic.entity.SchisandraSocialUserAuth">
|
||||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
<id column="id" jdbcType="VARCHAR" property="id"/>
|
||||||
<result column="user_id" jdbcType="BIGINT" property="userId"/>
|
<result column="user_id" jdbcType="VARCHAR" property="userId"/>
|
||||||
<result column="social_user_id" jdbcType="BIGINT" property="socialUserId"/>
|
<result column="social_user_id" jdbcType="VARCHAR" property="socialUserId"/>
|
||||||
<result column="created_by" jdbcType="VARCHAR" property="createdBy"/>
|
<result column="created_by" jdbcType="VARCHAR" property="createdBy"/>
|
||||||
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime"/>
|
<result column="created_time" jdbcType="TIMESTAMP" property="createdTime"/>
|
||||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
<mapper namespace="com.schisandra.auth.infra.basic.dao.SchisandraSocialUserDao">
|
<mapper namespace="com.schisandra.auth.infra.basic.dao.SchisandraSocialUserDao">
|
||||||
|
|
||||||
<resultMap id="BaseResultMap" type="com.schisandra.auth.infra.basic.entity.SchisandraSocialUser">
|
<resultMap id="BaseResultMap" type="com.schisandra.auth.infra.basic.entity.SchisandraSocialUser">
|
||||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
<id column="id" jdbcType="VARCHAR" property="id"/>
|
||||||
<result column="uuid" jdbcType="VARCHAR" property="uuid"/>
|
<result column="uuid" jdbcType="VARCHAR" property="uuid"/>
|
||||||
<result column="source" jdbcType="VARCHAR" property="source"/>
|
<result column="source" jdbcType="VARCHAR" property="source"/>
|
||||||
<result column="access_token" jdbcType="VARCHAR" property="accessToken"/>
|
<result column="access_token" jdbcType="VARCHAR" property="accessToken"/>
|
||||||
|
@@ -5,7 +5,6 @@ import cn.hutool.extra.spring.SpringUtil;
|
|||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import com.schisandra.oss.application.convert.SchisandraOssAliDTOConverter;
|
import com.schisandra.oss.application.convert.SchisandraOssAliDTOConverter;
|
||||||
import com.schisandra.oss.application.convert.SchisandraOssMinioDTOConverter;
|
|
||||||
import com.schisandra.oss.application.dto.SchisandraOssAliDTO;
|
import com.schisandra.oss.application.dto.SchisandraOssAliDTO;
|
||||||
import com.schisandra.oss.application.oss.constant.OssConstant;
|
import com.schisandra.oss.application.oss.constant.OssConstant;
|
||||||
import com.schisandra.oss.application.oss.core.ali.AliOssClient;
|
import com.schisandra.oss.application.oss.core.ali.AliOssClient;
|
||||||
@@ -13,11 +12,9 @@ import com.schisandra.oss.application.oss.core.ali.AliOssConfiguration;
|
|||||||
import com.schisandra.oss.application.oss.model.OssInfo;
|
import com.schisandra.oss.application.oss.model.OssInfo;
|
||||||
import com.schisandra.oss.common.entity.Result;
|
import com.schisandra.oss.common.entity.Result;
|
||||||
import com.schisandra.oss.domain.bo.SchisandraOssAliBO;
|
import com.schisandra.oss.domain.bo.SchisandraOssAliBO;
|
||||||
import com.schisandra.oss.domain.bo.SchisandraOssMinioBO;
|
|
||||||
import com.schisandra.oss.domain.redis.RedisUtil;
|
import com.schisandra.oss.domain.redis.RedisUtil;
|
||||||
import com.schisandra.oss.domain.service.SchisandraOssAliDomainService;
|
import com.schisandra.oss.domain.service.SchisandraOssAliDomainService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.context.ApplicationContext;
|
|
||||||
import org.springframework.util.StreamUtils;
|
import org.springframework.util.StreamUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
@@ -28,10 +25,8 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -62,11 +57,12 @@ public class SchisandraOssAliController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回当前用户ali表所有数据
|
* 返回当前用户ali表所有数据
|
||||||
|
*
|
||||||
* @param userId
|
* @param userId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("return_online")
|
@GetMapping("return_online")
|
||||||
public Result returnOnline(Long userId) {
|
public Result returnOnline(String userId) {
|
||||||
List<SchisandraOssAliBO> list = schisandraOssAliDomainService.selectAllPresent(userId);
|
List<SchisandraOssAliBO> list = schisandraOssAliDomainService.selectAllPresent(userId);
|
||||||
if (list.isEmpty()) {
|
if (list.isEmpty()) {
|
||||||
return Result.fail();
|
return Result.fail();
|
||||||
@@ -97,8 +93,8 @@ public class SchisandraOssAliController {
|
|||||||
}
|
}
|
||||||
Preconditions.checkNotNull(userId, "用户id不能为空!");
|
Preconditions.checkNotNull(userId, "用户id不能为空!");
|
||||||
SchisandraOssAliBO bo = new SchisandraOssAliBO();
|
SchisandraOssAliBO bo = new SchisandraOssAliBO();
|
||||||
bo.setId(Long.valueOf(Id));
|
bo.setId(Id);
|
||||||
bo.setUserId(Long.valueOf(userId));
|
bo.setUserId(userId);
|
||||||
bo.setStatus(String.valueOf(true));
|
bo.setStatus(String.valueOf(true));
|
||||||
if (schisandraOssAliDomainService.update(bo)) {
|
if (schisandraOssAliDomainService.update(bo)) {
|
||||||
return aliOssConfiguration.aliOssClient(userId);
|
return aliOssConfiguration.aliOssClient(userId);
|
||||||
@@ -113,8 +109,8 @@ public class SchisandraOssAliController {
|
|||||||
log.info("SchisandraOssAliController.shutdown.userId:{}", JSON.toJSONString(userId));
|
log.info("SchisandraOssAliController.shutdown.userId:{}", JSON.toJSONString(userId));
|
||||||
}
|
}
|
||||||
SchisandraOssAliBO bo = new SchisandraOssAliBO();
|
SchisandraOssAliBO bo = new SchisandraOssAliBO();
|
||||||
bo.setId(Long.valueOf(Id));
|
bo.setId(Id);
|
||||||
bo.setUserId(Long.valueOf(userId));
|
bo.setUserId(userId);
|
||||||
bo.setStatus(String.valueOf(false));
|
bo.setStatus(String.valueOf(false));
|
||||||
if (schisandraOssAliDomainService.update(bo)) {
|
if (schisandraOssAliDomainService.update(bo)) {
|
||||||
SpringUtil.unregisterBean(OssConstant.OssType.ALI + userId);
|
SpringUtil.unregisterBean(OssConstant.OssType.ALI + userId);
|
||||||
@@ -173,7 +169,7 @@ public class SchisandraOssAliController {
|
|||||||
if (log.isInfoEnabled()) {
|
if (log.isInfoEnabled()) {
|
||||||
log.info("SchisandraOssAliController.delete.dto:{}", JSON.toJSONString(schisandraOssAliDTO));
|
log.info("SchisandraOssAliController.delete.dto:{}", JSON.toJSONString(schisandraOssAliDTO));
|
||||||
}
|
}
|
||||||
parameterCheck(schisandraOssAliDTO);
|
Preconditions.checkNotNull(schisandraOssAliDTO.getId(), "ID不能为空");
|
||||||
SchisandraOssAliBO schisandraOssAliBO = SchisandraOssAliDTOConverter.INSTANCE.convertDTOToBO(schisandraOssAliDTO);
|
SchisandraOssAliBO schisandraOssAliBO = SchisandraOssAliDTOConverter.INSTANCE.convertDTOToBO(schisandraOssAliDTO);
|
||||||
return Result.ok(schisandraOssAliDomainService.delete(schisandraOssAliBO));
|
return Result.ok(schisandraOssAliDomainService.delete(schisandraOssAliBO));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -299,7 +295,6 @@ public class SchisandraOssAliController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description: 下载文件
|
* @description: 下载文件
|
||||||
* @param: [schisandraOssAliDTO]
|
* @param: [schisandraOssAliDTO]
|
||||||
|
@@ -47,8 +47,6 @@ import java.util.concurrent.TimeUnit;
|
|||||||
@RequestMapping("/oss/minio/")
|
@RequestMapping("/oss/minio/")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class SchisandraOssMinioController {
|
public class SchisandraOssMinioController {
|
||||||
@Resource
|
|
||||||
MinioOssClient minioOssClient;
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private SchisandraOssMinioDomainService schisandraOssMinioDomainService;
|
private SchisandraOssMinioDomainService schisandraOssMinioDomainService;
|
||||||
@@ -65,7 +63,7 @@ public class SchisandraOssMinioController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("return_online")
|
@GetMapping("return_online")
|
||||||
public Result returnOnline(Long userId) {
|
public Result returnOnline(String userId) {
|
||||||
List<SchisandraOssMinioBO> list = schisandraOssMinioDomainService.selectAllPresent(userId);
|
List<SchisandraOssMinioBO> list = schisandraOssMinioDomainService.selectAllPresent(userId);
|
||||||
if(list.isEmpty()){
|
if(list.isEmpty()){
|
||||||
return Result.fail();
|
return Result.fail();
|
||||||
@@ -102,14 +100,14 @@ public class SchisandraOssMinioController {
|
|||||||
log.info("SchisandraOssMinioController.init.userId:{}", userId);
|
log.info("SchisandraOssMinioController.init.userId:{}", userId);
|
||||||
}
|
}
|
||||||
Preconditions.checkNotNull(userId, "用户id不能为空!");
|
Preconditions.checkNotNull(userId, "用户id不能为空!");
|
||||||
List<SchisandraOssMinioBO> list = schisandraOssMinioDomainService.getAllMinioInfoByUserId(Long.valueOf(userId));
|
List<SchisandraOssMinioBO> list = schisandraOssMinioDomainService.getAllMinioInfoByUserId(userId);
|
||||||
if (list.size() != 0) {
|
if (list.size() != 0) {
|
||||||
return Result.fail(list);
|
return Result.fail(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
SchisandraOssMinioBO bo = new SchisandraOssMinioBO();
|
SchisandraOssMinioBO bo = new SchisandraOssMinioBO();
|
||||||
bo.setId(Long.valueOf(Id));
|
bo.setId(Id);
|
||||||
bo.setUserId(Long.valueOf(userId));
|
bo.setUserId(userId);
|
||||||
bo.setStatus(String.valueOf(true));
|
bo.setStatus(String.valueOf(true));
|
||||||
if (schisandraOssMinioDomainService.update(bo)) {
|
if (schisandraOssMinioDomainService.update(bo)) {
|
||||||
return minioOssConfiguration.minioOssClient(userId);
|
return minioOssConfiguration.minioOssClient(userId);
|
||||||
@@ -124,8 +122,8 @@ public class SchisandraOssMinioController {
|
|||||||
log.info("SchisandraOssMinioController.shutdown.userId:{}", userId);
|
log.info("SchisandraOssMinioController.shutdown.userId:{}", userId);
|
||||||
}
|
}
|
||||||
SchisandraOssMinioBO bo = new SchisandraOssMinioBO();
|
SchisandraOssMinioBO bo = new SchisandraOssMinioBO();
|
||||||
bo.setId(Long.valueOf(Id));
|
bo.setId(Id);
|
||||||
bo.setUserId(Long.valueOf(userId));
|
bo.setUserId(userId);
|
||||||
bo.setStatus(String.valueOf(false));
|
bo.setStatus(String.valueOf(false));
|
||||||
if (schisandraOssMinioDomainService.update(bo)) {
|
if (schisandraOssMinioDomainService.update(bo)) {
|
||||||
SpringUtil.unregisterBean(OssConstant.OssType.MINIO + userId);
|
SpringUtil.unregisterBean(OssConstant.OssType.MINIO + userId);
|
||||||
@@ -413,7 +411,7 @@ public class SchisandraOssMinioController {
|
|||||||
|
|
||||||
@PostMapping("get")
|
@PostMapping("get")
|
||||||
public SchisandraOssMinioDTO getMinioOss(@RequestParam String userId) {
|
public SchisandraOssMinioDTO getMinioOss(@RequestParam String userId) {
|
||||||
return SchisandraOssMinioDTOConverter.INSTANCE.convertBOToDTO(schisandraOssMinioDomainService.getMinioConfig(Long.valueOf(userId)));
|
return SchisandraOssMinioDTOConverter.INSTANCE.convertBOToDTO(schisandraOssMinioDomainService.getMinioConfig(userId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -62,7 +62,7 @@ public class SchisandraOssQiniuController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("return_online")
|
@GetMapping("return_online")
|
||||||
public Result returnOnline(Long userId) {
|
public Result returnOnline(String userId) {
|
||||||
List<SchisandraOssQiniuBO> list = schisandraOssQiniuDomainService.selectAllPresent(userId);
|
List<SchisandraOssQiniuBO> list = schisandraOssQiniuDomainService.selectAllPresent(userId);
|
||||||
if(list.isEmpty()){
|
if(list.isEmpty()){
|
||||||
return Result.fail();
|
return Result.fail();
|
||||||
@@ -163,7 +163,7 @@ public class SchisandraOssQiniuController {
|
|||||||
public Result download_open(@RequestParam String userId, @RequestParam String bucket, @RequestParam List<String> listObjectsArgs, HttpServletResponse response) throws IOException {
|
public Result download_open(@RequestParam String userId, @RequestParam String bucket, @RequestParam List<String> listObjectsArgs, HttpServletResponse response) throws IOException {
|
||||||
QiNiuOssClient bean = SpringUtil.getBean(OssConstant.OssType.QINIU + userId);
|
QiNiuOssClient bean = SpringUtil.getBean(OssConstant.OssType.QINIU + userId);
|
||||||
ServletOutputStream output = response.getOutputStream();
|
ServletOutputStream output = response.getOutputStream();
|
||||||
SchisandraOssQiniuBO schisandraOssQiniuBO = schisandraOssQiniuDomainService.getEndpointByuserIdAndBucket(Long.valueOf(userId), bucket);
|
SchisandraOssQiniuBO schisandraOssQiniuBO = schisandraOssQiniuDomainService.getEndpointByuserIdAndBucket(userId, bucket);
|
||||||
if (schisandraOssQiniuBO.getEndpoint() == null) {
|
if (schisandraOssQiniuBO.getEndpoint() == null) {
|
||||||
return Result.fail("请配置该存储桶的相关配置:endpoint");
|
return Result.fail("请配置该存储桶的相关配置:endpoint");
|
||||||
}
|
}
|
||||||
@@ -332,8 +332,8 @@ public class SchisandraOssQiniuController {
|
|||||||
}
|
}
|
||||||
Preconditions.checkNotNull(userId, "用户id不能为空!");
|
Preconditions.checkNotNull(userId, "用户id不能为空!");
|
||||||
SchisandraOssQiniuBO bo = new SchisandraOssQiniuBO();
|
SchisandraOssQiniuBO bo = new SchisandraOssQiniuBO();
|
||||||
bo.setId(Long.valueOf(Id));
|
bo.setId(Id);
|
||||||
bo.setUserId(Long.valueOf(userId));
|
bo.setUserId(userId);
|
||||||
bo.setStatus(String.valueOf(true));
|
bo.setStatus(String.valueOf(true));
|
||||||
if (schisandraOssQiniuDomainService.update(bo)) {
|
if (schisandraOssQiniuDomainService.update(bo)) {
|
||||||
return qiNiuOssConfiguration.qiNiuOssClient(userId);
|
return qiNiuOssConfiguration.qiNiuOssClient(userId);
|
||||||
@@ -348,8 +348,8 @@ public class SchisandraOssQiniuController {
|
|||||||
log.info("SchisandraOssQiniuController.shutdown.userId:{}", JSON.toJSONString(userId));
|
log.info("SchisandraOssQiniuController.shutdown.userId:{}", JSON.toJSONString(userId));
|
||||||
}
|
}
|
||||||
SchisandraOssQiniuBO bo = new SchisandraOssQiniuBO();
|
SchisandraOssQiniuBO bo = new SchisandraOssQiniuBO();
|
||||||
bo.setId(Long.valueOf(Id));
|
bo.setId(Id);
|
||||||
bo.setUserId(Long.valueOf(userId));
|
bo.setUserId(userId);
|
||||||
bo.setStatus(String.valueOf(false));
|
bo.setStatus(String.valueOf(false));
|
||||||
if (schisandraOssQiniuDomainService.update(bo)) {
|
if (schisandraOssQiniuDomainService.update(bo)) {
|
||||||
SpringUtil.unregisterBean(OssConstant.OssType.QINIU + userId);
|
SpringUtil.unregisterBean(OssConstant.OssType.QINIU + userId);
|
||||||
|
@@ -192,8 +192,8 @@ public class SchisandraOssSftpController {
|
|||||||
}
|
}
|
||||||
Preconditions.checkNotNull(userId, "用户id不能为空!");
|
Preconditions.checkNotNull(userId, "用户id不能为空!");
|
||||||
SchisandraOssSftpBO bo = new SchisandraOssSftpBO();
|
SchisandraOssSftpBO bo = new SchisandraOssSftpBO();
|
||||||
bo.setId(Long.valueOf(Id));
|
bo.setId(Id);
|
||||||
bo.setUserId(Long.valueOf(userId));
|
bo.setUserId(userId);
|
||||||
bo.setStatus(String.valueOf(true));
|
bo.setStatus(String.valueOf(true));
|
||||||
if(schisandraOssSftpDomainService.update(bo)){
|
if(schisandraOssSftpDomainService.update(bo)){
|
||||||
return sftpOssConfiguration.sftpOssClient(userId);
|
return sftpOssConfiguration.sftpOssClient(userId);
|
||||||
@@ -208,8 +208,8 @@ public class SchisandraOssSftpController {
|
|||||||
log.info("SchisandraOssSftpController.shutdown.userId:{}", JSON.toJSONString(userId));
|
log.info("SchisandraOssSftpController.shutdown.userId:{}", JSON.toJSONString(userId));
|
||||||
}
|
}
|
||||||
SchisandraOssSftpBO bo = new SchisandraOssSftpBO();
|
SchisandraOssSftpBO bo = new SchisandraOssSftpBO();
|
||||||
bo.setId(Long.valueOf(Id));
|
bo.setId(Id);
|
||||||
bo.setUserId(Long.valueOf(userId));
|
bo.setUserId(userId);
|
||||||
bo.setStatus(String.valueOf(false));
|
bo.setStatus(String.valueOf(false));
|
||||||
if(schisandraOssSftpDomainService.update(bo)){
|
if(schisandraOssSftpDomainService.update(bo)){
|
||||||
SpringUtil.unregisterBean(OssConstant.OssType.SFTP+ userId);
|
SpringUtil.unregisterBean(OssConstant.OssType.SFTP+ userId);
|
||||||
|
@@ -67,7 +67,7 @@ public class SchisandraOssTencentController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("return_online")
|
@GetMapping("return_online")
|
||||||
public Result returnOnline(Long userId) {
|
public Result returnOnline(String userId) {
|
||||||
List<SchisandraOssTencentBO> list = schisandraOssTencentDomainService.selectAllPresent(userId);
|
List<SchisandraOssTencentBO> list = schisandraOssTencentDomainService.selectAllPresent(userId);
|
||||||
if(list.isEmpty()){
|
if(list.isEmpty()){
|
||||||
return Result.fail();
|
return Result.fail();
|
||||||
@@ -97,8 +97,8 @@ public class SchisandraOssTencentController {
|
|||||||
}
|
}
|
||||||
Preconditions.checkNotNull(userId, "用户id不能为空!");
|
Preconditions.checkNotNull(userId, "用户id不能为空!");
|
||||||
SchisandraOssTencentBO bo = new SchisandraOssTencentBO();
|
SchisandraOssTencentBO bo = new SchisandraOssTencentBO();
|
||||||
bo.setId(Long.valueOf(Id));
|
bo.setId(Id);
|
||||||
bo.setUserId(Long.valueOf(userId));
|
bo.setUserId(userId);
|
||||||
bo.setStatus(String.valueOf(true));
|
bo.setStatus(String.valueOf(true));
|
||||||
if (schisandraOssTencentDomainService.update(bo)) {
|
if (schisandraOssTencentDomainService.update(bo)) {
|
||||||
return tencentOssConfiguration.tencentOssClient(userId);
|
return tencentOssConfiguration.tencentOssClient(userId);
|
||||||
@@ -113,8 +113,8 @@ public class SchisandraOssTencentController {
|
|||||||
log.info("SchisandraOssTencentController.shutdown.userId:{}", JSON.toJSONString(userId));
|
log.info("SchisandraOssTencentController.shutdown.userId:{}", JSON.toJSONString(userId));
|
||||||
}
|
}
|
||||||
SchisandraOssTencentBO bo = new SchisandraOssTencentBO();
|
SchisandraOssTencentBO bo = new SchisandraOssTencentBO();
|
||||||
bo.setId(Long.valueOf(Id));
|
bo.setId(Id);
|
||||||
bo.setUserId(Long.valueOf(userId));
|
bo.setUserId(userId);
|
||||||
bo.setStatus(String.valueOf(false));
|
bo.setStatus(String.valueOf(false));
|
||||||
if (schisandraOssTencentDomainService.update(bo)) {
|
if (schisandraOssTencentDomainService.update(bo)) {
|
||||||
SpringUtil.unregisterBean(OssConstant.OssType.TENCENT + userId);
|
SpringUtil.unregisterBean(OssConstant.OssType.TENCENT + userId);
|
||||||
|
@@ -68,8 +68,8 @@ public class SchisandraOssUpController {
|
|||||||
}
|
}
|
||||||
Preconditions.checkNotNull(userId, "用户id不能为空!");
|
Preconditions.checkNotNull(userId, "用户id不能为空!");
|
||||||
SchisandraOssUpBO bo = new SchisandraOssUpBO();
|
SchisandraOssUpBO bo = new SchisandraOssUpBO();
|
||||||
bo.setId(Long.valueOf(Id));
|
bo.setId(Id);
|
||||||
bo.setUserId(Long.valueOf(userId));
|
bo.setUserId(userId);
|
||||||
bo.setStatus(String.valueOf(true));
|
bo.setStatus(String.valueOf(true));
|
||||||
if(schisandraOssUpDomainService.update(bo)){
|
if(schisandraOssUpDomainService.update(bo)){
|
||||||
return upOssConfiguration.upOssClient(userId);
|
return upOssConfiguration.upOssClient(userId);
|
||||||
@@ -84,8 +84,8 @@ public class SchisandraOssUpController {
|
|||||||
log.info("SchisandraOssUpController.shutdown.userId:{}", JSON.toJSONString(userId));
|
log.info("SchisandraOssUpController.shutdown.userId:{}", JSON.toJSONString(userId));
|
||||||
}
|
}
|
||||||
SchisandraOssUpBO bo = new SchisandraOssUpBO();
|
SchisandraOssUpBO bo = new SchisandraOssUpBO();
|
||||||
bo.setId(Long.valueOf(Id));
|
bo.setId(Id);
|
||||||
bo.setUserId(Long.valueOf(userId));
|
bo.setUserId(userId);
|
||||||
bo.setStatus(String.valueOf(false));
|
bo.setStatus(String.valueOf(false));
|
||||||
if(schisandraOssUpDomainService.update(bo)){
|
if(schisandraOssUpDomainService.update(bo)){
|
||||||
SpringUtil.unregisterBean(OssConstant.OssType.UP+ userId);
|
SpringUtil.unregisterBean(OssConstant.OssType.UP+ userId);
|
||||||
|
@@ -140,7 +140,7 @@ public class SchisandraUserOssController {
|
|||||||
* @date: 2024/7/11 14:41
|
* @date: 2024/7/11 14:41
|
||||||
*/
|
*/
|
||||||
@GetMapping("selectUserOSSType")
|
@GetMapping("selectUserOSSType")
|
||||||
public Result<Object> selectUserOSSType(Long userId) {
|
public Result<Object> selectUserOSSType(String userId) {
|
||||||
Preconditions.checkNotNull(userId, "不能为空");
|
Preconditions.checkNotNull(userId, "不能为空");
|
||||||
List<SchisandraUserOssDTO> SchisandraUserOssDTOList = SchisandraUserOssDTOConverter.INSTANCE.convertBOListToDTOList(schisandraUserOssDomainService.queryOSSByUserId(userId));
|
List<SchisandraUserOssDTO> SchisandraUserOssDTOList = SchisandraUserOssDTOConverter.INSTANCE.convertBOListToDTOList(schisandraUserOssDomainService.queryOSSByUserId(userId));
|
||||||
if (SchisandraUserOssDTOList.isEmpty()) {
|
if (SchisandraUserOssDTOList.isEmpty()) {
|
||||||
|
@@ -17,12 +17,12 @@ public class SchisandraFileHeatmapDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -18,7 +18,7 @@ public class SchisandraOssAliDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -187,7 +187,7 @@ public class SchisandraOssAliDTO implements Serializable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否开启HTTP重定向。
|
* 是否开启HTTP重定向。
|
||||||
说明: Java SDK 3.10.1及以上版本支持设置是否开启HTTP重定向,默认开启。
|
* 说明: Java SDK 3.10.1及以上版本支持设置是否开启HTTP重定向,默认开启。
|
||||||
*/
|
*/
|
||||||
private String redirectEnable;
|
private String redirectEnable;
|
||||||
|
|
||||||
|
@@ -17,12 +17,12 @@ public class SchisandraOssAwsDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据存储路径
|
* 数据存储路径
|
||||||
|
@@ -17,12 +17,12 @@ public class SchisandraOssBaiduDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -17,12 +17,12 @@ public class SchisandraOssFtpDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -17,12 +17,12 @@ public class SchisandraOssHuaweiDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -17,12 +17,12 @@ public class SchisandraOssJdDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -17,12 +17,12 @@ public class SchisandraOssJdbcDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -17,12 +17,12 @@ public class SchisandraOssJdbcDataDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据
|
* 数据
|
||||||
|
@@ -17,12 +17,12 @@ public class SchisandraOssJdbcStoreDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 主键
|
* 主键
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件/目录名
|
* 文件/目录名
|
||||||
|
@@ -15,14 +15,14 @@ import java.util.Date;
|
|||||||
public class SchisandraOssJinshanDTO implements Serializable {
|
public class SchisandraOssJinshanDTO implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* 主键
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -17,12 +17,12 @@ public class SchisandraOssLocalDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -18,12 +18,12 @@ public class SchisandraOssMinioDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -17,12 +17,12 @@ public class SchisandraOssPinganDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long systemUserId;
|
private String systemUserId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -17,12 +17,12 @@ public class SchisandraOssQingyunDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -18,12 +18,12 @@ public class SchisandraOssQiniuDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -18,12 +18,12 @@ public class SchisandraOssSftpDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主机
|
* 主机
|
||||||
|
@@ -18,12 +18,12 @@ public class SchisandraOssTencentDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -17,12 +17,12 @@ public class SchisandraOssUcloudDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -18,12 +18,12 @@ public class SchisandraOssUpDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -17,12 +17,12 @@ public class SchisandraOssWangyiDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -17,12 +17,12 @@ public class SchisandraUserOssDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -36,7 +36,7 @@ public class SchisandraUserOssDTO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private String configCount;
|
private Integer configCount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -38,7 +38,7 @@ public class AliOssConfiguration {
|
|||||||
|
|
||||||
public Result aliOssClient(String userId) {
|
public Result aliOssClient(String userId) {
|
||||||
CompletableFuture<SchisandraOssAliDTO> futurePrice = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<SchisandraOssAliDTO> futurePrice = CompletableFuture.supplyAsync(() -> {
|
||||||
SchisandraOssAliBO schisandraOssAliBO = schisandraOssAliDomainService.getAliOssConfig(Long.valueOf(userId));
|
SchisandraOssAliBO schisandraOssAliBO = schisandraOssAliDomainService.getAliOssConfig(userId);
|
||||||
SchisandraOssAliDTO schisandraOssAliDTO = SchisandraOssAliDTOConverter.INSTANCE.convertBOToDTO(schisandraOssAliBO);
|
SchisandraOssAliDTO schisandraOssAliDTO = SchisandraOssAliDTOConverter.INSTANCE.convertBOToDTO(schisandraOssAliBO);
|
||||||
return schisandraOssAliDTO;
|
return schisandraOssAliDTO;
|
||||||
});
|
});
|
||||||
|
@@ -85,7 +85,7 @@ public class MinioOssConfiguration {
|
|||||||
|
|
||||||
public SchisandraOssMinioDTO getSchisandraOssMinioDTO(String userId) {
|
public SchisandraOssMinioDTO getSchisandraOssMinioDTO(String userId) {
|
||||||
CompletableFuture<SchisandraOssMinioDTO> futurePrice = CompletableFuture.supplyAsync(() -> {
|
CompletableFuture<SchisandraOssMinioDTO> futurePrice = CompletableFuture.supplyAsync(() -> {
|
||||||
SchisandraOssMinioBO minioBO = schisandraOssMinioDomainService.getMinioConfig(Long.valueOf(userId));
|
SchisandraOssMinioBO minioBO = schisandraOssMinioDomainService.getMinioConfig(userId);
|
||||||
SchisandraOssMinioDTO minioDTO = SchisandraOssMinioDTOConverter.INSTANCE.convertBOToDTO(minioBO);
|
SchisandraOssMinioDTO minioDTO = SchisandraOssMinioDTOConverter.INSTANCE.convertBOToDTO(minioBO);
|
||||||
return minioDTO;
|
return minioDTO;
|
||||||
});
|
});
|
||||||
|
@@ -16,12 +16,12 @@ public class SchisandraFileHeatmapBO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -17,12 +17,12 @@ public class SchisandraOssAliBO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* OSS地址
|
* OSS地址
|
||||||
|
@@ -16,12 +16,12 @@ public class SchisandraOssAwsBO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据存储路径
|
* 数据存储路径
|
||||||
|
@@ -16,12 +16,12 @@ public class SchisandraOssBaiduBO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -16,12 +16,12 @@ public class SchisandraOssFtpBO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -16,13 +16,12 @@ public class SchisandraOssHuaweiBO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@@ -16,12 +16,12 @@ public class SchisandraOssJdBO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -16,12 +16,12 @@ public class SchisandraOssJdbcBO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -16,12 +16,12 @@ public class SchisandraOssJdbcDataBO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据
|
* 数据
|
||||||
|
@@ -14,14 +14,14 @@ import java.util.Date;
|
|||||||
public class SchisandraOssJdbcStoreBO implements Serializable {
|
public class SchisandraOssJdbcStoreBO implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主键
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件/目录名
|
* 文件/目录名
|
||||||
|
@@ -13,16 +13,16 @@ import java.util.Date;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class SchisandraOssJinshanBO implements Serializable {
|
public class SchisandraOssJinshanBO implements Serializable {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String userId;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private Long userId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -16,12 +16,12 @@ public class SchisandraOssLocalBO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -17,12 +17,12 @@ public class SchisandraOssMinioBO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -16,12 +16,12 @@ public class SchisandraOssPinganBO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long systemUserId;
|
private String systemUserId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@@ -16,12 +16,12 @@ public class SchisandraOssQingyunBO implements Serializable {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user