text:故障记录状态修改(批量)
parent
4e14980155
commit
89a39a07fa
|
@ -12,6 +12,7 @@ import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -72,15 +73,19 @@ public class sysCarFaultLogController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改为忽略
|
* 修改为忽略
|
||||||
* @param ids
|
* @param idsStr
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PutMapping("/updateStatusById/{ids}")
|
@PutMapping("/updateStatusById/{ids}")
|
||||||
public Result updateStatusById(@PathVariable("ids")Long[] ids){
|
public Result updateStatusById(@PathVariable("ids")String idsStr){
|
||||||
|
Long[] ids = Arrays.stream(idsStr.split(","))
|
||||||
|
.map(Long::valueOf)
|
||||||
|
.toArray(Long[]::new);
|
||||||
UpdateWrapper<SysCarFaultLog> wrapper = new UpdateWrapper<>();
|
UpdateWrapper<SysCarFaultLog> wrapper = new UpdateWrapper<>();
|
||||||
wrapper.eq("id",ids).set("status",3);
|
wrapper.in("id",ids).set("status",3);
|
||||||
boolean update = service.update(null, wrapper);
|
boolean update = service.update(null, wrapper);
|
||||||
return Result.success(update);
|
return Result.success(update);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue