mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-08 09:58:56 +08:00
mybatis-jpa-extra2.5 &batch delete
mybatis-jpa-extra2.5 &batch delete
This commit is contained in:
parent
2fdd018239
commit
2d36296deb
@ -21,13 +21,16 @@
|
||||
*(MAXKEY-210720) Jira SAML集成指南
|
||||
*(MAXKEY-210721) 官方网站内容的优化,增加同类产品的比较,用户构建指南,完善集成应用列表
|
||||
*(MAXKEY-210722) 日志信息的完善,包括登录过程日志,初始化日志,单点登录日志等
|
||||
*(MAXKEY-210723) mgt登录错误提示信息
|
||||
*(MAXKEY-210724) 依赖jar引用、更新和升级
|
||||
*(MAXKEY-210723) mgt登录错误提示信息
|
||||
*(MAXKEY-210724) 警告提示信息修复
|
||||
*(MAXKEY-210725) 工具类增强和优化
|
||||
*(MAXKEY-210726) 依赖jar引用、更新和升级
|
||||
spring 5.3.10
|
||||
springBoot 2.5.5
|
||||
springkafka 2.7.7
|
||||
spring-cloud 3.0.4
|
||||
springcloudalibabacspl 1.8.2
|
||||
mybatis-jpa-extra 2.5
|
||||
tomcat 9.0.53
|
||||
kafkaclients 2.8.1
|
||||
jibGradlePlugin 3.1.4
|
||||
|
||||
@ -51,7 +51,7 @@ public class ScimOrganizationController {
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||
public MappingJacksonValue getOrganization(@PathVariable String id,
|
||||
@RequestParam(required = false) String attributes) {
|
||||
Organization user = null;
|
||||
//Organization user = null;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
BIN
maxkey-lib/mybatis-jpa-extra-2.5.jar
Normal file
BIN
maxkey-lib/mybatis-jpa-extra-2.5.jar
Normal file
Binary file not shown.
Binary file not shown.
@ -40,6 +40,7 @@ import org.opensaml.common.binding.security.IssueInstantRule;
|
||||
import org.opensaml.common.binding.security.MessageReplayRule;
|
||||
import org.opensaml.util.storage.MapBasedStorageService;
|
||||
import org.opensaml.util.storage.ReplayCache;
|
||||
import org.opensaml.util.storage.ReplayCacheEntry;
|
||||
import org.opensaml.xml.ConfigurationException;
|
||||
import org.opensaml.xml.parse.BasicParserPool;
|
||||
import org.slf4j.Logger;
|
||||
@ -195,7 +196,7 @@ public class Saml20AutoConfiguration implements InitializingBean {
|
||||
* @return replayCache
|
||||
*/
|
||||
@Bean(name = "replayCache")
|
||||
public ReplayCache replayCache(MapBasedStorageService mapBasedStorageService,
|
||||
public ReplayCache replayCache(MapBasedStorageService<String, ReplayCacheEntry> mapBasedStorageService,
|
||||
@Value("${maxkey.saml.v20.replay.cache.life.in.millis}") long duration) {
|
||||
ReplayCache replayCache = new ReplayCache(mapBasedStorageService,duration);
|
||||
return replayCache;
|
||||
|
||||
@ -139,7 +139,7 @@ public class AdaptersController {
|
||||
public Message delete(@ModelAttribute("appsAdapter") AppsAdapters appsAdapter) {
|
||||
_logger.debug("-delete appsAdapter :" + appsAdapter);
|
||||
|
||||
if (appsAdaptersService.remove(appsAdapter.getId())) {
|
||||
if (appsAdaptersService.batchDelete(appsAdapter.getId())) {
|
||||
return new Message(WebContext.getI18nValue(ConstantsOperateMessage.DELETE_SUCCESS),MessageType.success);
|
||||
|
||||
} else {
|
||||
|
||||
@ -157,7 +157,7 @@ public class ApplicationsController extends BaseAppContorller {
|
||||
@RequestMapping(value={"/delete"})
|
||||
public Message delete(@ModelAttribute("application") Apps application) {
|
||||
_logger.debug("-delete application :" + application);
|
||||
if (appsService.delete(application)) {
|
||||
if (appsService.batchDelete(application.getId())) {
|
||||
return new Message(WebContext.getI18nValue(ConstantsOperateMessage.DELETE_SUCCESS),MessageType.success);
|
||||
|
||||
} else {
|
||||
|
||||
@ -135,10 +135,7 @@ public class AccountsController {
|
||||
|
||||
_logger.debug("-delete AppAccounts :" + appAccounts);
|
||||
|
||||
String[] appAccountsds=appAccounts.getId().split(",");
|
||||
for(int i=0;i<appAccountsds.length;i++){
|
||||
accountsService.remove(appAccountsds[i]);
|
||||
}
|
||||
accountsService.batchDelete(appAccounts.getId());
|
||||
|
||||
return new Message(WebContext.getI18nValue(ConstantsOperateMessage.DELETE_SUCCESS),MessageType.success);
|
||||
|
||||
|
||||
@ -146,18 +146,11 @@ public class GroupMemberController {
|
||||
if (groupMember == null || groupMember.getId() == null) {
|
||||
return new Message("传入参数为空",MessageType.error);
|
||||
}
|
||||
boolean result = true;
|
||||
String groupMemberIds = groupMember.getId();
|
||||
if (groupMemberIds != null) {
|
||||
String[] arrMemberIds = groupMemberIds.split(",");
|
||||
for (int i = 0; i < arrMemberIds.length; i++) {
|
||||
groupMemberService.remove(arrMemberIds[i]);
|
||||
}
|
||||
if(!result) {
|
||||
return new Message(WebContext.getI18nValue(ConstantsOperateMessage.INSERT_ERROR),MessageType.error);
|
||||
}
|
||||
|
||||
if(groupMemberService.batchDelete(groupMember.getId())) {
|
||||
return new Message(WebContext.getI18nValue(ConstantsOperateMessage.INSERT_SUCCESS),MessageType.info);
|
||||
}
|
||||
return new Message(WebContext.getI18nValue(ConstantsOperateMessage.INSERT_SUCCESS),MessageType.info);
|
||||
return new Message(WebContext.getI18nValue(ConstantsOperateMessage.INSERT_ERROR),MessageType.error);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -127,22 +127,12 @@ public class GroupPrivilegesController {
|
||||
if (groupApp == null || groupApp.getId() == null) {
|
||||
return new Message("传入参数为空",MessageType.error);
|
||||
}
|
||||
String privilegesIds = groupApp.getId();
|
||||
|
||||
|
||||
boolean result = true;
|
||||
if (privilegesIds != null) {
|
||||
String[] arrPrivilegesIds = privilegesIds.split(",");
|
||||
|
||||
for (int i = 0; i < arrPrivilegesIds.length; i++) {
|
||||
result = groupPrivilegesService.remove(arrPrivilegesIds[i]);
|
||||
}
|
||||
if(!result) {
|
||||
return new Message(WebContext.getI18nValue(ConstantsOperateMessage.INSERT_ERROR),MessageType.error);
|
||||
}
|
||||
|
||||
if(groupPrivilegesService.batchDelete(groupApp.getId())) {
|
||||
return new Message(WebContext.getI18nValue(ConstantsOperateMessage.INSERT_SUCCESS),MessageType.info);
|
||||
}
|
||||
return new Message(WebContext.getI18nValue(ConstantsOperateMessage.INSERT_SUCCESS),MessageType.info);
|
||||
|
||||
return new Message(WebContext.getI18nValue(ConstantsOperateMessage.INSERT_ERROR),MessageType.error);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -129,7 +129,7 @@ public class NoticesController {
|
||||
public Message delete(@ModelAttribute("notice")Notices notice) {
|
||||
_logger.debug("-delete notice :" + notice);
|
||||
|
||||
if (noticesService.remove(notice.getId())) {
|
||||
if (noticesService.batchDelete(notice.getId())) {
|
||||
return new Message(WebContext.getI18nValue(ConstantsOperateMessage.DELETE_SUCCESS),MessageType.success);
|
||||
|
||||
} else {
|
||||
|
||||
@ -185,7 +185,7 @@ public class OrganizationsController {
|
||||
@RequestMapping({"/delete"})
|
||||
public Message delete(@ModelAttribute("org") Organizations org) {
|
||||
_logger.debug("-delete organization :" + org);
|
||||
if (this.organizationsService.remove(org.getId())) {
|
||||
if (this.organizationsService.batchDelete(org.getId())) {
|
||||
return new Message(WebContext.getI18nValue("message.action.delete.success"), MessageType.success);
|
||||
}
|
||||
|
||||
|
||||
@ -142,7 +142,7 @@ public class ResourcesController {
|
||||
public Message delete(@ModelAttribute("resource") Resources resource) {
|
||||
_logger.debug("-delete resource :" + resource);
|
||||
|
||||
if (resourcesService.remove(resource.getId())) {
|
||||
if (resourcesService.batchDelete(resource.getId())) {
|
||||
return new Message(WebContext.getI18nValue(ConstantsOperateMessage.DELETE_SUCCESS),MessageType.success);
|
||||
|
||||
} else {
|
||||
|
||||
@ -133,18 +133,10 @@ public class RoleMemberController {
|
||||
if (roleMember == null || roleMember.getId() == null) {
|
||||
return new Message("传入参数为空",MessageType.error);
|
||||
}
|
||||
boolean result = true;
|
||||
String roleMemberIds = roleMember.getId();
|
||||
if (roleMemberIds != null) {
|
||||
String[] arrMemberIds = roleMemberIds.split(",");
|
||||
for (int i = 0; i < arrMemberIds.length; i++) {
|
||||
roleMemberService.remove(arrMemberIds[i]);
|
||||
}
|
||||
if(!result) {
|
||||
return new Message(WebContext.getI18nValue(ConstantsOperateMessage.INSERT_ERROR),MessageType.error);
|
||||
}
|
||||
|
||||
if(roleMemberService.batchDelete(roleMember.getId())) {
|
||||
return new Message(WebContext.getI18nValue(ConstantsOperateMessage.INSERT_SUCCESS),MessageType.info);
|
||||
}
|
||||
return new Message(WebContext.getI18nValue(ConstantsOperateMessage.INSERT_SUCCESS),MessageType.info);
|
||||
return new Message(WebContext.getI18nValue(ConstantsOperateMessage.INSERT_ERROR),MessageType.error);
|
||||
}
|
||||
}
|
||||
|
||||
@ -134,9 +134,8 @@ public class UserAdjointController {
|
||||
public Message delete(@ModelAttribute("userInfoAdjoint") UserInfoAdjoint userInfoAdjoint) {
|
||||
_logger.debug("-delete group :" + userInfoAdjoint);
|
||||
|
||||
if (userInfoAdjointService.remove(userInfoAdjoint.getId())) {
|
||||
if (userInfoAdjointService.batchDelete(userInfoAdjoint.getId())) {
|
||||
return new Message(WebContext.getI18nValue(ConstantsOperateMessage.DELETE_SUCCESS),MessageType.success);
|
||||
|
||||
} else {
|
||||
return new Message(WebContext.getI18nValue(ConstantsOperateMessage.DELETE_SUCCESS),MessageType.error);
|
||||
}
|
||||
|
||||
@ -222,7 +222,7 @@ public class UserInfoController {
|
||||
@RequestMapping(value="/delete")
|
||||
public Message deleteUsersById(@RequestParam("id") String id) {
|
||||
_logger.debug(id);
|
||||
if(userInfoService.batchDelete(StringUtils.string2List(id, ","))) {
|
||||
if(userInfoService.batchDelete(id)) {
|
||||
//provisioningPrepare.prepare(userInfo, OPERATEACTION.DELETE_ACTION);
|
||||
return new Message(WebContext.getI18nValue(ConstantsOperateMessage.DELETE_SUCCESS),MessageType.success);
|
||||
} else {
|
||||
|
||||
@ -102,8 +102,7 @@ public class LoginSessionController {
|
||||
for(String sessionId : StringUtils.string2List(ids, ",")) {
|
||||
_logger.trace("terminate session Id {} ",sessionId);
|
||||
if(currentUserSessionId.contains(sessionId)) {
|
||||
//skip current session
|
||||
continue;
|
||||
continue;//skip current session
|
||||
}
|
||||
UserInfo userInfo = WebContext.getUserInfo();
|
||||
String lastLogoffTime = DateUtils.formatDateTime(new Date());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user