Skip to content

Commit

Permalink
fix: robot delete failed from project menu
Browse files Browse the repository at this point in the history
  • Loading branch information
mmagi committed Jun 8, 2023
1 parent 925d123 commit a840cac
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
package org.cloud.sonic.controller.controller;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
Expand Down Expand Up @@ -93,7 +94,7 @@ public RespModel<String> delete(
@Parameter(name = "projectId", description = "项目id") int projectId,
@RequestParam(name = "id") int id
) {
if (alertRobotsService.removeByMap(Map.of("id", id, "projectId", projectId))) {
if (alertRobotsService.remove(Wrappers.lambdaQuery(AlertRobots.class).eq(AlertRobots::getId, id).eq(AlertRobots::getProjectId, projectId))) {
return new RespModel<>(RespEnum.DELETE_OK);
} else {
return new RespModel<>(RespEnum.DELETE_FAIL);
Expand Down

0 comments on commit a840cac

Please sign in to comment.