This commit is contained in:
mindskip
2021-01-15 11:39:44 +08:00
parent 01eafa8efc
commit ba63ef6d15
342 changed files with 3005 additions and 4397 deletions

View File

@@ -1,15 +1,29 @@
package com.mindskip.xzs.base;
import lombok.Data;
/**
* @author 武汉思维跳跃科技有限公司
*/
@Data
public class BasePage {
private Integer pageIndex;
private Integer pageSize;
public Integer getPageIndex() {
return pageIndex;
}
public void setPageIndex(Integer pageIndex) {
this.pageIndex = pageIndex;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
}

View File

@@ -7,32 +7,32 @@ public enum SystemCode {
/**
* OK
*/
OK(1, "Success"),
OK(1, "成功"),
/**
* AccessTokenError
*/
AccessTokenError(400, "User login token is invalid"),
AccessTokenError(400, "用户登录令牌失效"),
/**
* UNAUTHORIZED
*/
UNAUTHORIZED(401, "User is not logged in"),
UNAUTHORIZED(401, "用户未登录"),
/**
* UNAUTHORIZED
*/
AuthError(402, "Wrong user name or password"),
AuthError(402, "用户名或密码错误"),
/**
* InnerError
*/
InnerError(500, "Internal System Error"),
InnerError(500, "系统内部错误"),
/**
* ParameterValidError
*/
ParameterValidError(501, "Parameter validation error"),
ParameterValidError(501, "参数验证错误"),
/**
* AccessDenied
*/
AccessDenied(502,"User does not have permission to access");
AccessDenied(502,"用户没有权限访问");
int code;
String message;

View File

@@ -1,9 +1,25 @@
package com.mindskip.xzs.configuration.property;
import lombok.Data;
@Data
public class PasswordKeyConfig {
private String publicKey;
private String privateKey;
public String getPublicKey() {
return publicKey;
}
public void setPublicKey(String publicKey) {
this.publicKey = publicKey;
}
public String getPrivateKey() {
return privateKey;
}
public void setPrivateKey(String privateKey) {
this.privateKey = privateKey;
}
}

View File

@@ -1,14 +1,46 @@
package com.mindskip.xzs.configuration.property;
import lombok.Data;
import java.time.Duration;
import java.util.List;
@Data
public class QnConfig {
private String url;
private String bucket;
private String accessKey;
private String secretKey;
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getBucket() {
return bucket;
}
public void setBucket(String bucket) {
this.bucket = bucket;
}
public String getAccessKey() {
return accessKey;
}
public void setAccessKey(String accessKey) {
this.accessKey = accessKey;
}
public String getSecretKey() {
return secretKey;
}
public void setSecretKey(String secretKey) {
this.secretKey = secretKey;
}
}

View File

@@ -1,6 +1,5 @@
package com.mindskip.xzs.configuration.property;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import java.util.List;
@@ -10,10 +9,43 @@ import java.util.List;
* @author 武汉思维跳跃科技有限公司
*/
@ConfigurationProperties(prefix = "system")
@Data
public class SystemConfig {
private PasswordKeyConfig pwdKey;
private List<String> securityIgnoreUrls;
private WxConfig wx;
private QnConfig qn;
public PasswordKeyConfig getPwdKey() {
return pwdKey;
}
public void setPwdKey(PasswordKeyConfig pwdKey) {
this.pwdKey = pwdKey;
}
public List<String> getSecurityIgnoreUrls() {
return securityIgnoreUrls;
}
public void setSecurityIgnoreUrls(List<String> securityIgnoreUrls) {
this.securityIgnoreUrls = securityIgnoreUrls;
}
public WxConfig getWx() {
return wx;
}
public void setWx(WxConfig wx) {
this.wx = wx;
}
public QnConfig getQn() {
return qn;
}
public void setQn(QnConfig qn) {
this.qn = qn;
}
}

View File

@@ -1,14 +1,47 @@
package com.mindskip.xzs.configuration.property;
import lombok.Data;
import java.time.Duration;
import java.util.List;
@Data
public class WxConfig {
private String appid;
private String secret;
private Duration tokenToLive;
private List<String> securityIgnoreUrls;
public String getAppid() {
return appid;
}
public void setAppid(String appid) {
this.appid = appid;
}
public String getSecret() {
return secret;
}
public void setSecret(String secret) {
this.secret = secret;
}
public Duration getTokenToLive() {
return tokenToLive;
}
public void setTokenToLive(Duration tokenToLive) {
this.tokenToLive = tokenToLive;
}
public List<String> getSecurityIgnoreUrls() {
return securityIgnoreUrls;
}
public void setSecurityIgnoreUrls(List<String> securityIgnoreUrls) {
this.securityIgnoreUrls = securityIgnoreUrls;
}
}

View File

@@ -2,7 +2,7 @@ package com.mindskip.xzs.configuration.spring.mvc;
import com.mindskip.xzs.configuration.property.SystemConfig;
import com.mindskip.xzs.configuration.spring.wx.TokenHandlerInterceptor;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.*;
@@ -14,12 +14,17 @@ import java.util.List;
*/
@Configuration
@AllArgsConstructor
public class WebMvcConfiguration extends WebMvcConfigurationSupport {
private final TokenHandlerInterceptor tokenHandlerInterceptor;
private final SystemConfig systemConfig;
@Autowired
public WebMvcConfiguration(TokenHandlerInterceptor tokenHandlerInterceptor, SystemConfig systemConfig) {
this.tokenHandlerInterceptor = tokenHandlerInterceptor;
this.systemConfig = systemConfig;
}
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addRedirectViewController("/", "/student/index.html");

View File

@@ -1,14 +1,37 @@
package com.mindskip.xzs.configuration.spring.security;
import lombok.Data;
/**
* @author 武汉思维跳跃科技有限公司
*/
@Data
public class AuthenticationBean {
private String userName;
private String password;
private boolean remember;
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public boolean isRemember() {
return remember;
}
public void setRemember(boolean remember) {
this.remember = remember;
}
}

View File

@@ -4,7 +4,7 @@ import com.mindskip.xzs.base.SystemCode;
import com.mindskip.xzs.domain.UserEventLog;
import com.mindskip.xzs.event.UserEvent;
import com.mindskip.xzs.service.UserService;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.userdetails.User;
@@ -23,18 +23,23 @@ import java.util.Date;
* @author 武汉思维跳跃科技有限公司
*/
@Component
@AllArgsConstructor
public class RestAuthenticationSuccessHandler extends SimpleUrlAuthenticationSuccessHandler {
private final ApplicationEventPublisher eventPublisher;
private final UserService userService;
@Autowired
public RestAuthenticationSuccessHandler(ApplicationEventPublisher eventPublisher, UserService userService) {
this.eventPublisher = eventPublisher;
this.userService = userService;
}
@Override
public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException {
User springUser = (User) authentication.getPrincipal();
com.mindskip.xzs.domain.User user = userService.getUserByUserName(springUser.getUsername());
UserEventLog userEventLog = new UserEventLog(user.getId(), user.getUserName(), user.getRealName(), new Date());
userEventLog.setContent(user.getUserName() + " 登录了Tek Systems出题系统");
userEventLog.setContent(user.getUserName() + " 登录了学之思考试系统");
eventPublisher.publishEvent(new UserEvent(userEventLog));
com.mindskip.xzs.domain.User newUser = new com.mindskip.xzs.domain.User();
newUser.setUserName(user.getUserName());

View File

@@ -5,7 +5,7 @@ import com.mindskip.xzs.domain.User;
import com.mindskip.xzs.domain.UserEventLog;
import com.mindskip.xzs.event.UserEvent;
import com.mindskip.xzs.service.UserService;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler;
@@ -21,12 +21,17 @@ import java.util.Date;
* @author 武汉思维跳跃科技有限公司
*/
@Component
@AllArgsConstructor
public class RestLogoutSuccessHandler extends SimpleUrlLogoutSuccessHandler {
private final ApplicationEventPublisher eventPublisher;
private final UserService userService;
@Autowired
public RestLogoutSuccessHandler(ApplicationEventPublisher eventPublisher, UserService userService) {
this.eventPublisher = eventPublisher;
this.userService = userService;
}
@Override
public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) {
org.springframework.security.core.userdetails.User springUser = (org.springframework.security.core.userdetails.User) authentication.getPrincipal();

View File

@@ -3,7 +3,7 @@ package com.mindskip.xzs.configuration.spring.security;
import com.mindskip.xzs.configuration.property.CookieConfig;
import com.mindskip.xzs.configuration.property.SystemConfig;
import com.mindskip.xzs.domain.enums.RoleEnum;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
@@ -27,7 +27,6 @@ import java.util.List;
public class SecurityConfigurer {
@Configuration
@AllArgsConstructor
public static class FormLoginWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter {
private final SystemConfig systemConfig;
@@ -39,6 +38,18 @@ public class SecurityConfigurer {
private final RestLogoutSuccessHandler restLogoutSuccessHandler;
private final RestAccessDeniedHandler restAccessDeniedHandler;
@Autowired
public FormLoginWebSecurityConfigurerAdapter(SystemConfig systemConfig, LoginAuthenticationEntryPoint restAuthenticationEntryPoint, RestAuthenticationProvider restAuthenticationProvider, RestDetailsServiceImpl formDetailsService, RestAuthenticationSuccessHandler restAuthenticationSuccessHandler, RestAuthenticationFailureHandler restAuthenticationFailureHandler, RestLogoutSuccessHandler restLogoutSuccessHandler, RestAccessDeniedHandler restAccessDeniedHandler) {
this.systemConfig = systemConfig;
this.restAuthenticationEntryPoint = restAuthenticationEntryPoint;
this.restAuthenticationProvider = restAuthenticationProvider;
this.formDetailsService = formDetailsService;
this.restAuthenticationSuccessHandler = restAuthenticationSuccessHandler;
this.restAuthenticationFailureHandler = restAuthenticationFailureHandler;
this.restLogoutSuccessHandler = restLogoutSuccessHandler;
this.restAccessDeniedHandler = restAccessDeniedHandler;
}
/**
* @param http http
* @throws Exception exception

View File

@@ -2,18 +2,22 @@ package com.mindskip.xzs.context;
import com.mindskip.xzs.domain.User;
import com.mindskip.xzs.service.UserService;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
@Component
@AllArgsConstructor
public class WebContext {
private static final String USER_ATTRIBUTES = "USER_ATTRIBUTES";
private final UserService userService;
@Autowired
public WebContext(UserService userService) {
this.userService = userService;
}
public void setCurrentUser(User user) {
RequestContextHolder.currentRequestAttributes().setAttribute(USER_ATTRIBUTES, user, RequestAttributes.SCOPE_REQUEST);

View File

@@ -5,8 +5,7 @@ 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@@ -15,16 +14,23 @@ 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;
@Autowired
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

@@ -4,14 +4,13 @@ package com.mindskip.xzs.controller.admin;
import com.mindskip.xzs.base.BaseApiController;
import com.mindskip.xzs.base.RestResponse;
import com.mindskip.xzs.domain.Subject;
import com.mindskip.xzs.service.IndustryService;
import com.mindskip.xzs.service.SubjectService;
import com.mindskip.xzs.utility.PageInfoHelper;
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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
@@ -19,11 +18,15 @@ import java.util.List;
@RestController("AdminEducationController")
@RequestMapping(value = "/api/admin/education")
@AllArgsConstructor
public class EducationController extends BaseApiController {
private final SubjectService subjectService;
@Autowired
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,22 @@ 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.beans.factory.annotation.Autowired;
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;
@Autowired
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

@@ -1,62 +0,0 @@
package com.mindskip.xzs.controller.admin;
import com.github.pagehelper.PageInfo;
import com.mindskip.xzs.base.BaseApiController;
import com.mindskip.xzs.base.RestResponse;
import com.mindskip.xzs.domain.Industry;
import com.mindskip.xzs.service.IndustryService;
import com.mindskip.xzs.utility.PageInfoHelper;
import com.mindskip.xzs.viewmodel.admin.industry.IndustryEditRequestVM;
import com.mindskip.xzs.viewmodel.admin.industry.IndustryPageRequestVM;
import com.mindskip.xzs.viewmodel.admin.industry.IndustryResponseVM;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.List;
@RestController("AdminIndustryController")
@RequestMapping(value = "/api/admin")
@AllArgsConstructor
public class IndustryController extends BaseApiController {
private final IndustryService industryService;
@RequestMapping(value = "/industry/list", method = RequestMethod.POST)
public RestResponse<List<Industry>> list() {
List<Industry> industries = industryService.allIndustry();
return RestResponse.ok(industries);
}
@RequestMapping(value = "/industry/page", method = RequestMethod.POST)
public RestResponse<PageInfo<IndustryResponseVM>> pageList(@RequestBody IndustryPageRequestVM model) {
PageInfo<Industry> pageInfo = industryService.page(model);
PageInfo<IndustryResponseVM> page = PageInfoHelper.copyMap(pageInfo, e -> modelMapper.map(e, IndustryResponseVM.class));
return RestResponse.ok(page);
}
@RequestMapping(value = "/industry/edit", method = RequestMethod.POST)
public RestResponse edit(@RequestBody @Valid IndustryEditRequestVM model) {
Industry industry = modelMapper.map(model, Industry.class);
if (model.getId() == null) {
industryService.insertByFilter(industry);
} else {
industryService.updateByIdFilter(industry);
}
return RestResponse.ok();
}
@RequestMapping(value = "/industry/select/{id}", method = RequestMethod.POST)
public RestResponse<IndustryEditRequestVM> select(@PathVariable Integer id) {
Industry industry = industryService.selectById(id);
IndustryEditRequestVM vm = modelMapper.map(industry, IndustryEditRequestVM.class);
return RestResponse.ok(vm);
}
@RequestMapping(value = "/industry/delete/{id}", method = RequestMethod.POST)
public RestResponse delete(@PathVariable Integer id) {
industryService.deleteById(id);
return RestResponse.ok();
}
}

View File

@@ -14,7 +14,7 @@ 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -27,12 +27,17 @@ 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;
@Autowired
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

@@ -5,39 +5,33 @@ import com.mindskip.xzs.base.RestResponse;
import com.mindskip.xzs.base.SystemCode;
import com.mindskip.xzs.domain.Question;
import com.mindskip.xzs.domain.TextContent;
import com.mindskip.xzs.domain.User;
import com.mindskip.xzs.domain.UserEventLog;
import com.mindskip.xzs.domain.enums.QuestionTypeEnum;
import com.mindskip.xzs.domain.question.QuestionObject;
import com.mindskip.xzs.event.UserEvent;
import com.mindskip.xzs.service.IndustryService;
import com.mindskip.xzs.service.QuestionService;
import com.mindskip.xzs.service.SkillService;
import com.mindskip.xzs.service.TextContentService;
import com.mindskip.xzs.utility.*;
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.context.ApplicationEventPublisher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.Date;
@RestController("AdminQuestionController")
@RequestMapping(value = "/api/admin/question")
@AllArgsConstructor
public class QuestionController extends BaseApiController {
private final QuestionService questionService;
private final TextContentService textContentService;
private final ApplicationEventPublisher eventPublisher;
private final IndustryService industryService;
private final SkillService skillService;
@Autowired
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) {
@@ -61,24 +55,13 @@ public class QuestionController extends BaseApiController {
if (validQuestionEditRequestResult.getCode() != SystemCode.OK.getCode()) {
return validQuestionEditRequestResult;
}
User user = getCurrentUser();
UserEventLog userEventLog = new UserEventLog(user.getId(), user.getUserName(), user.getRealName(), new Date());
String content = "";
if (null == model.getId()) {
Question question = questionService.insertFullQuestion(model, getCurrentUser().getId());
content = user.getUserName() + "增加 [题号——>"+question.getId()+"] " +
"[industry——>"+industryService.selectById(model.getIndustryId()).getName()+"] " +
"[skill——>"+skillService.selectById(model.getSkillId()).getName()+"]";
questionService.insertFullQuestion(model, getCurrentUser().getId());
} else {
questionService.updateFullQuestion(model);
content = user.getUserName() + "更新 [题号——>"+model.getId()+"] " +
"[industry——>"+industryService.selectById(model.getIndustryId()).getName()+"] " +
"[skill——>"+skillService.selectById(model.getSkillId()).getName()+"]";
}
userEventLog.setContent(content);
eventPublisher.publishEvent(new UserEvent(userEventLog));
return RestResponse.ok();
}
@@ -94,13 +77,6 @@ public class QuestionController extends BaseApiController {
Question question = questionService.selectById(id);
question.setDeleted(true);
questionService.updateByIdFilter(question);
User user = getCurrentUser();
UserEventLog userEventLog = new UserEventLog(user.getId(), user.getUserName(), user.getRealName(), new Date());
String content = user.getUserName() + "删除 [题号——>"+question.getId()+"] " +
"[industry——>"+industryService.selectById(question.getIndustryId()).getName()+"] " +
"[skill——>"+skillService.selectById(question.getSkillId()).getName()+"]";
userEventLog.setContent(content);
eventPublisher.publishEvent(new UserEvent(userEventLog));
return RestResponse.ok();
}

View File

@@ -1,62 +0,0 @@
package com.mindskip.xzs.controller.admin;
import com.github.pagehelper.PageInfo;
import com.mindskip.xzs.base.BaseApiController;
import com.mindskip.xzs.base.RestResponse;
import com.mindskip.xzs.domain.Skill;
import com.mindskip.xzs.service.SkillService;
import com.mindskip.xzs.utility.PageInfoHelper;
import com.mindskip.xzs.viewmodel.admin.skill.SkillEditRequestVM;
import com.mindskip.xzs.viewmodel.admin.skill.SkillPageRequestVM;
import com.mindskip.xzs.viewmodel.admin.skill.SkillResponseVM;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.List;
@RestController("AdminSkillController")
@RequestMapping(value = "/api/admin")
@AllArgsConstructor
public class SkillController extends BaseApiController {
private final SkillService skillService;
@RequestMapping(value = "/skill/list", method = RequestMethod.POST)
public RestResponse<List<Skill>> list() {
List<Skill> industries = skillService.allSkill();
return RestResponse.ok(industries);
}
@RequestMapping(value = "/skill/page", method = RequestMethod.POST)
public RestResponse<PageInfo<SkillResponseVM>> pageList(@RequestBody SkillPageRequestVM model) {
PageInfo<Skill> pageInfo = skillService.page(model);
PageInfo<SkillResponseVM> page = PageInfoHelper.copyMap(pageInfo, e -> modelMapper.map(e, SkillResponseVM.class));
return RestResponse.ok(page);
}
@RequestMapping(value = "/skill/edit", method = RequestMethod.POST)
public RestResponse edit(@RequestBody @Valid SkillEditRequestVM model) {
Skill skill = modelMapper.map(model, Skill.class);
if (model.getId() == null) {
skillService.insertByFilter(skill);
} else {
skillService.updateByIdFilter(skill);
}
return RestResponse.ok();
}
@RequestMapping(value = "/skill/select/{id}", method = RequestMethod.POST)
public RestResponse<SkillEditRequestVM> select(@PathVariable Integer id) {
Skill skill = skillService.selectById(id);
SkillEditRequestVM vm = modelMapper.map(skill, SkillEditRequestVM.class);
return RestResponse.ok(vm);
}
@RequestMapping(value = "/skill/delete/{id}", method = RequestMethod.POST)
public RestResponse delete(@PathVariable Integer id) {
skillService.deleteById(id);
return RestResponse.ok();
}
}

View File

@@ -11,18 +11,22 @@ 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.beans.factory.annotation.Autowired;
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;
@Autowired
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,10 +8,9 @@ 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;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@@ -23,8 +22,6 @@ import java.io.InputStream;
import java.util.Arrays;
@Slf4j
@AllArgsConstructor
@RequestMapping("/api/admin/upload")
@RestController("AdminUploadController")
public class UploadController extends BaseApiController {
@@ -36,6 +33,13 @@ public class UploadController extends BaseApiController {
private static final String IMAGE_UPLOAD_FILE = "upFile";
private final UserService userService;
@Autowired
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,10 +13,9 @@ 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
@@ -30,13 +29,19 @@ 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;
@Autowired
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) {

View File

@@ -13,9 +13,7 @@ import com.mindskip.xzs.service.*;
import com.mindskip.xzs.utility.DateTimeUtil;
import com.mindskip.xzs.utility.JsonUtil;
import com.mindskip.xzs.viewmodel.student.dashboard.*;
import com.mindskip.xzs.service.*;
import com.mindskip.xzs.viewmodel.student.dashboard.*;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@@ -27,7 +25,6 @@ import java.util.stream.Collectors;
@RestController("StudentDashboardController")
@RequestMapping(value = "/api/student/dashboard")
@AllArgsConstructor
public class DashboardController extends BaseApiController {
private final UserService userService;
@@ -37,6 +34,16 @@ public class DashboardController extends BaseApiController {
private final TaskExamCustomerAnswerService taskExamCustomerAnswerService;
private final TextContentService textContentService;
@Autowired
public DashboardController(UserService userService, ExamPaperService examPaperService, QuestionService questionService, TaskExamService taskExamService, TaskExamCustomerAnswerService taskExamCustomerAnswerService, TextContentService textContentService) {
this.userService = userService;
this.examPaperService = examPaperService;
this.questionService = questionService;
this.taskExamService = taskExamService;
this.taskExamCustomerAnswerService = taskExamCustomerAnswerService;
this.textContentService = textContentService;
}
@RequestMapping(value = "/index", method = RequestMethod.POST)
public RestResponse<IndexVM> index() {
IndexVM indexVM = new IndexVM();

View File

@@ -8,7 +8,7 @@ import com.mindskip.xzs.domain.User;
import com.mindskip.xzs.service.SubjectService;
import com.mindskip.xzs.viewmodel.student.education.SubjectEditRequestVM;
import com.mindskip.xzs.viewmodel.student.education.SubjectVM;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@@ -16,11 +16,15 @@ import java.util.stream.Collectors;
@RestController("StudentEducationController")
@RequestMapping(value = "/api/student/education")
@AllArgsConstructor
public class EducationController extends BaseApiController {
private final SubjectService subjectService;
@Autowired
public EducationController(SubjectService subjectService) {
this.subjectService = subjectService;
}
@RequestMapping(value = "/subject/list", method = RequestMethod.POST)
public RestResponse<List<SubjectVM>> list() {
User user = getCurrentUser();

View File

@@ -18,8 +18,7 @@ import com.mindskip.xzs.viewmodel.student.exam.ExamPaperSubmitVM;
import com.mindskip.xzs.viewmodel.student.exampaper.ExamPaperAnswerPageResponseVM;
import com.mindskip.xzs.viewmodel.student.exampaper.ExamPaperAnswerPageVM;
import com.github.pagehelper.PageInfo;
import com.mindskip.xzs.domain.*;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.web.bind.annotation.*;
@@ -28,7 +27,6 @@ import java.util.Date;
@RestController("StudentExamPaperAnswerController")
@RequestMapping(value = "/api/student/exampaper/answer")
@AllArgsConstructor
public class ExamPaperAnswerController extends BaseApiController {
private final ExamPaperAnswerService examPaperAnswerService;
@@ -36,6 +34,14 @@ public class ExamPaperAnswerController extends BaseApiController {
private final SubjectService subjectService;
private final ApplicationEventPublisher eventPublisher;
@Autowired
public ExamPaperAnswerController(ExamPaperAnswerService examPaperAnswerService, ExamPaperService examPaperService, SubjectService subjectService, ApplicationEventPublisher eventPublisher) {
this.examPaperAnswerService = examPaperAnswerService;
this.examPaperService = examPaperService;
this.subjectService = subjectService;
this.eventPublisher = eventPublisher;
}
@RequestMapping(value = "/pageList", method = RequestMethod.POST)
public RestResponse<PageInfo<ExamPaperAnswerPageResponseVM>> pageList(@RequestBody @Valid ExamPaperAnswerPageVM model) {

View File

@@ -11,7 +11,7 @@ import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM;
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageResponseVM;
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageVM;
import com.github.pagehelper.PageInfo;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.web.bind.annotation.*;
@@ -19,13 +19,19 @@ import javax.validation.Valid;
@RestController("StudentExamPaperController")
@RequestMapping(value = "/api/student/exam/paper")
@AllArgsConstructor
public class ExamPaperController extends BaseApiController {
private final ExamPaperService examPaperService;
private final ExamPaperAnswerService examPaperAnswerService;
private final ApplicationEventPublisher eventPublisher;
@Autowired
public ExamPaperController(ExamPaperService examPaperService, ExamPaperAnswerService examPaperAnswerService, ApplicationEventPublisher eventPublisher) {
this.examPaperService = examPaperService;
this.examPaperAnswerService = examPaperAnswerService;
this.eventPublisher = eventPublisher;
}
@RequestMapping(value = "/select/{id}", method = RequestMethod.POST)
public RestResponse<ExamPaperEditRequestVM> select(@PathVariable Integer id) {

View File

@@ -1,36 +0,0 @@
package com.mindskip.xzs.controller.student;
import com.mindskip.xzs.base.BaseApiController;
import com.mindskip.xzs.base.RestResponse;
import com.mindskip.xzs.domain.Question;
import com.mindskip.xzs.service.ExaminationPaperProductionService;
import com.mindskip.xzs.viewmodel.student.exam.ExaminationProductionVM;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;
import java.util.List;
@RestController("ExaminationPaperProductionController")
@RequestMapping(value = "/api/student/examination")
@AllArgsConstructor
public class ExaminationPaperProductionController extends BaseApiController {
private final ExaminationPaperProductionService examinationPaperProductionService;
@RequestMapping(value = "/paper", method = RequestMethod.GET)
public RestResponse paper() {
return RestResponse.ok(examinationPaperProductionService.paper());
}
@RequestMapping(value = "/paper/production", method = RequestMethod.POST)
public RestResponse paperProduction(@RequestBody @Valid ExaminationProductionVM examinationProductionVM) {
List<Question> questionList = examinationPaperProductionService.generation(examinationProductionVM);
return RestResponse.ok(questionList);
}
}

View File

@@ -20,12 +20,11 @@ import com.mindskip.xzs.viewmodel.student.question.answer.QuestionAnswerVM;
import com.mindskip.xzs.viewmodel.student.question.answer.QuestionPageStudentRequestVM;
import com.mindskip.xzs.viewmodel.student.question.answer.QuestionPageStudentResponseVM;
import com.github.pagehelper.PageInfo;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@RestController("StudentQuestionAnswerController")
@RequestMapping(value = "/api/student/question/answer")
@AllArgsConstructor
public class QuestionAnswerController extends BaseApiController {
private final ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService;
@@ -33,6 +32,14 @@ public class QuestionAnswerController extends BaseApiController {
private final TextContentService textContentService;
private final SubjectService subjectService;
@Autowired
public QuestionAnswerController(ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService, QuestionService questionService, TextContentService textContentService, SubjectService subjectService) {
this.examPaperQuestionCustomerAnswerService = examPaperQuestionCustomerAnswerService;
this.questionService = questionService;
this.textContentService = textContentService;
this.subjectService = subjectService;
}
@RequestMapping(value = "/page", method = RequestMethod.POST)
public RestResponse<PageInfo<QuestionPageStudentResponseVM>> pageList(@RequestBody QuestionPageStudentRequestVM model) {
model.setCreateUser(getCurrentUser().getId());

View File

@@ -2,15 +2,17 @@ package com.mindskip.xzs.controller.student;
import com.mindskip.xzs.base.BaseApiController;
import com.mindskip.xzs.service.QuestionService;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@RestController("StudentQuestionController")
@RequestMapping(value = "/api/student/question")
@AllArgsConstructor
public class QuestionController extends BaseApiController {
private final QuestionService questionService;
@Autowired
public QuestionController(QuestionService questionService) {
this.questionService = questionService;
}
}

View File

@@ -5,8 +5,7 @@ import com.mindskip.xzs.base.BaseApiController;
import com.mindskip.xzs.base.RestResponse;
import com.mindskip.xzs.service.FileUpload;
import com.mindskip.xzs.service.UserService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
@@ -18,8 +17,6 @@ import java.io.IOException;
import java.io.InputStream;
@Slf4j
@AllArgsConstructor
@RequestMapping("/api/student/upload")
@RestController("StudentUploadController")
public class UploadController extends BaseApiController {
@@ -27,6 +24,12 @@ public class UploadController extends BaseApiController {
private final FileUpload fileUpload;
private final UserService userService;
@Autowired
public UploadController(FileUpload fileUpload, UserService userService) {
this.fileUpload = fileUpload;
this.userService = userService;
}
@RequestMapping("/image")
@ResponseBody

View File

@@ -17,9 +17,8 @@ import com.mindskip.xzs.utility.DateTimeUtil;
import com.mindskip.xzs.utility.PageInfoHelper;
import com.mindskip.xzs.viewmodel.student.user.*;
import com.github.pagehelper.PageInfo;
import com.mindskip.xzs.viewmodel.student.user.*;
import lombok.AllArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.web.bind.annotation.*;
@@ -35,7 +34,6 @@ import java.util.stream.Collectors;
*/
@RestController("StudentUserController")
@RequestMapping(value = "/api/student/user")
@AllArgsConstructor
public class UserController extends BaseApiController {
private final UserService userService;
@@ -44,6 +42,15 @@ public class UserController extends BaseApiController {
private final AuthenticationService authenticationService;
private final ApplicationEventPublisher eventPublisher;
@Autowired
public UserController(UserService userService, UserEventLogService userEventLogService, MessageService messageService, AuthenticationService authenticationService, ApplicationEventPublisher eventPublisher) {
this.userService = userService;
this.userEventLogService = userEventLogService;
this.messageService = messageService;
this.authenticationService = authenticationService;
this.eventPublisher = eventPublisher;
}
@RequestMapping(value = "/current", method = RequestMethod.POST)
public RestResponse<UserResponseVM> current() {
User user = getCurrentUser();
@@ -69,7 +76,7 @@ public class UserController extends BaseApiController {
user.setDeleted(false);
userService.insertByFilter(user);
UserEventLog userEventLog = new UserEventLog(user.getId(), user.getUserName(), user.getRealName(), new Date());
userEventLog.setContent("欢迎 " + user.getUserName() + " 注册来到Tek Systems出题系统");
userEventLog.setContent("欢迎 " + user.getUserName() + " 注册来到学之思考试系统");
eventPublisher.publishEvent(new UserEvent(userEventLog));
return RestResponse.ok();
}

View File

@@ -11,7 +11,7 @@ import com.mindskip.xzs.service.UserTokenService;
import com.mindskip.xzs.utility.WxUtil;
import com.mindskip.xzs.viewmodel.wx.student.user.BindInfo;
import com.mindskip.xzs.domain.User;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
@@ -21,7 +21,6 @@ import javax.validation.constraints.NotBlank;
@Controller("WXStudentAuthController")
@RequestMapping(value = "/api/wx/student/auth")
@AllArgsConstructor
@ResponseBody
public class AuthController extends BaseWXApiController {
@@ -30,6 +29,14 @@ public class AuthController extends BaseWXApiController {
private final UserService userService;
private final UserTokenService userTokenService;
@Autowired
public AuthController(SystemConfig systemConfig, AuthenticationService authenticationService, UserService userService, UserTokenService userTokenService) {
this.systemConfig = systemConfig;
this.authenticationService = authenticationService;
this.userService = userService;
this.userTokenService = userTokenService;
}
@RequestMapping(value = "/bind", method = RequestMethod.POST)
public RestResponse bind(@Valid BindInfo model) {
User user = userService.getUserByUserName(model.getUserName());

View File

@@ -16,8 +16,7 @@ import com.mindskip.xzs.service.TextContentService;
import com.mindskip.xzs.utility.DateTimeUtil;
import com.mindskip.xzs.utility.JsonUtil;
import com.mindskip.xzs.viewmodel.student.dashboard.*;
import com.mindskip.xzs.viewmodel.student.dashboard.*;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -31,7 +30,6 @@ import java.util.stream.Collectors;
@Controller("WXStudentDashboardController")
@RequestMapping(value = "/api/wx/student/dashboard")
@AllArgsConstructor
@ResponseBody
public class DashboardController extends BaseWXApiController {
@@ -40,6 +38,14 @@ public class DashboardController extends BaseWXApiController {
private final TaskExamService taskExamService;
private final TaskExamCustomerAnswerService taskExamCustomerAnswerService;
@Autowired
public DashboardController(ExamPaperService examPaperService, TextContentService textContentService, TaskExamService taskExamService, TaskExamCustomerAnswerService taskExamCustomerAnswerService) {
this.examPaperService = examPaperService;
this.textContentService = textContentService;
this.taskExamService = taskExamService;
this.taskExamCustomerAnswerService = taskExamCustomerAnswerService;
}
@RequestMapping(value = "/index", method = RequestMethod.POST)
public RestResponse<IndexVM> index() {
IndexVM indexVM = new IndexVM();

View File

@@ -13,15 +13,13 @@ import com.mindskip.xzs.utility.DateTimeUtil;
import com.mindskip.xzs.utility.ExamUtil;
import com.mindskip.xzs.utility.PageInfoHelper;
import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM;
import com.mindskip.xzs.viewmodel.student.exam.*;
import com.mindskip.xzs.viewmodel.student.exampaper.ExamPaperAnswerPageResponseVM;
import com.mindskip.xzs.viewmodel.student.exampaper.ExamPaperAnswerPageVM;
import com.github.pagehelper.PageInfo;
import com.mindskip.xzs.domain.*;
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperReadVM;
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperSubmitItemVM;
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperSubmitVM;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
@@ -34,7 +32,6 @@ import java.util.stream.Collectors;
@Controller("WXStudentExamPaperAnswerController")
@RequestMapping(value = "/api/wx/student/exampaper/answer")
@AllArgsConstructor
@ResponseBody
public class ExamPaperAnswerController extends BaseWXApiController {
@@ -43,6 +40,14 @@ public class ExamPaperAnswerController extends BaseWXApiController {
private final ApplicationEventPublisher eventPublisher;
private final ExamPaperService examPaperService;
@Autowired
public ExamPaperAnswerController(ExamPaperAnswerService examPaperAnswerService, SubjectService subjectService, ApplicationEventPublisher eventPublisher, ExamPaperService examPaperService) {
this.examPaperAnswerService = examPaperAnswerService;
this.subjectService = subjectService;
this.eventPublisher = eventPublisher;
this.examPaperService = examPaperService;
}
@RequestMapping(value = "/pageList", method = RequestMethod.POST)
public RestResponse<PageInfo<ExamPaperAnswerPageResponseVM>> pageList(@Valid ExamPaperAnswerPageVM model) {
model.setCreateUser(getCurrentUser().getId());

View File

@@ -12,7 +12,7 @@ import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM;
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageResponseVM;
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageVM;
import com.github.pagehelper.PageInfo;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
@@ -21,13 +21,18 @@ import javax.validation.Valid;
@Controller("WXStudentExamController")
@RequestMapping(value = "/api/wx/student/exampaper")
@AllArgsConstructor
@ResponseBody
public class ExamPaperController extends BaseWXApiController {
private final ExamPaperService examPaperService;
private final SubjectService subjectService;
@Autowired
public ExamPaperController(ExamPaperService examPaperService, SubjectService subjectService) {
this.examPaperService = examPaperService;
this.subjectService = subjectService;
}
@RequestMapping(value = "/select/{id}", method = RequestMethod.POST)
public RestResponse<ExamPaperEditRequestVM> select(@PathVariable Integer id) {

View File

@@ -17,9 +17,8 @@ import com.mindskip.xzs.utility.DateTimeUtil;
import com.mindskip.xzs.utility.PageInfoHelper;
import com.mindskip.xzs.viewmodel.student.user.*;
import com.github.pagehelper.PageInfo;
import com.mindskip.xzs.viewmodel.student.user.*;
import lombok.AllArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
@@ -36,7 +35,6 @@ import java.util.stream.Collectors;
*/
@Controller("WXStudentUserController")
@RequestMapping(value = "/api/wx/student/user")
@AllArgsConstructor
@ResponseBody
public class UserController extends BaseWXApiController {
@@ -46,6 +44,15 @@ public class UserController extends BaseWXApiController {
private final AuthenticationService authenticationService;
private final ApplicationEventPublisher eventPublisher;
@Autowired
public UserController(UserService userService, UserEventLogService userEventLogService, MessageService messageService, AuthenticationService authenticationService, ApplicationEventPublisher eventPublisher) {
this.userService = userService;
this.userEventLogService = userEventLogService;
this.messageService = messageService;
this.authenticationService = authenticationService;
this.eventPublisher = eventPublisher;
}
@RequestMapping(value = "/current", method = RequestMethod.POST)
public RestResponse<UserResponseVM> current() {
User user = getCurrentUser();
@@ -71,7 +78,7 @@ public class UserController extends BaseWXApiController {
user.setDeleted(false);
userService.insertByFilter(user);
UserEventLog userEventLog = new UserEventLog(user.getId(), user.getUserName(), user.getRealName(), new Date());
userEventLog.setContent("欢迎 " + user.getUserName() + " 注册来到Tek Systems出题系统");
userEventLog.setContent("欢迎 " + user.getUserName() + " 注册来到学之思考试系统");
eventPublisher.publishEvent(new UserEvent(userEventLog));
return RestResponse.ok();
}

View File

@@ -1,13 +0,0 @@
package com.mindskip.xzs.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.util.List;
@Data
@AllArgsConstructor
public class AllSkillAndIndustry {
private List<Skill> skills;
private List<Industry> industries;
}

View File

@@ -1,12 +1,34 @@
package com.mindskip.xzs.domain;
import lombok.Data;
import java.util.List;
@Data
public class ExamPaperAnswerInfo {
public ExamPaper examPaper;
public ExamPaperAnswer examPaperAnswer;
public List<ExamPaperQuestionCustomerAnswer> examPaperQuestionCustomerAnswers;
public ExamPaper getExamPaper() {
return examPaper;
}
public void setExamPaper(ExamPaper examPaper) {
this.examPaper = examPaper;
}
public ExamPaperAnswer getExamPaperAnswer() {
return examPaperAnswer;
}
public void setExamPaperAnswer(ExamPaperAnswer examPaperAnswer) {
this.examPaperAnswer = examPaperAnswer;
}
public List<ExamPaperQuestionCustomerAnswer> getExamPaperQuestionCustomerAnswers() {
return examPaperQuestionCustomerAnswers;
}
public void setExamPaperQuestionCustomerAnswers(List<ExamPaperQuestionCustomerAnswer> examPaperQuestionCustomerAnswers) {
this.examPaperQuestionCustomerAnswers = examPaperQuestionCustomerAnswers;
}
}

View File

@@ -1,37 +0,0 @@
package com.mindskip.xzs.domain;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* t_industry
*
* @author
*/
@NoArgsConstructor
@AllArgsConstructor
public class Industry implements Serializable {
private Integer id;
private String name;
private static final long serialVersionUID = 1L;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

View File

@@ -17,14 +17,6 @@ public class Question implements Serializable {
private Integer subjectId;
private Integer industryId;
private String industryName;
private Integer skillId;
private String skillName;
private Integer score;
private Integer gradeLevel;
@@ -43,8 +35,6 @@ public class Question implements Serializable {
private Boolean deleted;
private String content;
public Integer getId() {
return id;
}
@@ -53,14 +43,6 @@ public class Question implements Serializable {
this.id = id;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Integer getQuestionType() {
return questionType;
}
@@ -77,38 +59,6 @@ public class Question implements Serializable {
this.subjectId = subjectId;
}
public String getIndustryName() {
return industryName;
}
public void setIndustryName(String industryName) {
this.industryName = industryName;
}
public String getSkillName() {
return skillName;
}
public void setSkillName(String skillName) {
this.skillName = skillName;
}
public Integer getIndustryId() {
return industryId;
}
public void setIndustryId(Integer industryId) {
this.industryId = industryId;
}
public Integer getSkillId() {
return skillId;
}
public void setSkillId(Integer skillId) {
this.skillId = skillId;
}
public Integer getScore() {
return score;
}

View File

@@ -1,37 +0,0 @@
package com.mindskip.xzs.domain;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* t_industry
*
* @author
*/
@NoArgsConstructor
@AllArgsConstructor
public class Skill implements Serializable {
private Integer id;
private String name;
private static final long serialVersionUID = 1L;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

View File

@@ -1,9 +1,22 @@
package com.mindskip.xzs.domain.exam;
import lombok.Data;
@Data
public class ExamPaperQuestionItemObject {
private Integer id;
private Integer itemOrder;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getItemOrder() {
return itemOrder;
}
public void setItemOrder(Integer itemOrder) {
this.itemOrder = itemOrder;
}
}

View File

@@ -1,13 +1,27 @@
package com.mindskip.xzs.domain.exam;
import lombok.Data;
import java.util.List;
@Data
public class ExamPaperTitleItemObject {
private String name;
private List<ExamPaperQuestionItemObject> questionItems;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List<ExamPaperQuestionItemObject> getQuestionItems() {
return questionItems;
}
public void setQuestionItems(List<ExamPaperQuestionItemObject> questionItems) {
this.questionItems = questionItems;
}
}

View File

@@ -1,10 +1,32 @@
package com.mindskip.xzs.domain.other;
import lombok.Data;
@Data
public class ExamPaperAnswerUpdate {
private Integer id;
private Integer customerScore;
private Boolean doRight;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getCustomerScore() {
return customerScore;
}
public void setCustomerScore(Integer customerScore) {
this.customerScore = customerScore;
}
public Boolean getDoRight() {
return doRight;
}
public void setDoRight(Boolean doRight) {
this.doRight = doRight;
}
}

View File

@@ -1,11 +1,24 @@
package com.mindskip.xzs.domain.other;
import lombok.Data;
@Data
public class KeyValue {
private String name;
private Integer value;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getValue() {
return value;
}
public void setValue(Integer value) {
this.value = value;
}
}

View File

@@ -1,8 +1,6 @@
package com.mindskip.xzs.domain.question;
import lombok.Data;
@Data
public class QuestionItemObject {
private String prefix;
@@ -10,4 +8,28 @@ public class QuestionItemObject {
private String content;
private Integer score;
public String getPrefix() {
return prefix;
}
public void setPrefix(String prefix) {
this.prefix = prefix;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Integer getScore() {
return score;
}
public void setScore(Integer score) {
this.score = score;
}
}

View File

@@ -1,11 +1,9 @@
package com.mindskip.xzs.domain.question;
import lombok.Data;
import java.util.List;
@Data
public class QuestionObject {
private String titleContent;
@@ -15,4 +13,36 @@ public class QuestionObject {
private List<QuestionItemObject> questionItemObjects;
private String correct;
public String getTitleContent() {
return titleContent;
}
public void setTitleContent(String titleContent) {
this.titleContent = titleContent;
}
public String getAnalyze() {
return analyze;
}
public void setAnalyze(String analyze) {
this.analyze = analyze;
}
public List<QuestionItemObject> getQuestionItemObjects() {
return questionItemObjects;
}
public void setQuestionItemObjects(List<QuestionItemObject> questionItemObjects) {
this.questionItemObjects = questionItemObjects;
}
public String getCorrect() {
return correct;
}
public void setCorrect(String correct) {
this.correct = correct;
}
}

View File

@@ -1,8 +1,6 @@
package com.mindskip.xzs.domain.task;
import lombok.Data;
@Data
public class TaskItemAnswerObject {
private Integer examPaperId;
private Integer examPaperAnswerId;
@@ -17,4 +15,28 @@ public class TaskItemAnswerObject {
this.examPaperAnswerId = examPaperAnswerId;
this.status = status;
}
public Integer getExamPaperId() {
return examPaperId;
}
public void setExamPaperId(Integer examPaperId) {
this.examPaperId = examPaperId;
}
public Integer getExamPaperAnswerId() {
return examPaperAnswerId;
}
public void setExamPaperAnswerId(Integer examPaperAnswerId) {
this.examPaperAnswerId = examPaperAnswerId;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
}

View File

@@ -1,10 +1,32 @@
package com.mindskip.xzs.domain.task;
import lombok.Data;
@Data
public class TaskItemObject {
private Integer examPaperId;
private String examPaperName;
private Integer itemOrder;
public Integer getExamPaperId() {
return examPaperId;
}
public void setExamPaperId(Integer examPaperId) {
this.examPaperId = examPaperId;
}
public String getExamPaperName() {
return examPaperName;
}
public void setExamPaperName(String examPaperName) {
this.examPaperName = examPaperName;
}
public Integer getItemOrder() {
return itemOrder;
}
public void setItemOrder(Integer itemOrder) {
this.itemOrder = itemOrder;
}
}

View File

@@ -1,6 +1,5 @@
package com.mindskip.xzs.listener;
import com.mindskip.xzs.domain.*;
import com.mindskip.xzs.domain.*;
import com.mindskip.xzs.domain.enums.ExamPaperTypeEnum;
import com.mindskip.xzs.domain.enums.QuestionTypeEnum;
@@ -9,7 +8,7 @@ import com.mindskip.xzs.service.ExamPaperAnswerService;
import com.mindskip.xzs.service.ExamPaperQuestionCustomerAnswerService;
import com.mindskip.xzs.service.TaskExamCustomerAnswerService;
import com.mindskip.xzs.service.TextContentService;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
@@ -22,15 +21,21 @@ import java.util.List;
* @author 武汉思维跳跃科技有限公司
*/
@Component
@AllArgsConstructor
public class CalculateExamPaperAnswerListener implements ApplicationListener<CalculateExamPaperAnswerCompleteEvent> {
private final ExamPaperAnswerService examPaperAnswerService;
private final ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService;
private final TextContentService textContentService;
private final TaskExamCustomerAnswerService examCustomerAnswerService;
@Autowired
public CalculateExamPaperAnswerListener(ExamPaperAnswerService examPaperAnswerService, ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService, TextContentService textContentService, TaskExamCustomerAnswerService examCustomerAnswerService) {
this.examPaperAnswerService = examPaperAnswerService;
this.examPaperQuestionCustomerAnswerService = examPaperQuestionCustomerAnswerService;
this.textContentService = textContentService;
this.examCustomerAnswerService = examCustomerAnswerService;
}
@Override
@Transactional
public void onApplicationEvent(CalculateExamPaperAnswerCompleteEvent calculateExamPaperAnswerCompleteEvent) {

View File

@@ -2,15 +2,19 @@ package com.mindskip.xzs.listener;
import com.mindskip.xzs.event.UserEvent;
import com.mindskip.xzs.service.UserEventLogService;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
@Component
@AllArgsConstructor
public class UserLogListener implements ApplicationListener<UserEvent> {
private UserEventLogService userEventLogService;
private final UserEventLogService userEventLogService;
@Autowired
public UserLogListener(UserEventLogService userEventLogService) {
this.userEventLogService = userEventLogService;
}
@Override
public void onApplicationEvent(UserEvent userEvent) {

View File

@@ -1,29 +0,0 @@
package com.mindskip.xzs.repository;
import com.mindskip.xzs.domain.Industry;
import com.mindskip.xzs.domain.Subject;
import com.mindskip.xzs.viewmodel.admin.industry.IndustryEditRequestVM;
import com.mindskip.xzs.viewmodel.admin.industry.IndustryPageRequestVM;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface IndustryMapper extends BaseMapper<Industry> {
int deleteByPrimaryKey(Integer id);
int insert(Industry record);
int insertSelective(Industry record);
Industry selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(Industry record);
int updateByPrimaryKey(Industry record);
List<Industry> page(IndustryPageRequestVM requestVM);
List<Industry> allIndustry();
}

View File

@@ -1,9 +1,8 @@
package com.mindskip.xzs.repository;
import com.mindskip.xzs.domain.Question;
import com.mindskip.xzs.domain.other.KeyValue;
import com.mindskip.xzs.domain.Question;
import com.mindskip.xzs.viewmodel.admin.question.QuestionPageRequestVM;
import com.mindskip.xzs.viewmodel.student.exam.EachPaperProductionVM;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -30,11 +29,5 @@ public interface QuestionMapper extends BaseMapper<Question> {
Integer selectAllCount();
List<KeyValue> selectCountByDate(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
List<Question> selectQuestionsByQuestionsNumber(@Param("eachList") List<EachPaperProductionVM> eachList);
List<Question> selectAllSkills();
List<Question> selectAllIndustry();
List<KeyValue> selectCountByDate(@Param("startTime") Date startTime,@Param("endTime") Date endTime);
}

View File

@@ -1,27 +0,0 @@
package com.mindskip.xzs.repository;
import com.mindskip.xzs.domain.Skill;
import com.mindskip.xzs.viewmodel.admin.skill.SkillPageRequestVM;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface SkillMapper extends BaseMapper<Skill> {
int deleteByPrimaryKey(Integer id);
int insert(Skill record);
int insertSelective(Skill record);
Skill selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(Skill record);
int updateByPrimaryKey(Skill record);
List<Skill> page(SkillPageRequestVM requestVM);
List<Skill> allSkill();
}

View File

@@ -1,15 +0,0 @@
package com.mindskip.xzs.service;
import com.mindskip.xzs.domain.AllSkillAndIndustry;
import com.mindskip.xzs.domain.Question;
import com.mindskip.xzs.viewmodel.student.exam.ExaminationProductionVM;
import java.util.List;
public interface ExaminationPaperProductionService extends BaseService<Question> {
List<Question> generation(ExaminationProductionVM examinationProductionVM);
AllSkillAndIndustry paper();
}

View File

@@ -1,19 +0,0 @@
package com.mindskip.xzs.service;
import com.github.pagehelper.PageInfo;
import com.mindskip.xzs.domain.Industry;
import com.mindskip.xzs.domain.Subject;
import com.mindskip.xzs.viewmodel.admin.industry.IndustryPageRequestVM;
import java.util.List;
/**
* @Auther: Kevin Cui
* @Date: 2020/12/24 14
* @Description:
*/
public interface IndustryService extends BaseService<Industry> {
PageInfo<Industry> page(IndustryPageRequestVM requestVM);
List<Industry> allIndustry();
}

View File

@@ -1,18 +0,0 @@
package com.mindskip.xzs.service;
import com.github.pagehelper.PageInfo;
import com.mindskip.xzs.domain.Skill;
import com.mindskip.xzs.viewmodel.admin.skill.SkillPageRequestVM;
import java.util.List;
/**
* @Auther: Kevin Cui
* @Date: 2020/12/24 14
* @Description:
*/
public interface SkillService extends BaseService<Skill> {
PageInfo<Skill> page(SkillPageRequestVM requestVM);
List<Skill> allSkill();
}

View File

@@ -5,21 +5,25 @@ import com.mindskip.xzs.domain.User;
import com.mindskip.xzs.service.AuthenticationService;
import com.mindskip.xzs.service.UserService;
import com.mindskip.xzs.utility.RsaUtil;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @author 武汉思维跳跃科技有限公司
*/
@Service
@AllArgsConstructor
public class AuthenticationServiceImpl implements AuthenticationService {
private final UserService userService;
private final SystemConfig systemConfig;
@Autowired
public AuthenticationServiceImpl(UserService userService, SystemConfig systemConfig) {
this.userService = userService;
this.systemConfig = systemConfig;
}
/**
* @param username username

View File

@@ -4,10 +4,13 @@ import com.mindskip.xzs.repository.BaseMapper;
import com.mindskip.xzs.service.BaseService;
import lombok.AllArgsConstructor;
@AllArgsConstructor
public abstract class BaseServiceImpl<T> implements BaseService<T> {
BaseMapper<T> baseMapper;
private final BaseMapper<T> baseMapper;
public BaseServiceImpl(BaseMapper<T> baseMapper) {
this.baseMapper = baseMapper;
}
@Override
public int deleteById(Integer id) {

View File

@@ -1,100 +0,0 @@
package com.mindskip.xzs.service.impl;
import com.mindskip.xzs.domain.AllSkillAndIndustry;
import com.mindskip.xzs.domain.Industry;
import com.mindskip.xzs.domain.Question;
import com.mindskip.xzs.domain.Skill;
import com.mindskip.xzs.repository.BaseMapper;
import com.mindskip.xzs.repository.QuestionMapper;
import com.mindskip.xzs.service.ExaminationPaperProductionService;
import com.mindskip.xzs.viewmodel.student.exam.EachPaperProductionVM;
import com.mindskip.xzs.viewmodel.student.exam.ExaminationProductionVM;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;
@Service
public class ExaminationPaperProductionServiceImpl extends BaseServiceImpl<Question> implements ExaminationPaperProductionService {
private final QuestionMapper questionMapper;
@Autowired
public ExaminationPaperProductionServiceImpl(BaseMapper<Question> baseMapper, QuestionMapper questionMapper) {
super(baseMapper);
this.questionMapper = questionMapper;
}
@Override
public List<Question> generation(ExaminationProductionVM examinationProductionVM) {
Integer difficult = examinationProductionVM.getDifficult();
Integer industryId = examinationProductionVM.getIndustryId();
List<Integer> skillIds = examinationProductionVM.getSkillIds();
@NotNull int questionNumber = examinationProductionVM.getQuestionNumber();
List<Integer> integerList = new ArrayList<>();
int size = skillIds.size();
if (size < 1) {
size = 1;
}
int remainder = questionNumber % size;
int each = questionNumber / size;
for (int i = 0; i < size; i++) {
integerList.add(each);
}
if (remainder > 0) {
Integer first = integerList.get(0);
int i = first + remainder;
integerList.set(0, i);
}
examinationProductionVM.setEachNumber(integerList);
List<EachPaperProductionVM> eachList = new ArrayList<>();
if (size > 0) {
for (int i = 0; i < size; i++) {
EachPaperProductionVM eachPaperProductionVM = new EachPaperProductionVM(difficult, industryId, skillIds.get(i), integerList.get(i));
eachList.add(eachPaperProductionVM);
}
}
examinationProductionVM.setEachList(eachList);
return questionMapper.selectQuestionsByQuestionsNumber(examinationProductionVM.getEachList());
}
public AllSkillAndIndustry paper() {
List<Question> questions1 = questionMapper.selectAllSkills();
List<Question> questions2 = questionMapper.selectAllIndustry();
List<Skill> skillList = new ArrayList<>();
for (Question question : questions1) {
Integer skillId = question.getSkillId();
String skillName = question.getSkillName();
Skill skill = new Skill(skillId, skillName);
skillList.add(skill);
}
ArrayList<Industry> industries = new ArrayList<>();
for (Question question : questions2) {
Integer industryId = question.getIndustryId();
String industryName = question.getIndustryName();
Industry industry = new Industry(industryId, industryName);
industries.add(industry);
}
return new AllSkillAndIndustry(skillList, industries);
}
}

View File

@@ -14,16 +14,22 @@ import com.qiniu.util.Auth;
import lombok.AllArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.InputStream;
@Service
@AllArgsConstructor
public class FileUploadImpl implements FileUpload {
private final Logger logger = LoggerFactory.getLogger(FileUpload.class);
private final SystemConfig systemConfig;
@Autowired
public FileUploadImpl(SystemConfig systemConfig) {
this.systemConfig = systemConfig;
}
@Override
public String uploadFile(InputStream inputStream, long size, String extName) {
QnConfig qnConfig = systemConfig.getQn();

View File

@@ -1,46 +0,0 @@
package com.mindskip.xzs.service.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.mindskip.xzs.domain.Industry;
import com.mindskip.xzs.repository.IndustryMapper;
import com.mindskip.xzs.service.IndustryService;
import com.mindskip.xzs.viewmodel.admin.industry.IndustryPageRequestVM;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Auther: Kevin Cui
* @Date: 2020/12/24 14
* @Description:
*/
@Service
public class IndustryServiceImpl extends BaseServiceImpl<Industry> implements IndustryService {
private final IndustryMapper industryMapper;
private final static String CACHE_NAME = "xzs:industry";
public IndustryServiceImpl(IndustryMapper industryMapper) {
super(industryMapper);
this.industryMapper = industryMapper;
}
@Override
@Cacheable(value = CACHE_NAME, key = "#id", unless = "#result == null")
public Industry selectById(Integer id) {
return super.selectById(id);
}
@Override
public PageInfo<Industry> page(IndustryPageRequestVM requestVM) {
return PageHelper.startPage(requestVM.getPageIndex(), requestVM.getPageSize(), "id desc").doSelectPageInfo(() ->
industryMapper.page(requestVM)
);
}
@Override
public List<Industry> allIndustry() {
return industryMapper.allIndustry();
}
}

View File

@@ -10,6 +10,7 @@ import com.mindskip.xzs.viewmodel.student.user.MessageRequestVM;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -17,12 +18,17 @@ import java.util.Date;
import java.util.List;
@Service
@AllArgsConstructor
public class MessageServiceImpl implements MessageService {
private final MessageMapper messageMapper;
private final MessageUserMapper messageUserMapper;
@Autowired
public MessageServiceImpl(MessageMapper messageMapper, MessageUserMapper messageUserMapper) {
this.messageMapper = messageMapper;
this.messageUserMapper = messageUserMapper;
}
@Override
public List<Message> selectMessageByIds(List<Integer> ids) {
return messageMapper.selectByIds(ids);

View File

@@ -57,7 +57,7 @@ public class QuestionServiceImpl extends BaseServiceImpl<Question> implements Qu
@Transactional
public Question insertFullQuestion(QuestionEditRequestVM model, Integer userId) {
Date now = new Date();
// Integer gradeLevel = subjectService.levelBySubjectId(model.getSubjectId());
Integer gradeLevel = subjectService.levelBySubjectId(model.getSubjectId());
//题干、解析、选项等 插入
TextContent infoTextContent = new TextContent();
@@ -66,10 +66,8 @@ public class QuestionServiceImpl extends BaseServiceImpl<Question> implements Qu
textContentService.insertByFilter(infoTextContent);
Question question = new Question();
// question.setSubjectId(model.getSubjectId());
question.setIndustryId(model.getIndustryId());
question.setSkillId(model.getSkillId());
// question.setGradeLevel(gradeLevel);
question.setSubjectId(model.getSubjectId());
question.setGradeLevel(gradeLevel);
question.setCreateTime(now);
question.setQuestionType(model.getQuestionType());
question.setStatus(QuestionStatusEnum.OK.getCode());
@@ -86,12 +84,10 @@ public class QuestionServiceImpl extends BaseServiceImpl<Question> implements Qu
@Override
@Transactional
public Question updateFullQuestion(QuestionEditRequestVM model) {
// Integer gradeLevel = subjectService.levelBySubjectId(model.getSubjectId());
Integer gradeLevel = subjectService.levelBySubjectId(model.getSubjectId());
Question question = questionMapper.selectByPrimaryKey(model.getId());
// question.setSubjectId(model.getSubjectId());
question.setIndustryId(model.getIndustryId());
question.setSkillId(model.getSkillId());
// question.setGradeLevel(gradeLevel);
question.setSubjectId(model.getSubjectId());
question.setGradeLevel(gradeLevel);
question.setScore(ExamUtil.scoreFromVM(model.getScore()));
question.setDifficult(model.getDifficult());
question.setCorrectFromVM(model.getCorrect(), model.getCorrectArray());

View File

@@ -1,46 +0,0 @@
package com.mindskip.xzs.service.impl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.mindskip.xzs.domain.Skill;
import com.mindskip.xzs.repository.SkillMapper;
import com.mindskip.xzs.service.SkillService;
import com.mindskip.xzs.viewmodel.admin.skill.SkillPageRequestVM;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Auther: Kevin Cui
* @Date: 2020/12/24 14
* @Description:
*/
@Service
public class SkillServiceImpl extends BaseServiceImpl<Skill> implements SkillService {
private final SkillMapper skillMapper;
private final static String CACHE_NAME = "xzs:skill";
public SkillServiceImpl(SkillMapper skillMapper) {
super(skillMapper);
this.skillMapper = skillMapper;
}
@Override
@Cacheable(value = CACHE_NAME, key = "#id", unless = "#result == null")
public Skill selectById(Integer id) {
return super.selectById(id);
}
@Override
public PageInfo<Skill> page(SkillPageRequestVM requestVM) {
return PageHelper.startPage(requestVM.getPageIndex(), requestVM.getPageSize(), "id desc").doSelectPageInfo(() ->
skillMapper.page(requestVM)
);
}
@Override
public List<Skill> allSkill() {
return skillMapper.allSkill();
}
}

View File

@@ -1,19 +0,0 @@
package com.mindskip.xzs.viewmodel.admin.industry;
import com.mindskip.xzs.viewmodel.BaseVM;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @Auther: Kevin Cui
* @Date: 2020/12/24 15
* @Description:
*/
@Data
public class IndustryEditRequestVM extends BaseVM {
private Integer id;
@NotBlank
private String name;
}

View File

@@ -1,19 +0,0 @@
package com.mindskip.xzs.viewmodel.admin.industry;
import com.mindskip.xzs.base.BasePage;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @Auther: Kevin Cui
* @Date: 2020/12/24 15
* @Description:
*/
@Data
public class IndustryPageRequestVM extends BasePage {
private Integer id;
@NotBlank
private String name;
}

View File

@@ -1,19 +0,0 @@
package com.mindskip.xzs.viewmodel.admin.industry;
import com.mindskip.xzs.viewmodel.BaseVM;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @Auther: Kevin Cui
* @Date: 2020/12/24 15
* @Description:
*/
@Data
public class IndustryResponseVM extends BaseVM {
private Integer id;
@NotBlank
private String name;
}

View File

@@ -13,13 +13,8 @@ public class QuestionEditRequestVM {
private Integer id;
@NotNull
private Integer questionType;
@NotNull
private Integer industryId;
@NotNull
private Integer skillId;
private Integer subjectId;
@NotBlank
private String title;

View File

@@ -10,7 +10,4 @@ public class QuestionPageRequestVM extends BasePage {
private Integer level;
private Integer subjectId;
private Integer questionType;
private Integer industryId;
private Integer skillId;
}

View File

@@ -16,14 +16,6 @@ public class QuestionResponseVM extends BaseVM {
private Integer subjectId;
private Integer industryId;
private String industryName;
private Integer skillId;
private String skillName;
private Integer createUser;
private String score;

View File

@@ -1,19 +0,0 @@
package com.mindskip.xzs.viewmodel.admin.skill;
import com.mindskip.xzs.viewmodel.BaseVM;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @Auther: Kevin Cui
* @Date: 2020/12/24 15
* @Description:
*/
@Data
public class SkillEditRequestVM extends BaseVM {
private Integer id;
@NotBlank
private String name;
}

View File

@@ -1,19 +0,0 @@
package com.mindskip.xzs.viewmodel.admin.skill;
import com.mindskip.xzs.base.BasePage;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @Auther: Kevin Cui
* @Date: 2020/12/24 15
* @Description:
*/
@Data
public class SkillPageRequestVM extends BasePage {
private Integer id;
@NotBlank
private String name;
}

View File

@@ -1,19 +0,0 @@
package com.mindskip.xzs.viewmodel.admin.skill;
import com.mindskip.xzs.viewmodel.BaseVM;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* @Auther: Kevin Cui
* @Date: 2020/12/24 15
* @Description:
*/
@Data
public class SkillResponseVM extends BaseVM {
private Integer id;
@NotBlank
private String name;
}

View File

@@ -1,17 +0,0 @@
package com.mindskip.xzs.viewmodel.student.exam;
import lombok.AllArgsConstructor;
import lombok.Data;
import javax.validation.constraints.NotNull;
@Data
@AllArgsConstructor
public class EachPaperProductionVM {
private Integer difficult;
private Integer industryId;
private Integer skillId;
@NotNull
private Integer eachNumber;
}

View File

@@ -1,22 +0,0 @@
package com.mindskip.xzs.viewmodel.student.exam;
import com.mindskip.xzs.base.BasePage;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
@Data
public class ExaminationProductionVM extends BasePage {
@NotNull
private int questionNumber;
private Integer difficult;
private Integer industryId;
private List<Integer> skillIds;
private List<Integer> eachNumber;
private List<EachPaperProductionVM> eachList;
}

View File

@@ -3,9 +3,9 @@ logging:
spring:
redis:
host: localhost
host: 192.168.0.96
datasource:
url: jdbc:mysql://home.ken123.tk:3306/xzs?useSSL=false&useUnicode=true&serverTimezone=Asia/Shanghai&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowPublicKeyRetrieval=true&allowMultiQueries=true
url: jdbc:mysql://192.168.0.96:3306/xzs?useSSL=false&useUnicode=true&serverTimezone=Asia/Shanghai&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowPublicKeyRetrieval=true&allowMultiQueries=true
username: root
password: kenjian
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver

View File

@@ -1,69 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.mindskip.xzs.repository.IndustryMapper">
<resultMap id="BaseResultMap" type="com.mindskip.xzs.domain.Industry">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
</resultMap>
<sql id="Base_Column_List">
id, `name`
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_industry
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from t_industry
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.mindskip.xzs.domain.Industry" useGeneratedKeys="true">
insert into t_industry (`name`)
values (#{name,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.mindskip.xzs.domain.Industry" useGeneratedKeys="true">
insert into t_industry
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">
`name`,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.mindskip.xzs.domain.Industry">
update t_industry
<set>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.mindskip.xzs.domain.Industry">
update t_industry
set `name` = #{name,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="page" resultMap="BaseResultMap" parameterType="com.mindskip.xzs.viewmodel.admin.industry.IndustryEditRequestVM">
SELECT
<include refid="Base_Column_List"/>
FROM t_industry
<where>
<if test="id != null ">
and id= #{id}
</if>
</where>
</select>
<select id="allIndustry" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from t_industry
</select>
</mapper>

View File

@@ -5,10 +5,6 @@
<id column="id" jdbcType="INTEGER" property="id" />
<result column="question_type" jdbcType="INTEGER" property="questionType" />
<result column="subject_id" jdbcType="INTEGER" property="subjectId" />
<result column="industry_id" jdbcType="INTEGER" property="industryId" />
<result column="industry_name" jdbcType="VARCHAR" property="industryName" />
<result column="skill_id" jdbcType="INTEGER" property="skillId" />
<result column="skill_name" jdbcType="VARCHAR" property="skillName" />
<result column="score" jdbcType="INTEGER" property="score" />
<result column="grade_level" jdbcType="INTEGER" property="gradeLevel" />
<result column="difficult" jdbcType="INTEGER" property="difficult" />
@@ -20,13 +16,9 @@
<result column="deleted" jdbcType="BIT" property="deleted" />
</resultMap>
<sql id="Base_Column_List">
id, question_type, subject_id, industry_id, skill_id, score, grade_level, difficult, correct, info_text_content_id,
id, question_type, subject_id, score, grade_level, difficult, correct, info_text_content_id,
create_user, status, create_time, deleted
</sql>
<sql id="Page_Column_List">
q.id, q.question_type, q.subject_id, q.industry_id, i.name AS industry_name, q.skill_id, s.name AS skill_name, q.score, q.grade_level, q.difficult, q.correct, q.info_text_content_id,
q.create_user, q.status, q.create_time, q.deleted
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
@@ -61,12 +53,6 @@
<if test="subjectId != null">
subject_id,
</if>
<if test="industryId != null">
industry_id,
</if>
<if test="skillId != null">
skill_id,
</if>
<if test="score != null">
score,
</if>
@@ -105,12 +91,6 @@
<if test="subjectId != null">
#{subjectId,jdbcType=INTEGER},
</if>
<if test="industryId != null">
#{industryId,jdbcType=INTEGER},
</if>
<if test="skillId != null">
#{skillId,jdbcType=INTEGER},
</if>
<if test="score != null">
#{score,jdbcType=INTEGER},
</if>
@@ -149,12 +129,6 @@
<if test="subjectId != null">
subject_id = #{subjectId,jdbcType=INTEGER},
</if>
<if test="industryId != null">
industry_id = #{industryId,jdbcType=INTEGER},
</if>
<if test="skillId != null">
skill_id = #{skillId,jdbcType=INTEGER},
</if>
<if test="score != null">
score = #{score,jdbcType=INTEGER},
</if>
@@ -206,89 +180,26 @@
<select id="page" resultMap="BaseResultMap" parameterType="com.mindskip.xzs.viewmodel.admin.question.QuestionPageRequestVM">
SELECT
<include refid="Page_Column_List"/>
FROM t_question AS q LEFT JOIN t_industry AS i ON q.industry_id = i.id LEFT JOIN t_skill AS s ON s.id = q.skill_id
<include refid="Base_Column_List"/>
FROM t_question
<where>
q.deleted=0
and deleted=0
<if test="id != null ">
and q.id= #{id}
and id= #{id}
</if>
<if test="level != null ">
and q.grade_level= #{level}
and grade_level= #{level}
</if>
<if test="subjectId != null ">
and q.subject_id= #{subjectId}
and subject_id= #{subjectId}
</if>
<if test="questionType != null ">
and q.question_type= #{questionType}
</if>
<if test="industryId != null ">
and q.industry_id= #{industryId}
</if>
<if test="skillId != null ">
and q.skill_id= #{skillId}
and question_type= #{questionType}
</if>
</where>
</select>
<select id="selectQuestionsByQuestionsNumber"
resultMap="BaseResultMap">
<foreach collection="eachList" item="each" separator="union">
(
SELECT
q.skill_id,
q.industry_id,
i. NAME AS industry_name,
s. NAME AS skill_name,
t.content,
q.difficult,
q.question_type
FROM
t_question AS q
JOIN (
SELECT
(
RAND() * (
SELECT
MAX(id)
FROM
t_question
)
) AS row_id
) AS r2
JOIN t_industry i ON i.id = q.industry_id
JOIN t_skill s ON s.id = q.skill_id
JOIN t_text_content t ON t.id = q.info_text_content_id
<where>
q.deleted=0 AND
q.id >= r2.row_id
<if test="each.difficult != null">
and q.difficult = #{each.difficult}
</if>
<if test="each.industryId != null">
and i.id = #{each.industryId}
</if>
<if test="each.skillId != null">
and s.id = #{each.skillId}
</if>
</where>
ORDER BY
q.id ASC
LIMIT #{each.eachNumber}
)
</foreach>
</select>
<select id="selectAllSkills"
resultMap="BaseResultMap">
select id as skill_id,name as skill_name from t_skill
</select>
<select id="selectAllIndustry"
resultMap="BaseResultMap">
select id as industry_id,name as industry_name from t_industry
</select>
<select id="selectByIds" resultMap="BaseResultMap" >
SELECT

View File

@@ -1,69 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.mindskip.xzs.repository.SkillMapper">
<resultMap id="BaseResultMap" type="com.mindskip.xzs.domain.Skill">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
</resultMap>
<sql id="Base_Column_List">
id, `name`
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_skill
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from t_skill
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.mindskip.xzs.domain.Skill" useGeneratedKeys="true">
insert into t_skill (`name`)
values (#{name,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.mindskip.xzs.domain.Skill" useGeneratedKeys="true">
insert into t_skill
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">
`name`,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.mindskip.xzs.domain.Skill">
update t_skill
<set>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.mindskip.xzs.domain.Skill">
update t_skill
set `name` = #{name,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="page" resultMap="BaseResultMap" parameterType="com.mindskip.xzs.viewmodel.admin.skill.SkillEditRequestVM">
SELECT
<include refid="Base_Column_List"/>
FROM t_skill
<where>
<if test="id != null ">
and id= #{id}
</if>
</where>
</select>
<select id="allSkill" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from t_skill
</select>
</mapper>

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Expires" content="0"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>TEKsystems Admin</title><style>html {
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Expires" content="0"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>学之思管理系统</title><style>html {
height: 100%;
width: 100%;
}
@@ -13,4 +13,4 @@
hm.src = 'https://hm.baidu.com/hm.js?cd8218cd51f800ed2b73e5751cb3f4f9'
var s = document.getElementsByTagName('script')[0]
s.parentNode.insertBefore(hm, s)
})()</script><link href="static/css/chunk-0b3dd98c.c620ebae.css" rel="prefetch"><link href="static/css/chunk-157f9069.c306629d.css" rel="prefetch"><link href="static/css/chunk-360c43ba.c306629d.css" rel="prefetch"><link href="static/css/chunk-3e96bd8c.c306629d.css" rel="prefetch"><link href="static/css/chunk-4010637e.c306629d.css" rel="prefetch"><link href="static/css/chunk-42236473.c306629d.css" rel="prefetch"><link href="static/css/chunk-6092f506.89936c18.css" rel="prefetch"><link href="static/css/chunk-873a42e2.1951fa25.css" rel="prefetch"><link href="static/css/chunk-a85d3c1e.c8588555.css" rel="prefetch"><link href="static/css/chunk-a9d03770.c306629d.css" rel="prefetch"><link href="static/css/chunk-b77778aa.d88543a2.css" rel="prefetch"><link href="static/css/chunk-bab2e2c4.c306629d.css" rel="prefetch"><link href="static/js/chunk-0b3dd98c.121c5c0b.js" rel="prefetch"><link href="static/js/chunk-157f9069.a3a5d23b.js" rel="prefetch"><link href="static/js/chunk-2d0c138b.ed74857a.js" rel="prefetch"><link href="static/js/chunk-2d221bd2.014539eb.js" rel="prefetch"><link href="static/js/chunk-2d2300ef.79d69061.js" rel="prefetch"><link href="static/js/chunk-2d230fe7.042d38d1.js" rel="prefetch"><link href="static/js/chunk-360c43ba.33132614.js" rel="prefetch"><link href="static/js/chunk-3e96bd8c.42c442e5.js" rel="prefetch"><link href="static/js/chunk-4010637e.35cdf4e5.js" rel="prefetch"><link href="static/js/chunk-42236473.f7640463.js" rel="prefetch"><link href="static/js/chunk-5bc4738d.a117625d.js" rel="prefetch"><link href="static/js/chunk-6092f506.272010c0.js" rel="prefetch"><link href="static/js/chunk-75f11c77.3dd81f12.js" rel="prefetch"><link href="static/js/chunk-78234ca2.bd6528ba.js" rel="prefetch"><link href="static/js/chunk-793f0082.07cca43c.js" rel="prefetch"><link href="static/js/chunk-873a42e2.641597a8.js" rel="prefetch"><link href="static/js/chunk-a85d3c1e.6ddf21b1.js" rel="prefetch"><link href="static/js/chunk-a9d03770.a2240e7f.js" rel="prefetch"><link href="static/js/chunk-b1da6300.556ef3f0.js" rel="prefetch"><link href="static/js/chunk-b77778aa.5584c071.js" rel="prefetch"><link href="static/js/chunk-bab2e2c4.4488f6ce.js" rel="prefetch"><link href="static/js/chunk-d0753fda.854f0ab9.js" rel="prefetch"><link href="static/css/chunk-vendors.ee57d822.css" rel="preload" as="style"><link href="static/css/index.b677cb5b.css" rel="preload" as="style"><link href="static/js/chunk-vendors.850df01d.js" rel="preload" as="script"><link href="static/js/index.be433e79.js" rel="preload" as="script"><link href="static/css/chunk-vendors.ee57d822.css" rel="stylesheet"><link href="static/css/index.b677cb5b.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but vue-demo doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="static/js/chunk-vendors.850df01d.js"></script><script src="static/js/index.be433e79.js"></script></body></html>
})()</script><link href="static/css/chunk-0226adbc.0e1403ca.css" rel="prefetch"><link href="static/css/chunk-066bbd34.c306629d.css" rel="prefetch"><link href="static/css/chunk-111f3671.d650a2aa.css" rel="prefetch"><link href="static/css/chunk-157f9069.c306629d.css" rel="prefetch"><link href="static/css/chunk-2e16d177.89936c18.css" rel="prefetch"><link href="static/css/chunk-360c43ba.c306629d.css" rel="prefetch"><link href="static/css/chunk-42236473.c306629d.css" rel="prefetch"><link href="static/css/chunk-5bc3d75d.c306629d.css" rel="prefetch"><link href="static/css/chunk-65f8ca6f.c306629d.css" rel="prefetch"><link href="static/css/chunk-7c62808c.c306629d.css" rel="prefetch"><link href="static/css/chunk-873a42e2.1951fa25.css" rel="prefetch"><link href="static/css/chunk-a85d3c1e.c8588555.css" rel="prefetch"><link href="static/css/chunk-a9d03770.c306629d.css" rel="prefetch"><link href="static/css/chunk-bab2e2c4.c306629d.css" rel="prefetch"><link href="static/js/chunk-0226adbc.650d977d.js" rel="prefetch"><link href="static/js/chunk-066bbd34.ab6bbcb6.js" rel="prefetch"><link href="static/js/chunk-111f3671.a8fd94fb.js" rel="prefetch"><link href="static/js/chunk-157f9069.23f0368f.js" rel="prefetch"><link href="static/js/chunk-16f9edc1.b4649c8b.js" rel="prefetch"><link href="static/js/chunk-2d0c138b.c9c27afb.js" rel="prefetch"><link href="static/js/chunk-2d221bd2.325767ed.js" rel="prefetch"><link href="static/js/chunk-2d2300ef.9f6423a4.js" rel="prefetch"><link href="static/js/chunk-2d230fe7.3bd3f709.js" rel="prefetch"><link href="static/js/chunk-2e16d177.61504963.js" rel="prefetch"><link href="static/js/chunk-360c43ba.85f94d47.js" rel="prefetch"><link href="static/js/chunk-42236473.6d9a6e4b.js" rel="prefetch"><link href="static/js/chunk-5bc3d75d.1757203d.js" rel="prefetch"><link href="static/js/chunk-65f8ca6f.318ac36c.js" rel="prefetch"><link href="static/js/chunk-733c35b2.3df6cc73.js" rel="prefetch"><link href="static/js/chunk-75f11c77.66a776e6.js" rel="prefetch"><link href="static/js/chunk-78234ca2.db370688.js" rel="prefetch"><link href="static/js/chunk-793f0082.e5043747.js" rel="prefetch"><link href="static/js/chunk-7c62808c.60ebb279.js" rel="prefetch"><link href="static/js/chunk-873a42e2.14b281c6.js" rel="prefetch"><link href="static/js/chunk-a85d3c1e.44ff44a0.js" rel="prefetch"><link href="static/js/chunk-a9d03770.4ebdae1b.js" rel="prefetch"><link href="static/js/chunk-bab2e2c4.f78ac718.js" rel="prefetch"><link href="static/js/chunk-d0753fda.309ffe6a.js" rel="prefetch"><link href="static/css/chunk-vendors.ee57d822.css" rel="preload" as="style"><link href="static/css/index.30c57bc1.css" rel="preload" as="style"><link href="static/js/chunk-vendors.ee5935b7.js" rel="preload" as="script"><link href="static/js/index.ecf07db3.js" rel="preload" as="script"><link href="static/css/chunk-vendors.ee57d822.css" rel="stylesheet"><link href="static/css/index.30c57bc1.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but vue-demo doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="static/js/chunk-vendors.ee5935b7.js"></script><script src="static/js/index.ecf07db3.js"></script></body></html>

View File

@@ -1 +1 @@
@supports (-webkit-mask:none) and (not (cater-color:#fff)){.login-container .el-input input{color:#fff}}.login-container .el-input{display:inline-block;height:47px;width:85%}.login-container .el-input input{background:transparent;border:0;-webkit-appearance:none;border-radius:0;padding:12px 5px 12px 15px;color:#fff;height:47px;caret-color:#fff}.login-container .el-input input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #283443 inset!important;box-shadow:inset 0 0 0 1000px #283443!important;-webkit-text-fill-color:#fff!important}.login-container .el-form-item{border:1px solid hsla(0,0%,100%,.1);background:rgba(0,0,0,.1);border-radius:5px;color:#454545}.login-container[data-v-d89a550a]{min-height:100%;width:100%;background-color:#2d3a4b;overflow:hidden}.login-container .login-form[data-v-d89a550a]{position:relative;width:520px;max-width:100%;padding:30px 50px 10px 50px;margin:120px auto auto auto;overflow:hidden;background:rgba(252,254,255,.11)}.login-container .tips[data-v-d89a550a]{font-size:14px;color:#fff;margin-bottom:10px}.login-container .tips span[data-v-d89a550a]:first-of-type{margin-right:16px}.login-container .svg-container[data-v-d89a550a]{padding:6px 5px 6px 15px;color:#889aa4;vertical-align:middle;width:30px;display:inline-block}.login-container .title-container[data-v-d89a550a]{position:relative}.login-container .title-container .title[data-v-d89a550a]{font-size:26px;color:#eee;margin:0 auto 40px auto;text-align:center;font-weight:700}.login-container .show-pwd[data-v-d89a550a]{position:absolute;right:10px;top:7px;font-size:16px;color:#889aa4;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.login-container .thirdparty-button[data-v-d89a550a]{position:absolute;right:0;bottom:6px}@media only screen and (max-width:470px){.login-container .thirdparty-button[data-v-d89a550a]{display:none}}
@supports (-webkit-mask:none) and (not (cater-color:#fff)){.login-container .el-input input{color:#fff}}.login-container .el-input{display:inline-block;height:47px;width:85%}.login-container .el-input input{background:transparent;border:0;-webkit-appearance:none;border-radius:0;padding:12px 5px 12px 15px;color:#fff;height:47px;caret-color:#fff}.login-container .el-input input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #283443 inset!important;box-shadow:inset 0 0 0 1000px #283443!important;-webkit-text-fill-color:#fff!important}.login-container .el-form-item{border:1px solid hsla(0,0%,100%,.1);background:rgba(0,0,0,.1);border-radius:5px;color:#454545}.login-container[data-v-675a2798]{min-height:100%;width:100%;background-color:#2d3a4b;overflow:hidden}.login-container .login-form[data-v-675a2798]{position:relative;width:520px;max-width:100%;padding:30px 50px 10px 50px;margin:120px auto auto auto;overflow:hidden;background:rgba(252,254,255,.11)}.login-container .tips[data-v-675a2798]{font-size:14px;color:#fff;margin-bottom:10px}.login-container .tips span[data-v-675a2798]:first-of-type{margin-right:16px}.login-container .svg-container[data-v-675a2798]{padding:6px 5px 6px 15px;color:#889aa4;vertical-align:middle;width:30px;display:inline-block}.login-container .title-container[data-v-675a2798]{position:relative}.login-container .title-container .title[data-v-675a2798]{font-size:26px;color:#eee;margin:0 auto 40px auto;text-align:center;font-weight:700}.login-container .show-pwd[data-v-675a2798]{position:absolute;right:10px;top:7px;font-size:16px;color:#889aa4;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.login-container .thirdparty-button[data-v-675a2798]{position:absolute;right:0;bottom:6px}@media only screen and (max-width:470px){.login-container .thirdparty-button[data-v-675a2798]{display:none}}

View File

@@ -1 +0,0 @@
@supports (-webkit-mask:none) and (not (cater-color:#fff)){.login-container .el-input input{color:#fff}}.login-container .el-input{display:inline-block;height:47px;width:85%}.login-container .el-input input{background:transparent;border:0;-webkit-appearance:none;border-radius:0;padding:12px 5px 12px 15px;color:#fff;height:47px;caret-color:#fff}.login-container .el-input input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #283443 inset!important;box-shadow:inset 0 0 0 1000px #283443!important;-webkit-text-fill-color:#fff!important}.login-container .el-form-item{border:1px solid hsla(0,0%,100%,.1);background:rgba(0,0,0,.1);border-radius:5px;color:#454545}.login-container[data-v-da2e2d10]{min-height:100%;width:100%;background-color:#2d3a4b;overflow:hidden}.login-container .login-form[data-v-da2e2d10]{position:relative;width:520px;max-width:100%;padding:30px 50px 10px 50px;margin:120px auto auto auto;overflow:hidden;background:rgba(252,254,255,.11)}.login-container .tips[data-v-da2e2d10]{font-size:14px;color:#fff;margin-bottom:10px}.login-container .tips span[data-v-da2e2d10]:first-of-type{margin-right:16px}.login-container .svg-container[data-v-da2e2d10]{padding:6px 5px 6px 15px;color:#889aa4;vertical-align:middle;width:30px;display:inline-block}.login-container .title-container[data-v-da2e2d10]{position:relative}.login-container .title-container .title[data-v-da2e2d10]{font-size:26px;color:#eee;margin:0 auto 40px auto;text-align:center;font-weight:700}.login-container .show-pwd[data-v-da2e2d10]{position:absolute;right:10px;top:7px;font-size:16px;color:#889aa4;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.login-container .thirdparty-button[data-v-da2e2d10]{position:absolute;right:0;bottom:6px}@media only screen and (max-width:470px){.login-container .thirdparty-button[data-v-da2e2d10]{display:none}}

View File

@@ -1 +0,0 @@
.pagination-container[data-v-90fd946a]{background:#fff}.pagination-container.hidden[data-v-90fd946a]{display:none}

View File

@@ -1 +0,0 @@
.pagination-container[data-v-90fd946a]{background:#fff}.pagination-container.hidden[data-v-90fd946a]{display:none}

View File

@@ -1 +0,0 @@
.dashboard-container[data-v-bc400e40]{padding:32px;background-color:#f0f2f5;position:relative}.dashboard-container .chart-wrapper[data-v-bc400e40]{background:#fff;padding:16px 16px 0;margin-bottom:32px}.dashboard-editor-container[data-v-bc400e40]{padding:32px;background-color:#f0f2f5;position:relative}.dashboard-editor-container .github-corner[data-v-bc400e40]{position:absolute;top:0;border:0;right:0}.dashboard-editor-container .chart-wrapper[data-v-bc400e40]{background:#fff;padding:16px 16px 0;margin-bottom:32px}@media (max-width:1024px){.chart-wrapper[data-v-bc400e40]{padding:8px}}.panel-group[data-v-bc400e40]{margin-top:18px}.panel-group .card-panel-col[data-v-bc400e40]{margin-bottom:32px}.panel-group .card-panel[data-v-bc400e40]{height:108px;cursor:pointer;font-size:12px;position:relative;overflow:hidden;color:#666;background:#fff;-webkit-box-shadow:4px 4px 40px rgba(0,0,0,.05);box-shadow:4px 4px 40px rgba(0,0,0,.05);border-color:rgba(0,0,0,.05)}.panel-group .card-panel:hover .card-panel-icon-wrapper[data-v-bc400e40]{color:#fff}.panel-group .card-panel:hover .icon-people[data-v-bc400e40]{background:#40c9c6}.panel-group .card-panel:hover .icon-message[data-v-bc400e40]{background:#36a3f7}.panel-group .card-panel:hover .icon-money[data-v-bc400e40]{background:#f4516c}.panel-group .card-panel:hover .icon-shopping[data-v-bc400e40]{background:#34bfa3}.panel-group .card-panel .icon-people[data-v-bc400e40]{color:#40c9c6}.panel-group .card-panel .icon-message[data-v-bc400e40]{color:#36a3f7}.panel-group .card-panel .icon-money[data-v-bc400e40]{color:#f4516c}.panel-group .card-panel .icon-shopping[data-v-bc400e40]{color:#34bfa3}.panel-group .card-panel .card-panel-icon-wrapper[data-v-bc400e40]{float:left;margin:14px 0 0 14px;padding:16px;-webkit-transition:all .38s ease-out;transition:all .38s ease-out;border-radius:6px}.panel-group .card-panel .card-panel-icon[data-v-bc400e40]{float:left;font-size:48px}.panel-group .card-panel .card-panel-description[data-v-bc400e40]{float:right;font-weight:700;margin:26px;margin-left:0}.panel-group .card-panel .card-panel-description .card-panel-text[data-v-bc400e40]{line-height:18px;color:rgba(0,0,0,.45);font-size:16px;margin-bottom:12px}.panel-group .card-panel .card-panel-description .card-panel-num[data-v-bc400e40]{font-size:20px}@media (max-width:550px){.card-panel-description[data-v-bc400e40]{display:none}.card-panel-icon-wrapper[data-v-bc400e40]{float:none!important;width:100%;height:100%;margin:0!important}.card-panel-icon-wrapper .svg-icon[data-v-bc400e40]{display:block;margin:14px auto!important;float:none!important}}.echarts-line[data-v-bc400e40]{background:#fff;padding:16px 16px 0;margin-bottom:32px}

View File

@@ -1 +0,0 @@
@supports (-webkit-mask:none) and (not (cater-color:#fff)){.login-container .el-input input{color:#fff}}.login-container .el-input{display:inline-block;height:47px;width:85%}.login-container .el-input input{background:transparent;border:0;-webkit-appearance:none;border-radius:0;padding:12px 5px 12px 15px;color:#fff;height:47px;caret-color:#fff}.login-container .el-input input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #283443 inset!important;box-shadow:inset 0 0 0 1000px #283443!important;-webkit-text-fill-color:#fff!important}.login-container .el-form-item{border:1px solid hsla(0,0%,100%,.1);background:rgba(0,0,0,.1);border-radius:5px;color:#454545}.login-container[data-v-417fb36e]{min-height:100%;width:100%;background-color:#2d3a4b;overflow:hidden}.login-container .login-form[data-v-417fb36e]{position:relative;width:520px;max-width:100%;padding:30px 50px 10px 50px;margin:120px auto auto auto;overflow:hidden;background:rgba(252,254,255,.11)}.login-container .tips[data-v-417fb36e]{font-size:14px;color:#fff;margin-bottom:10px}.login-container .tips span[data-v-417fb36e]:first-of-type{margin-right:16px}.login-container .svg-container[data-v-417fb36e]{padding:6px 5px 6px 15px;color:#889aa4;vertical-align:middle;width:30px;display:inline-block}.login-container .title-container[data-v-417fb36e]{position:relative}.login-container .title-container .title[data-v-417fb36e]{font-size:26px;color:#eee;margin:0 auto 40px auto;text-align:center;font-weight:700}.login-container .show-pwd[data-v-417fb36e]{position:absolute;right:10px;top:7px;font-size:16px;color:#889aa4;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.login-container .thirdparty-button[data-v-417fb36e]{position:absolute;right:0;bottom:6px}@media only screen and (max-width:470px){.login-container .thirdparty-button[data-v-417fb36e]{display:none}}

View File

@@ -1 +0,0 @@
.pagination-container[data-v-90fd946a]{background:#fff}.pagination-container.hidden[data-v-90fd946a]{display:none}

View File

@@ -1 +0,0 @@
.pagination-container[data-v-90fd946a]{background:#fff}.pagination-container.hidden[data-v-90fd946a]{display:none}

View File

@@ -1 +0,0 @@
.pagination-container[data-v-90fd946a]{background:#fff}.pagination-container.hidden[data-v-90fd946a]{display:none}

View File

@@ -1 +0,0 @@
@supports (-webkit-mask:none) and (not (cater-color:#fff)){.login-container .el-input input{color:#fff}}.login-container .el-input{display:inline-block;height:47px;width:85%}.login-container .el-input input{background:transparent;border:0;-webkit-appearance:none;border-radius:0;padding:12px 5px 12px 15px;color:#fff;height:47px;caret-color:#fff}.login-container .el-input input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #283443 inset!important;box-shadow:inset 0 0 0 1000px #283443!important;-webkit-text-fill-color:#fff!important}.login-container .el-form-item{border:1px solid hsla(0,0%,100%,.1);background:rgba(0,0,0,.1);border-radius:5px;color:#454545}.login-container[data-v-11d46f0a]{min-height:100%;width:100%;background-color:#2d3a4b;overflow:hidden}.login-container .login-form[data-v-11d46f0a]{position:relative;width:520px;max-width:100%;padding:30px 50px 10px 50px;margin:120px auto auto auto;overflow:hidden;background:rgba(252,254,255,.11)}.login-container .tips[data-v-11d46f0a]{font-size:14px;color:#fff;margin-bottom:10px}.login-container .tips span[data-v-11d46f0a]:first-of-type{margin-right:16px}.login-container .svg-container[data-v-11d46f0a]{padding:6px 5px 6px 15px;color:#889aa4;vertical-align:middle;width:30px;display:inline-block}.login-container .title-container[data-v-11d46f0a]{position:relative}.login-container .title-container .title[data-v-11d46f0a]{font-size:26px;color:#eee;margin:0 auto 40px auto;text-align:center;font-weight:700}.login-container .show-pwd[data-v-11d46f0a]{position:absolute;right:10px;top:7px;font-size:16px;color:#889aa4;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.login-container .thirdparty-button[data-v-11d46f0a]{position:absolute;right:0;bottom:6px}@media only screen and (max-width:470px){.login-container .thirdparty-button[data-v-11d46f0a]{display:none}}

View File

@@ -1 +0,0 @@
.pagination-container[data-v-90fd946a]{background:#fff}.pagination-container.hidden[data-v-90fd946a]{display:none}

View File

@@ -1 +0,0 @@
.box-center[data-v-bd51907a]{margin:0 auto;display:table}.text-muted[data-v-bd51907a]{color:#777}.user-profile .user-name[data-v-bd51907a]{font-weight:700}.user-profile .box-center[data-v-bd51907a]{padding-top:10px}.user-profile .user-role[data-v-bd51907a]{padding-top:10px;font-weight:400;font-size:14px}.user-profile .box-social[data-v-bd51907a]{padding-top:30px}.user-profile .box-social .el-table[data-v-bd51907a]{border-top:1px solid #dfe6ec}.user-profile .user-follow[data-v-bd51907a]{padding-top:20px}.user-bio[data-v-bd51907a]{margin-top:20px;color:#606266}.user-bio span[data-v-bd51907a]{padding-left:4px}.user-bio .user-bio-section[data-v-bd51907a]{font-size:14px;padding:15px 0}.user-bio .user-bio-section .user-bio-section-header[data-v-bd51907a]{border-bottom:1px solid #dfe6ec;padding-bottom:10px;margin-bottom:10px;font-weight:700}

View File

@@ -1 +0,0 @@
.pagination-container[data-v-90fd946a]{background:#fff}.pagination-container.hidden[data-v-90fd946a]{display:none}

View File

@@ -1 +0,0 @@
.pagination-container[data-v-90fd946a]{background:#fff}.pagination-container.hidden[data-v-90fd946a]{display:none}

View File

@@ -1 +0,0 @@
.pagination-container[data-v-90fd946a]{background:#fff}.pagination-container.hidden[data-v-90fd946a]{display:none}.exampaper-item-box .q-title{margin:0 5px 0 5px}

View File

@@ -1 +0,0 @@
.pagination-container[data-v-90fd946a]{background:#fff}.pagination-container.hidden[data-v-90fd946a]{display:none}

Some files were not shown because too many files have changed in this diff Show More