refactor:删除不必要的方法
This commit is contained in:
@@ -46,7 +46,12 @@ public class MqttAliasAppService : IMqttAliasAppService
|
||||
/// </summary>
|
||||
public async Task<int> RemoveAliasAsync(int aliasId)
|
||||
{
|
||||
return await _repoManager.MqttAliases.DeleteByIdAsync(aliasId);
|
||||
var alias = await _repoManager.MqttAliases.GetByIdAsync(aliasId);
|
||||
if (alias == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return await _repoManager.MqttAliases.DeleteAsync(alias);
|
||||
}
|
||||
|
||||
public async Task<List<MqttAlias>> GetAllAsync()
|
||||
|
||||
Reference in New Issue
Block a user