删除应用

pull/48/head
shao1121353141 1 year ago
parent 72d93ff177
commit 00447e2ede

@ -53,6 +53,20 @@ public interface AppGroupAssociationRepository extends
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
*

@ -137,6 +137,7 @@ public class AppServiceImpl implements AppService {
public boolean deleteApp(Long id) {
AppEntity app = appRequireNonNull(id);
applicationServiceLoader.getApplicationService(app.getTemplate()).delete(id.toString());
appGroupAssociationRepository.deleteAllByAppId(id);
AuditContext
.setTarget(Target.builder().id(id.toString()).type(TargetType.APPLICATION).build());
return true;

Loading…
Cancel
Save