mirror of https://gitee.com/topiam/eiam
删除应用
parent
72d93ff177
commit
00447e2ede
|
@ -53,6 +53,20 @@ public interface AppGroupAssociationRepository extends
|
||||||
void deleteByGroupIdAndAppId(@Param("groupId") Long groupId, @Param("appId") Long appId);
|
void deleteByGroupIdAndAppId(@Param("groupId") Long groupId, @Param("appId") Long appId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除关联
|
||||||
|
*
|
||||||
|
* @param appId {@link Long}
|
||||||
|
* @return {@link Boolean}
|
||||||
|
*/
|
||||||
|
@Modifying
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Query(value = "UPDATE app_group_association SET " + SOFT_DELETE_SET
|
||||||
|
+ " WHERE app_id = :appId", nativeQuery = true)
|
||||||
|
void deleteAllByAppId(@Param(value = "appId") Long appId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据应用ID删除关联信息
|
* 根据应用ID删除关联信息
|
||||||
*
|
*
|
||||||
|
|
|
@ -137,6 +137,7 @@ public class AppServiceImpl implements AppService {
|
||||||
public boolean deleteApp(Long id) {
|
public boolean deleteApp(Long id) {
|
||||||
AppEntity app = appRequireNonNull(id);
|
AppEntity app = appRequireNonNull(id);
|
||||||
applicationServiceLoader.getApplicationService(app.getTemplate()).delete(id.toString());
|
applicationServiceLoader.getApplicationService(app.getTemplate()).delete(id.toString());
|
||||||
|
appGroupAssociationRepository.deleteAllByAppId(id);
|
||||||
AuditContext
|
AuditContext
|
||||||
.setTarget(Target.builder().id(id.toString()).type(TargetType.APPLICATION).build());
|
.setTarget(Target.builder().id(id.toString()).type(TargetType.APPLICATION).build());
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue