commit
2543014ae2
@ -5,8 +5,6 @@ import com.mindskip.xzs.base.RestResponse;
|
|||||||
import com.mindskip.xzs.service.*;
|
import com.mindskip.xzs.service.*;
|
||||||
import com.mindskip.xzs.utility.DateTimeUtil;
|
import com.mindskip.xzs.utility.DateTimeUtil;
|
||||||
import com.mindskip.xzs.viewmodel.admin.dashboard.IndexVM;
|
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.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@ -15,16 +13,22 @@ import java.util.List;
|
|||||||
|
|
||||||
@RestController("AdminDashboardController")
|
@RestController("AdminDashboardController")
|
||||||
@RequestMapping(value = "/api/admin/dashboard")
|
@RequestMapping(value = "/api/admin/dashboard")
|
||||||
@AllArgsConstructor
|
|
||||||
public class DashboardController extends BaseApiController {
|
public class DashboardController extends BaseApiController {
|
||||||
|
|
||||||
|
|
||||||
private final ExamPaperService examPaperService;
|
private final ExamPaperService examPaperService;
|
||||||
private final QuestionService questionService;
|
private final QuestionService questionService;
|
||||||
private final ExamPaperAnswerService examPaperAnswerService;
|
private final ExamPaperAnswerService examPaperAnswerService;
|
||||||
private final ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService;
|
private final ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService;
|
||||||
private final UserEventLogService userEventLogService;
|
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)
|
@RequestMapping(value = "/index", method = RequestMethod.POST)
|
||||||
public RestResponse<IndexVM> Index() {
|
public RestResponse<IndexVM> Index() {
|
||||||
IndexVM vm = new IndexVM();
|
IndexVM vm = new IndexVM();
|
||||||
|
@ -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.SubjectPageRequestVM;
|
||||||
import com.mindskip.xzs.viewmodel.admin.education.SubjectResponseVM;
|
import com.mindskip.xzs.viewmodel.admin.education.SubjectResponseVM;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@ -18,11 +17,14 @@ import java.util.List;
|
|||||||
|
|
||||||
@RestController("AdminEducationController")
|
@RestController("AdminEducationController")
|
||||||
@RequestMapping(value = "/api/admin/education")
|
@RequestMapping(value = "/api/admin/education")
|
||||||
@AllArgsConstructor
|
|
||||||
public class EducationController extends BaseApiController {
|
public class EducationController extends BaseApiController {
|
||||||
|
|
||||||
private final SubjectService subjectService;
|
private final SubjectService subjectService;
|
||||||
|
|
||||||
|
public EducationController(SubjectService subjectService) {
|
||||||
|
this.subjectService = subjectService;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/subject/list", method = RequestMethod.POST)
|
@RequestMapping(value = "/subject/list", method = RequestMethod.POST)
|
||||||
public RestResponse<List<Subject>> list() {
|
public RestResponse<List<Subject>> list() {
|
||||||
List<Subject> subjects = subjectService.allSubject();
|
List<Subject> subjects = subjectService.allSubject();
|
||||||
|
@ -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.ExamPaperEditRequestVM;
|
||||||
import com.mindskip.xzs.viewmodel.admin.exam.ExamResponseVM;
|
import com.mindskip.xzs.viewmodel.admin.exam.ExamResponseVM;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@RestController("AdminExamPaperController")
|
@RestController("AdminExamPaperController")
|
||||||
@RequestMapping(value = "/api/admin/exam/paper")
|
@RequestMapping(value = "/api/admin/exam/paper")
|
||||||
@AllArgsConstructor
|
|
||||||
public class ExamPaperController extends BaseApiController {
|
public class ExamPaperController extends BaseApiController {
|
||||||
|
|
||||||
private final ExamPaperService examPaperService;
|
private final ExamPaperService examPaperService;
|
||||||
|
|
||||||
|
public ExamPaperController(ExamPaperService examPaperService) {
|
||||||
|
this.examPaperService = examPaperService;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
||||||
public RestResponse<PageInfo<ExamResponseVM>> pageList(@RequestBody ExamPaperPageRequestVM model) {
|
public RestResponse<PageInfo<ExamResponseVM>> pageList(@RequestBody ExamPaperPageRequestVM model) {
|
||||||
PageInfo<ExamPaper> pageInfo = examPaperService.page(model);
|
PageInfo<ExamPaper> pageInfo = examPaperService.page(model);
|
||||||
|
@ -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.MessageResponseVM;
|
||||||
import com.mindskip.xzs.viewmodel.admin.message.MessageSendVM;
|
import com.mindskip.xzs.viewmodel.admin.message.MessageSendVM;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
@ -27,12 +26,16 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
@RestController("AdminMessageController")
|
@RestController("AdminMessageController")
|
||||||
@RequestMapping(value = "/api/admin/message")
|
@RequestMapping(value = "/api/admin/message")
|
||||||
@AllArgsConstructor
|
|
||||||
public class MessageController extends BaseApiController {
|
public class MessageController extends BaseApiController {
|
||||||
|
|
||||||
private final MessageService messageService;
|
private final MessageService messageService;
|
||||||
private final UserService userService;
|
private final UserService userService;
|
||||||
|
|
||||||
|
public MessageController(MessageService messageService, UserService userService) {
|
||||||
|
this.messageService = messageService;
|
||||||
|
this.userService = userService;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
||||||
public RestResponse<PageInfo<MessageResponseVM>> pageList(@RequestBody MessagePageRequestVM model) {
|
public RestResponse<PageInfo<MessageResponseVM>> pageList(@RequestBody MessagePageRequestVM model) {
|
||||||
PageInfo<Message> pageInfo = messageService.page(model);
|
PageInfo<Message> pageInfo = messageService.page(model);
|
||||||
|
@ -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.QuestionPageRequestVM;
|
||||||
import com.mindskip.xzs.viewmodel.admin.question.QuestionResponseVM;
|
import com.mindskip.xzs.viewmodel.admin.question.QuestionResponseVM;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.mindskip.xzs.utility.*;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@ -23,12 +21,16 @@ import javax.validation.Valid;
|
|||||||
|
|
||||||
@RestController("AdminQuestionController")
|
@RestController("AdminQuestionController")
|
||||||
@RequestMapping(value = "/api/admin/question")
|
@RequestMapping(value = "/api/admin/question")
|
||||||
@AllArgsConstructor
|
|
||||||
public class QuestionController extends BaseApiController {
|
public class QuestionController extends BaseApiController {
|
||||||
|
|
||||||
private final QuestionService questionService;
|
private final QuestionService questionService;
|
||||||
private final TextContentService textContentService;
|
private final TextContentService textContentService;
|
||||||
|
|
||||||
|
public QuestionController(QuestionService questionService, TextContentService textContentService) {
|
||||||
|
this.questionService = questionService;
|
||||||
|
this.textContentService = textContentService;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
||||||
public RestResponse<PageInfo<QuestionResponseVM>> pageList(@RequestBody QuestionPageRequestVM model) {
|
public RestResponse<PageInfo<QuestionResponseVM>> pageList(@RequestBody QuestionPageRequestVM model) {
|
||||||
PageInfo<Question> pageInfo = questionService.page(model);
|
PageInfo<Question> pageInfo = questionService.page(model);
|
||||||
|
@ -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.TaskPageResponseVM;
|
||||||
import com.mindskip.xzs.viewmodel.admin.task.TaskRequestVM;
|
import com.mindskip.xzs.viewmodel.admin.task.TaskRequestVM;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@RestController("AdminTaskController")
|
@RestController("AdminTaskController")
|
||||||
@RequestMapping(value = "/api/admin/task")
|
@RequestMapping(value = "/api/admin/task")
|
||||||
@AllArgsConstructor
|
|
||||||
public class TaskController extends BaseApiController {
|
public class TaskController extends BaseApiController {
|
||||||
|
|
||||||
private final TaskExamService taskExamService;
|
private final TaskExamService taskExamService;
|
||||||
|
|
||||||
|
public TaskController(TaskExamService taskExamService) {
|
||||||
|
this.taskExamService = taskExamService;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
||||||
public RestResponse<PageInfo<TaskPageResponseVM>> pageList(@RequestBody TaskPageRequestVM model) {
|
public RestResponse<PageInfo<TaskPageResponseVM>> pageList(@RequestBody TaskPageRequestVM model) {
|
||||||
PageInfo<TaskExam> pageInfo = taskExamService.page(model);
|
PageInfo<TaskExam> pageInfo = taskExamService.page(model);
|
||||||
|
@ -8,7 +8,6 @@ import com.mindskip.xzs.service.FileUpload;
|
|||||||
import com.mindskip.xzs.service.UserService;
|
import com.mindskip.xzs.service.UserService;
|
||||||
import com.mindskip.xzs.viewmodel.admin.file.UeditorConfigVM;
|
import com.mindskip.xzs.viewmodel.admin.file.UeditorConfigVM;
|
||||||
import com.mindskip.xzs.viewmodel.admin.file.UploadResultVM;
|
import com.mindskip.xzs.viewmodel.admin.file.UploadResultVM;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -24,7 +23,6 @@ import java.util.Arrays;
|
|||||||
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@AllArgsConstructor
|
|
||||||
@RequestMapping("/api/admin/upload")
|
@RequestMapping("/api/admin/upload")
|
||||||
@RestController("AdminUploadController")
|
@RestController("AdminUploadController")
|
||||||
public class UploadController extends BaseApiController {
|
public class UploadController extends BaseApiController {
|
||||||
@ -36,6 +34,12 @@ public class UploadController extends BaseApiController {
|
|||||||
private static final String IMAGE_UPLOAD_FILE = "upFile";
|
private static final String IMAGE_UPLOAD_FILE = "upFile";
|
||||||
private final UserService userService;
|
private final UserService userService;
|
||||||
|
|
||||||
|
public UploadController(FileUpload fileUpload, SystemConfig systemConfig, UserService userService) {
|
||||||
|
this.fileUpload = fileUpload;
|
||||||
|
this.systemConfig = systemConfig;
|
||||||
|
this.userService = userService;
|
||||||
|
}
|
||||||
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@RequestMapping("/configAndUpload")
|
@RequestMapping("/configAndUpload")
|
||||||
public Object upload(HttpServletRequest request, HttpServletResponse response) {
|
public Object upload(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
@ -13,8 +13,6 @@ import com.mindskip.xzs.utility.DateTimeUtil;
|
|||||||
import com.mindskip.xzs.viewmodel.admin.user.*;
|
import com.mindskip.xzs.viewmodel.admin.user.*;
|
||||||
import com.mindskip.xzs.utility.PageInfoHelper;
|
import com.mindskip.xzs.utility.PageInfoHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.mindskip.xzs.viewmodel.admin.user.*;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -30,13 +28,18 @@ import java.util.UUID;
|
|||||||
*/
|
*/
|
||||||
@RestController("AdminUserController")
|
@RestController("AdminUserController")
|
||||||
@RequestMapping(value = "/api/admin/user")
|
@RequestMapping(value = "/api/admin/user")
|
||||||
@AllArgsConstructor
|
|
||||||
public class UserController extends BaseApiController {
|
public class UserController extends BaseApiController {
|
||||||
|
|
||||||
private final UserService userService;
|
private final UserService userService;
|
||||||
private final UserEventLogService userEventLogService;
|
private final UserEventLogService userEventLogService;
|
||||||
private final AuthenticationService authenticationService;
|
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)
|
@RequestMapping(value = "/page/list", method = RequestMethod.POST)
|
||||||
public RestResponse<PageInfo<UserResponseVM>> pageList(@RequestBody UserPageRequestVM model) {
|
public RestResponse<PageInfo<UserResponseVM>> pageList(@RequestBody UserPageRequestVM model) {
|
||||||
|
Loading…
Reference in New Issue
Block a user