|
|
@@ -59,7 +59,6 @@ import com.xjrsoft.module.organization.service.IUserRoleRelationService;
|
|
|
import com.xjrsoft.module.organization.service.IUserService;
|
|
|
import com.xjrsoft.module.organization.service.IUserStudentService;
|
|
|
import com.xjrsoft.module.organization.utils.OrganizationUtil;
|
|
|
-import com.xjrsoft.module.organization.vo.DepartmentTreeVo;
|
|
|
import com.xjrsoft.module.organization.vo.PendingCountDto;
|
|
|
import com.xjrsoft.module.organization.vo.ResetUserPageVo;
|
|
|
import com.xjrsoft.module.organization.vo.ResetUserRoleVo;
|
|
|
@@ -73,7 +72,8 @@ import com.xjrsoft.module.organization.vo.UserStudentVo;
|
|
|
import com.xjrsoft.module.organization.vo.UserVo;
|
|
|
import com.xjrsoft.module.oss.factory.OssFactory;
|
|
|
import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
|
|
|
-import com.xjrsoft.module.student.vo.BaseStudentTreeVo;
|
|
|
+import com.xjrsoft.module.system.entity.File;
|
|
|
+import com.xjrsoft.module.system.service.IFileService;
|
|
|
import com.xjrsoft.module.workflow.service.IWorkflowExecuteService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
@@ -127,6 +127,8 @@ public class UserController {
|
|
|
|
|
|
private final RedisUtil redisUtil;
|
|
|
|
|
|
+ private final IFileService fileService;
|
|
|
+
|
|
|
private final SmsCtcc smsCtcc;
|
|
|
private final IBaseGradeService baseGradeService;
|
|
|
private final IUserStudentService userStudentService;
|
|
|
@@ -633,4 +635,28 @@ public class UserController {
|
|
|
public R unBindStudent(@Valid @RequestParam Long id) {
|
|
|
return R.ok(baseClassService.getStudents(id));
|
|
|
}
|
|
|
+
|
|
|
+ @GetMapping("/upload-sign")
|
|
|
+ @ApiOperation(value = "上传签名")
|
|
|
+ public RT<Boolean> uploadSign(@Valid @RequestParam Long folderId) {
|
|
|
+ long loginIdAsLong = StpUtil.getLoginIdAsLong();
|
|
|
+ User user = userService.getById(loginIdAsLong);
|
|
|
+ user.setSignFolderId(folderId);
|
|
|
+ return RT.ok(userService.updateById(user));
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/getSign")
|
|
|
+ @ApiOperation(value = "获取登录者的签名url")
|
|
|
+ public RT<String> getSign() {
|
|
|
+ long loginIdAsLong = StpUtil.getLoginIdAsLong();
|
|
|
+ User user = userService.getById(loginIdAsLong);
|
|
|
+ if(user.getSignFolderId() == null){
|
|
|
+ return RT.error("未上传签名");
|
|
|
+ }
|
|
|
+ List<File> list = fileService.list(Wrappers.lambdaQuery(File.class).eq(File::getFolderId, user.getSignFolderId()));
|
|
|
+ if(list.isEmpty()){
|
|
|
+ return RT.error("签名文件丢失");
|
|
|
+ }
|
|
|
+ return RT.ok(list.get(0).getFileUrl());
|
|
|
+ }
|
|
|
}
|