|
@@ -3,9 +3,13 @@ package com.xjrsoft.module.student.controller;
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
|
+import com.xjrsoft.common.enums.EnabledMark;
|
|
|
import com.xjrsoft.common.model.result.RT;
|
|
import com.xjrsoft.common.model.result.RT;
|
|
|
import com.xjrsoft.common.page.ConventPage;
|
|
import com.xjrsoft.common.page.ConventPage;
|
|
|
import com.xjrsoft.common.page.PageOutput;
|
|
import com.xjrsoft.common.page.PageOutput;
|
|
|
|
|
+import com.xjrsoft.module.organization.entity.User;
|
|
|
|
|
+import com.xjrsoft.module.organization.service.IUserService;
|
|
|
|
|
+import com.xjrsoft.module.student.dto.ActiveAccountDto;
|
|
|
import com.xjrsoft.module.student.dto.AddBaseNewStudentDto;
|
|
import com.xjrsoft.module.student.dto.AddBaseNewStudentDto;
|
|
|
import com.xjrsoft.module.student.dto.BaseNewStudentPageDto;
|
|
import com.xjrsoft.module.student.dto.BaseNewStudentPageDto;
|
|
|
import com.xjrsoft.module.student.dto.UpdateBaseNewStudentDto;
|
|
import com.xjrsoft.module.student.dto.UpdateBaseNewStudentDto;
|
|
@@ -32,6 +36,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
import javax.validation.Valid;
|
|
import javax.validation.Valid;
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
|
|
|
+import java.time.LocalDateTime;
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
import java.util.LinkedHashMap;
|
|
import java.util.LinkedHashMap;
|
|
@@ -50,7 +55,7 @@ import java.util.Map;
|
|
|
@AllArgsConstructor
|
|
@AllArgsConstructor
|
|
|
public class BaseNewStudentController {
|
|
public class BaseNewStudentController {
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+ private final IUserService userService;
|
|
|
private final IBaseNewStudentService baseNewStudentService;
|
|
private final IBaseNewStudentService baseNewStudentService;
|
|
|
|
|
|
|
|
@GetMapping(value = "/page")
|
|
@GetMapping(value = "/page")
|
|
@@ -187,7 +192,10 @@ public class BaseNewStudentController {
|
|
|
|
|
|
|
|
@PostMapping("/active-account")
|
|
@PostMapping("/active-account")
|
|
|
@ApiOperation(value = "激活账号")
|
|
@ApiOperation(value = "激活账号")
|
|
|
- public RT<Boolean> activeAccount(@Valid @RequestBody AddBaseNewStudentDto dto) throws IOException {
|
|
|
|
|
|
|
+ public RT<Boolean> activeAccount(@Valid @RequestBody ActiveAccountDto dto) {
|
|
|
|
|
+ User user = userService.getById(dto.getId());
|
|
|
|
|
+ user.setEnabledMark(EnabledMark.ENABLED.getCode());
|
|
|
|
|
+ user.setModifyDate(LocalDateTime.now());
|
|
|
return RT.ok(true);
|
|
return RT.ok(true);
|
|
|
}
|
|
}
|
|
|
|
|
|