refactor(系统设置): 导入用户接口去掉无用参数

This commit is contained in:
shiziyuan9527 2021-07-05 16:56:42 +08:00 committed by 刘瑞斌
parent 647e725e27
commit fb283860e2
3 changed files with 5 additions and 6 deletions

View File

@ -322,10 +322,10 @@ public class UserController {
userService.userTemplateExport(response);
}
@PostMapping("/import/{userId}")
@PostMapping("/import")
@MsAuditLog(module = "system_user", type = OperLogConstants.IMPORT)
public ExcelResponse testCaseImport(MultipartFile file, @PathVariable String userId, HttpServletRequest request) {
return userService.userImport(file, userId, request);
public ExcelResponse testCaseImport(MultipartFile file, HttpServletRequest request) {
return userService.userImport(file, request);
}
@PostMapping("/special/batchProcessUserInfo")

View File

@ -843,10 +843,9 @@ public class UserService {
return list;
}
public ExcelResponse userImport(MultipartFile multipartFile, String userId, HttpServletRequest request) {
public ExcelResponse userImport(MultipartFile multipartFile, HttpServletRequest request) {
ExcelResponse excelResponse = new ExcelResponse();
String currentWorkspaceId = SessionUtils.getCurrentWorkspaceId();
List<ExcelErrData<TestCaseExcelData>> errList = null;
if (multipartFile == null) {
MSException.throwException(Translator.get("upload_fail"));

View File

@ -109,7 +109,7 @@ export default {
this.fileList.push(file.file);
let user = JSON.parse(localStorage.getItem(TokenKey));
this.result = this.$fileUpload('/user/import/' + user.id, file.file, null, {}, response => {
this.result = this.$fileUpload('/user/import', file.file, null, {}, response => {
let res = response.data;
if (res.success) {
this.$success(this.$t('commons.import_success'));