|
@@ -10,7 +10,7 @@ import com.qmth.paper.library.business.bean.result.DictionaryResult;
|
|
|
import com.qmth.paper.library.business.bean.result.EditResult;
|
|
|
import com.qmth.paper.library.business.enums.DictionaryEnum;
|
|
|
import com.qmth.paper.library.business.enums.LoginTypeEnum;
|
|
|
-import com.qmth.paper.library.business.service.PrintCommonService;
|
|
|
+import com.qmth.paper.library.business.service.PaperLibraryCommonService;
|
|
|
import com.qmth.paper.library.common.bean.auth.AuthBean;
|
|
|
import com.qmth.paper.library.common.bean.result.LoginResult;
|
|
|
import com.qmth.paper.library.common.bean.result.UserLoginCheckResult;
|
|
@@ -61,7 +61,7 @@ public class SysController {
|
|
|
CommonCacheService commonCacheService;
|
|
|
|
|
|
@Resource
|
|
|
- PrintCommonService printCommonService;
|
|
|
+ PaperLibraryCommonService paperLibraryCommonService;
|
|
|
|
|
|
@Resource
|
|
|
TBTaskService tbTaskService;
|
|
@@ -73,7 +73,7 @@ public class SysController {
|
|
|
SysUserRoleService sysUserRoleService;
|
|
|
|
|
|
@Resource
|
|
|
- TeachcloudCommonService teachcloudCommonService;
|
|
|
+ LibraryCommonService libraryCommonService;
|
|
|
|
|
|
@Resource
|
|
|
BasicStudentService basicStudentService;
|
|
@@ -181,7 +181,7 @@ public class SysController {
|
|
|
|
|
|
if (login.getSchoolCode().equalsIgnoreCase(SystemConstant.ADMIN_CODE)) {
|
|
|
userList.forEach(o -> {
|
|
|
- AuthBean authBean = teachcloudCommonService.getUserAuth(o.getId());
|
|
|
+ AuthBean authBean = libraryCommonService.getUserAuth(o.getId());
|
|
|
if (Objects.nonNull(authBean) && Objects.nonNull(authBean.getRoleList()) && authBean.getRoleList().size() > 0) {
|
|
|
if (Objects.nonNull(authBean.getSchool())) {
|
|
|
throw ExceptionResultEnum.ERROR.exception("用户无法通过当前页面登录");
|
|
@@ -190,7 +190,7 @@ public class SysController {
|
|
|
});
|
|
|
}
|
|
|
SysUser sysUser = userList.get(0);
|
|
|
- LoginResult loginResult = teachcloudCommonService.login(login.getPassword(), sysUser, AppSourceEnum.SYSTEM);
|
|
|
+ LoginResult loginResult = libraryCommonService.login(login.getPassword(), sysUser, AppSourceEnum.SYSTEM);
|
|
|
|
|
|
return ResultUtil.ok(loginResult);
|
|
|
}
|
|
@@ -205,7 +205,7 @@ public class SysController {
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "返回信息", response = EditResult.class)})
|
|
|
public Result logout() throws NoSuchAlgorithmException {
|
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
- teachcloudCommonService.removeUserInfo(sysUser.getId(), false);
|
|
|
+ libraryCommonService.removeUserInfo(sysUser.getId(), false);
|
|
|
return ResultUtil.ok();
|
|
|
}
|
|
|
|
|
@@ -369,7 +369,7 @@ public class SysController {
|
|
|
@ApiParam(value = "上传文件类型", required = true) @RequestParam UploadFileEnum type) {
|
|
|
BasicAttachment basicAttachment = null;
|
|
|
try {
|
|
|
- basicAttachment = printCommonService.saveAttachment(file, ServletUtil.getRequestMd5(), type);
|
|
|
+ basicAttachment = paperLibraryCommonService.saveAttachment(file, ServletUtil.getRequestMd5(), type);
|
|
|
if (Objects.isNull(basicAttachment)) {
|
|
|
throw ExceptionResultEnum.ATTACHMENT_ERROR.exception();
|
|
|
}
|
|
@@ -384,7 +384,7 @@ public class SysController {
|
|
|
ResultUtil.error(e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
- return ResultUtil.ok(new EditResult(basicAttachment.getId(), teachcloudCommonService.filePreview(basicAttachment.getPath()), basicAttachment.getPages()));
|
|
|
+ return ResultUtil.ok(new EditResult(basicAttachment.getId(), libraryCommonService.filePreview(basicAttachment.getPath()), basicAttachment.getPages()));
|
|
|
}
|
|
|
|
|
|
|
|
@@ -396,7 +396,7 @@ public class SysController {
|
|
|
throw ExceptionResultEnum.ERROR.exception("没有附件");
|
|
|
} else {
|
|
|
BasicAttachment basicAttachment = basicAttachmentService.getById(Long.parseLong(id));
|
|
|
- return ResultUtil.ok(new EditResult(teachcloudCommonService.filePreview(basicAttachment.getPath())));
|
|
|
+ return ResultUtil.ok(new EditResult(libraryCommonService.filePreview(basicAttachment.getPath())));
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -417,7 +417,7 @@ public class SysController {
|
|
|
@RequestMapping(value = "/get_code", method = RequestMethod.POST)
|
|
|
public Result getCode(@ApiParam(value = "编码类型", required = true) @RequestParam SystemCodeEnum type) {
|
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
- String number = teachcloudCommonService.getSysIncrCode(type, sysUser);
|
|
|
+ String number = libraryCommonService.getSysIncrCode(type, sysUser);
|
|
|
return ResultUtil.ok((Object) number);
|
|
|
}
|
|
|
|