|
|
@@ -27,6 +27,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.IOException;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
@@ -90,9 +91,17 @@ public class CartController extends BaseController {
|
|
|
return cartRepo.findById(id).orElseThrow(new BusinessException("无记录"));
|
|
|
}
|
|
|
|
|
|
- @PostMapping("/del/{id}")
|
|
|
- public void del(@PathVariable Long id) {
|
|
|
- cartRepo.softDelete(id);
|
|
|
+// @PostMapping("/del/{id}")
|
|
|
+// public void del(@PathVariable Long id) {
|
|
|
+// cartRepo.softDelete(id);
|
|
|
+// }
|
|
|
+
|
|
|
+ @PostMapping("/del")
|
|
|
+ public void del(String cartIds) {
|
|
|
+ List<String> ids = Arrays.asList(cartIds.split(","));
|
|
|
+ ids.forEach(id -> {
|
|
|
+ cartRepo.softDelete(Long.valueOf(id));
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
@GetMapping("/excel")
|