用户物品导出

This commit is contained in:
2023-11-14 11:36:58 +08:00
parent 66222d5d93
commit 55dd565e92
4 changed files with 16 additions and 13 deletions

View File

@@ -119,13 +119,13 @@ public class GorseController extends BaseController {
}
@PutMapping(value = "/bulk/{type}")
public ResponseData bulkUser(@RequestParam Map<String, String> data, @RequestParam("file") MultipartFile file, @PathVariable("type") String type) throws Exception {
public ResponseData bulkUserOrItem(@RequestParam Map<String, String> data, @RequestParam("file") MultipartFile file, @PathVariable("type") String type) throws Exception {
return success(gorseService.bulkUserOrItem(data, file, type));
}
@GetMapping(value = "/get_bulk_user")
public ResponseData getBulkUser() throws Exception {
return success(gorseService.getBulkUser());
@GetMapping(value = "/get_bulk/{type}")
public String getBulkUserOrItem(@PathVariable("type") String type) throws Exception {
return gorseService.getBulkUserOrItem(type);
}

View File

@@ -127,8 +127,11 @@ public class GorseService {
}
public File getBulkUser() throws IOException {
return this.request("GET", this.endpoint + "/api/bulk/users", null, File.class);
/**
* 导出用户或物品信息
*/
public String getBulkUserOrItem(String type) {
return "redirect:" + this.endpoint + "/api/bulk/" + type;
}
public JSONObject sendPostFormData(String url, MultipartEntityBuilder builder) throws IOException {