!39 移除lombok

Merge pull request !39 from alvis/alvis
This commit is contained in:
alvis 2021-01-04 15:49:25 +08:00 committed by Gitee
commit 2543014ae2
8 changed files with 42 additions and 20 deletions

View File

@ -5,8 +5,6 @@ import com.mindskip.xzs.base.RestResponse;
import com.mindskip.xzs.service.*;
import com.mindskip.xzs.utility.DateTimeUtil;
import com.mindskip.xzs.viewmodel.admin.dashboard.IndexVM;
import com.mindskip.xzs.service.*;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@ -15,16 +13,22 @@ import java.util.List;
@RestController("AdminDashboardController")
@RequestMapping(value = "/api/admin/dashboard")
@AllArgsConstructor
public class DashboardController extends BaseApiController {
private final ExamPaperService examPaperService;
private final QuestionService questionService;
private final ExamPaperAnswerService examPaperAnswerService;
private final ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService;
private final UserEventLogService userEventLogService;
public DashboardController(ExamPaperService examPaperService, QuestionService questionService, ExamPaperAnswerService examPaperAnswerService, ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService, UserEventLogService userEventLogService) {
this.examPaperService = examPaperService;
this.questionService = questionService;
this.examPaperAnswerService = examPaperAnswerService;
this.examPaperQuestionCustomerAnswerService = examPaperQuestionCustomerAnswerService;
this.userEventLogService = userEventLogService;
}
@RequestMapping(value = "/index", method = RequestMethod.POST)
public RestResponse<IndexVM> Index() {
IndexVM vm = new IndexVM();

View File

@ -10,7 +10,6 @@ import com.mindskip.xzs.viewmodel.admin.education.SubjectEditRequestVM;
import com.mindskip.xzs.viewmodel.admin.education.SubjectPageRequestVM;
import com.mindskip.xzs.viewmodel.admin.education.SubjectResponseVM;
import com.github.pagehelper.PageInfo;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
@ -18,11 +17,14 @@ import java.util.List;
@RestController("AdminEducationController")
@RequestMapping(value = "/api/admin/education")
@AllArgsConstructor
public class EducationController extends BaseApiController {
private final SubjectService subjectService;
public EducationController(SubjectService subjectService) {
this.subjectService = subjectService;
}
@RequestMapping(value = "/subject/list", method = RequestMethod.POST)
public RestResponse<List<Subject>> list() {
List<Subject> subjects = subjectService.allSubject();

View File

@ -10,18 +10,20 @@ import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperPageRequestVM;
import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM;
import com.mindskip.xzs.viewmodel.admin.exam.ExamResponseVM;
import com.github.pagehelper.PageInfo;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
@RestController("AdminExamPaperController")
@RequestMapping(value = "/api/admin/exam/paper")
@AllArgsConstructor
public class ExamPaperController extends BaseApiController {
private final ExamPaperService examPaperService;
public ExamPaperController(ExamPaperService examPaperService) {
this.examPaperService = examPaperService;
}
@RequestMapping(value = "/page", method = RequestMethod.POST)
public RestResponse<PageInfo<ExamResponseVM>> pageList(@RequestBody ExamPaperPageRequestVM model) {
PageInfo<ExamPaper> pageInfo = examPaperService.page(model);

View File

@ -14,7 +14,6 @@ import com.mindskip.xzs.viewmodel.admin.message.MessagePageRequestVM;
import com.mindskip.xzs.viewmodel.admin.message.MessageResponseVM;
import com.mindskip.xzs.viewmodel.admin.message.MessageSendVM;
import com.github.pagehelper.PageInfo;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@ -27,12 +26,16 @@ import java.util.stream.Collectors;
@RestController("AdminMessageController")
@RequestMapping(value = "/api/admin/message")
@AllArgsConstructor
public class MessageController extends BaseApiController {
private final MessageService messageService;
private final UserService userService;
public MessageController(MessageService messageService, UserService userService) {
this.messageService = messageService;
this.userService = userService;
}
@RequestMapping(value = "/page", method = RequestMethod.POST)
public RestResponse<PageInfo<MessageResponseVM>> pageList(@RequestBody MessagePageRequestVM model) {
PageInfo<Message> pageInfo = messageService.page(model);

View File

@ -14,8 +14,6 @@ import com.mindskip.xzs.viewmodel.admin.question.QuestionEditRequestVM;
import com.mindskip.xzs.viewmodel.admin.question.QuestionPageRequestVM;
import com.mindskip.xzs.viewmodel.admin.question.QuestionResponseVM;
import com.github.pagehelper.PageInfo;
import com.mindskip.xzs.utility.*;
import lombok.AllArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.*;
@ -23,12 +21,16 @@ import javax.validation.Valid;
@RestController("AdminQuestionController")
@RequestMapping(value = "/api/admin/question")
@AllArgsConstructor
public class QuestionController extends BaseApiController {
private final QuestionService questionService;
private final TextContentService textContentService;
public QuestionController(QuestionService questionService, TextContentService textContentService) {
this.questionService = questionService;
this.textContentService = textContentService;
}
@RequestMapping(value = "/page", method = RequestMethod.POST)
public RestResponse<PageInfo<QuestionResponseVM>> pageList(@RequestBody QuestionPageRequestVM model) {
PageInfo<Question> pageInfo = questionService.page(model);

View File

@ -11,18 +11,20 @@ import com.mindskip.xzs.viewmodel.admin.task.TaskPageRequestVM;
import com.mindskip.xzs.viewmodel.admin.task.TaskPageResponseVM;
import com.mindskip.xzs.viewmodel.admin.task.TaskRequestVM;
import com.github.pagehelper.PageInfo;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
@RestController("AdminTaskController")
@RequestMapping(value = "/api/admin/task")
@AllArgsConstructor
public class TaskController extends BaseApiController {
private final TaskExamService taskExamService;
public TaskController(TaskExamService taskExamService) {
this.taskExamService = taskExamService;
}
@RequestMapping(value = "/page", method = RequestMethod.POST)
public RestResponse<PageInfo<TaskPageResponseVM>> pageList(@RequestBody TaskPageRequestVM model) {
PageInfo<TaskExam> pageInfo = taskExamService.page(model);

View File

@ -8,7 +8,6 @@ import com.mindskip.xzs.service.FileUpload;
import com.mindskip.xzs.service.UserService;
import com.mindskip.xzs.viewmodel.admin.file.UeditorConfigVM;
import com.mindskip.xzs.viewmodel.admin.file.UploadResultVM;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -24,7 +23,6 @@ import java.util.Arrays;
@Slf4j
@AllArgsConstructor
@RequestMapping("/api/admin/upload")
@RestController("AdminUploadController")
public class UploadController extends BaseApiController {
@ -36,6 +34,12 @@ public class UploadController extends BaseApiController {
private static final String IMAGE_UPLOAD_FILE = "upFile";
private final UserService userService;
public UploadController(FileUpload fileUpload, SystemConfig systemConfig, UserService userService) {
this.fileUpload = fileUpload;
this.systemConfig = systemConfig;
this.userService = userService;
}
@ResponseBody
@RequestMapping("/configAndUpload")
public Object upload(HttpServletRequest request, HttpServletResponse response) {

View File

@ -13,8 +13,6 @@ import com.mindskip.xzs.utility.DateTimeUtil;
import com.mindskip.xzs.viewmodel.admin.user.*;
import com.mindskip.xzs.utility.PageInfoHelper;
import com.github.pagehelper.PageInfo;
import com.mindskip.xzs.viewmodel.admin.user.*;
import lombok.AllArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.*;
@ -30,13 +28,18 @@ import java.util.UUID;
*/
@RestController("AdminUserController")
@RequestMapping(value = "/api/admin/user")
@AllArgsConstructor
public class UserController extends BaseApiController {
private final UserService userService;
private final UserEventLogService userEventLogService;
private final AuthenticationService authenticationService;
public UserController(UserService userService, UserEventLogService userEventLogService, AuthenticationService authenticationService) {
this.userService = userService;
this.userEventLogService = userEventLogService;
this.authenticationService = authenticationService;
}
@RequestMapping(value = "/page/list", method = RequestMethod.POST)
public RestResponse<PageInfo<UserResponseVM>> pageList(@RequestBody UserPageRequestVM model) {