|
@@ -84,22 +84,19 @@ public class SceneController extends BaseController {
|
|
|
|
|
|
@PostMapping(value = "/list")
|
|
@PostMapping(value = "/list")
|
|
public Result getScenes(@RequestBody RequestScene param) throws Exception {
|
|
public Result getScenes(@RequestBody RequestScene param) throws Exception {
|
|
- String username = JwtUtil.getUsername(getToken());
|
|
|
|
- return Result.success(sceneProService.getScenes(username, param));
|
|
|
|
|
|
+ return Result.success(sceneProService.getScenes(getUserName(), param));
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping("/newList")
|
|
@PostMapping("/newList")
|
|
public Result newList(@RequestBody SceneParam param) {
|
|
public Result newList(@RequestBody SceneParam param) {
|
|
- String username = JwtUtil.getUsername(getToken());
|
|
|
|
- return Result.success(sceneProService.newList(param, username));
|
|
|
|
|
|
+ return Result.success(sceneProService.newList(param, getUserName()));
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping("/getOnlySceneList")
|
|
@PostMapping("/getOnlySceneList")
|
|
public Result getOnlySceneList(@RequestBody SceneParam param) {
|
|
public Result getOnlySceneList(@RequestBody SceneParam param) {
|
|
- String username = JwtUtil.getUsername(getToken());
|
|
|
|
param.setHasFolder(0);
|
|
param.setHasFolder(0);
|
|
- JSONObject jsonObject = sceneProService.newList(param, username);
|
|
|
|
|
|
+ JSONObject jsonObject = sceneProService.newList(param, getUserName());
|
|
JSONObject pageInfo = jsonObject.getJSONObject("pageInfo");
|
|
JSONObject pageInfo = jsonObject.getJSONObject("pageInfo");
|
|
pageInfo.put("endRow", 0);
|
|
pageInfo.put("endRow", 0);
|
|
pageInfo.put("firstPage", param.getPageNum());
|
|
pageInfo.put("firstPage", param.getPageNum());
|
|
@@ -121,8 +118,7 @@ public class SceneController extends BaseController {
|
|
|
|
|
|
@PostMapping("/copyScene")
|
|
@PostMapping("/copyScene")
|
|
public Result copyScene(@RequestBody SceneParam param) throws Exception {
|
|
public Result copyScene(@RequestBody SceneParam param) throws Exception {
|
|
- String username = JwtUtil.getUsername(getToken());
|
|
|
|
- sceneProService.copyScene(param.getSceneNum(), username);
|
|
|
|
|
|
+ sceneProService.copyScene(param.getSceneNum(), getUserName());
|
|
return Result.success();
|
|
return Result.success();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -148,8 +144,7 @@ public class SceneController extends BaseController {
|
|
*/
|
|
*/
|
|
@PostMapping("/downloadScene")
|
|
@PostMapping("/downloadScene")
|
|
public Result downloadScene(@RequestBody SceneParam param) throws Exception {
|
|
public Result downloadScene(@RequestBody SceneParam param) throws Exception {
|
|
- String username = JwtUtil.getUsername(getToken());
|
|
|
|
- return Result.success(downService.down(param.getSceneNum(), username, param.getIsObj()));
|
|
|
|
|
|
+ return Result.success(downService.down(param.getSceneNum(), getUserName(), param.getIsObj()));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -160,7 +155,7 @@ public class SceneController extends BaseController {
|
|
*/
|
|
*/
|
|
@PostMapping("/downloadProcess")
|
|
@PostMapping("/downloadProcess")
|
|
public Result downloadProcess(@RequestBody SceneParam param) throws Exception {
|
|
public Result downloadProcess(@RequestBody SceneParam param) throws Exception {
|
|
- User user = userService.getByUserName(JwtUtil.getUsername(this.getToken()));
|
|
|
|
|
|
+ User user = getUser();
|
|
DownloadProcessVo downloadProcessVo = downService.downloadProcess(user.getId(), param.getSceneNum(), param.getIsObj());
|
|
DownloadProcessVo downloadProcessVo = downService.downloadProcess(user.getId(), param.getSceneNum(), param.getIsObj());
|
|
if (downloadProcessVo.getStatus() == DownloadStatusEnum.DOWNLOAD_FAILED_CODE) {
|
|
if (downloadProcessVo.getStatus() == DownloadStatusEnum.DOWNLOAD_FAILED_CODE) {
|
|
return Result.failure("下载失败!");
|
|
return Result.failure("下载失败!");
|
|
@@ -175,8 +170,7 @@ public class SceneController extends BaseController {
|
|
*/
|
|
*/
|
|
@GetMapping("/checkDownLoadE57")
|
|
@GetMapping("/checkDownLoadE57")
|
|
public Result checkDownLoadE57(@RequestParam(required = false) String num) {
|
|
public Result checkDownLoadE57(@RequestParam(required = false) String num) {
|
|
- String username = JwtUtil.getUsername(getToken());
|
|
|
|
- return Result.success(downService.checkDownLoadE57(num, username));
|
|
|
|
|
|
+ return Result.success(downService.checkDownLoadE57(num, getUserName()));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -185,8 +179,7 @@ public class SceneController extends BaseController {
|
|
*/
|
|
*/
|
|
@GetMapping("/downSceneE57")
|
|
@GetMapping("/downSceneE57")
|
|
public Result downSceneE57(@RequestParam(required = false) String num) {
|
|
public Result downSceneE57(@RequestParam(required = false) String num) {
|
|
- String username = JwtUtil.getUsername(getToken());
|
|
|
|
- return Result.success(downService.downE57(num, username));
|
|
|
|
|
|
+ return Result.success(downService.downE57(num, getUserName()));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -195,8 +188,7 @@ public class SceneController extends BaseController {
|
|
*/
|
|
*/
|
|
@GetMapping("/downloadProcessE57")
|
|
@GetMapping("/downloadProcessE57")
|
|
public Result downloadProcessE57(@RequestParam(required = false) String num) {
|
|
public Result downloadProcessE57(@RequestParam(required = false) String num) {
|
|
- String username = JwtUtil.getUsername(getToken());
|
|
|
|
- return Result.success(downService.downloadProcessE57(num, username));
|
|
|
|
|
|
+ return Result.success(downService.downloadProcessE57(num, getUserName()));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|