"ruoyi-ui/src/vscode:/vscode.git/clone" did not exist on "d48475c585a1c082e24728f58c18d44d8df68b81"
Commit 64d4f18d authored by bing zhang's avatar bing zhang
Browse files

1

parent 539344b2
package com.mindskip.xzs.listener;
import com.mindskip.xzs.event.UserEvent;
import com.mindskip.xzs.service.UserEventLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
/**
* @version 3.5.0
* @description: The type User log listener.
* Copyright (C), 2020-2021, 武汉思维跳跃科技有限公司
* @date 2021/12/25 9:45
*/
@Component
public class UserLogListener implements ApplicationListener<UserEvent> {
private final UserEventLogService userEventLogService;
/**
* Instantiates a new User log listener.
*
* @param userEventLogService the user event log service
*/
@Autowired
public UserLogListener(UserEventLogService userEventLogService) {
this.userEventLogService = userEventLogService;
}
@Override
public void onApplicationEvent(UserEvent userEvent) {
userEventLogService.insertByFilter(userEvent.getUserEventLog());
}
}
package com.mindskip.xzs.repository;
public interface BaseMapper<T> {
int deleteByPrimaryKey(Integer id);
int insert(T record);
int insertSelective(T record);
T selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(T record);
int updateByPrimaryKey(T record);
}
package com.mindskip.xzs.repository;
import com.mindskip.xzs.domain.ExamPaperAnswer;
import com.mindskip.xzs.domain.other.KeyValue;
import com.mindskip.xzs.viewmodel.student.exampaper.ExamPaperAnswerPageVM;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
@Mapper
public interface ExamPaperAnswerMapper extends BaseMapper<ExamPaperAnswer> {
List<ExamPaperAnswer> studentPage(ExamPaperAnswerPageVM requestVM);
Integer selectAllCount();
List<KeyValue> selectCountByDate(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
ExamPaperAnswer getByPidUid(@Param("pid") Integer paperId, @Param("uid") Integer uid);
List<ExamPaperAnswer> adminPage(com.mindskip.xzs.viewmodel.paper.ExamPaperAnswerPageRequestVM requestVM);
}
package com.mindskip.xzs.repository;
import com.mindskip.xzs.domain.ExamPaper;
import com.mindskip.xzs.domain.other.KeyValue;
import com.mindskip.xzs.viewmodel.exam.ExamPaperPageRequestVM;
import com.mindskip.xzs.viewmodel.student.dashboard.PaperFilter;
import com.mindskip.xzs.viewmodel.student.dashboard.PaperInfo;
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageVM;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
@Mapper
public interface ExamPaperMapper extends BaseMapper<ExamPaper> {
List<ExamPaper> page(ExamPaperPageRequestVM requestVM);
List<ExamPaper> taskExamPage(ExamPaperPageRequestVM requestVM);
List<ExamPaper> studentPage(ExamPaperPageVM requestVM);
List<PaperInfo> indexPaper(PaperFilter paperFilter);
Integer selectAllCount();
List<KeyValue> selectCountByDate(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
int updateTaskPaper(@Param("taskId") Integer taskId,@Param("paperIds") List<Integer> paperIds);
int clearTaskPaper(@Param("paperIds") List<Integer> paperIds);
}
package com.mindskip.xzs.repository;
import com.mindskip.xzs.domain.ExamPaperQuestionCustomerAnswer;
import com.mindskip.xzs.domain.other.ExamPaperAnswerUpdate;
import com.mindskip.xzs.domain.other.KeyValue;
import com.mindskip.xzs.viewmodel.student.question.answer.QuestionPageStudentRequestVM;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
@Mapper
public interface ExamPaperQuestionCustomerAnswerMapper extends BaseMapper<ExamPaperQuestionCustomerAnswer> {
List<ExamPaperQuestionCustomerAnswer> selectListByPaperAnswerId(Integer id);
List<ExamPaperQuestionCustomerAnswer> studentPage(QuestionPageStudentRequestVM requestVM);
int insertList(List<ExamPaperQuestionCustomerAnswer> list);
Integer selectAllCount();
List<KeyValue> selectCountByDate(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
int updateScore(List<ExamPaperAnswerUpdate> examPaperAnswerUpdates);
}
package com.mindskip.xzs.repository;
import com.mindskip.xzs.domain.Message;
import com.mindskip.xzs.viewmodel.message.MessagePageRequestVM;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface MessageMapper extends BaseMapper<Message> {
List<Message> page(MessagePageRequestVM requestVM);
List<Message> selectByIds(List<Integer> ids);
int readAdd(Integer id);
}
package com.mindskip.xzs.repository;
import com.mindskip.xzs.domain.MessageUser;
import com.mindskip.xzs.viewmodel.student.user.MessageRequestVM;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface MessageUserMapper extends BaseMapper<MessageUser> {
List<MessageUser> selectByMessageIds(List<Integer> ids);
int inserts(List<MessageUser> list);
List<MessageUser> studentPage(MessageRequestVM requestVM);
Integer unReadCount(Integer userId);
}
package com.mindskip.xzs.repository;
import com.mindskip.xzs.domain.other.KeyValue;
import com.mindskip.xzs.domain.Question;
import com.mindskip.xzs.viewmodel.question.QuestionPageRequestVM;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
@Mapper
public interface QuestionMapper extends BaseMapper<Question> {
List<Question> page(QuestionPageRequestVM requestVM);
List<Question> selectByIds(@Param("ids") List<Integer> ids);
Integer selectAllCount();
List<KeyValue> selectCountByDate(@Param("startTime") Date startTime,@Param("endTime") Date endTime);
}
package com.mindskip.xzs.repository;
import com.mindskip.xzs.domain.Subject;
import com.mindskip.xzs.viewmodel.education.SubjectPageRequestVM;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface SubjectMapper extends BaseMapper<Subject> {
List<Subject> getSubjectByLevel(Integer level);
List<Subject> allSubject();
List<Subject> page(SubjectPageRequestVM requestVM);
}
package com.mindskip.xzs.repository;
import com.mindskip.xzs.domain.TaskExamCustomerAnswer;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface TaskExamCustomerAnswerMapper extends BaseMapper<TaskExamCustomerAnswer> {
TaskExamCustomerAnswer getByTUid(@Param("tid") Integer tid, @Param("uid") Integer uid);
List<TaskExamCustomerAnswer> selectByTUid(@Param("taskIds") List<Integer> taskIds, @Param("uid") Integer uid);
}
package com.mindskip.xzs.repository;
import com.mindskip.xzs.domain.TaskExam;
import com.mindskip.xzs.viewmodel.task.TaskPageRequestVM;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface TaskExamMapper extends BaseMapper<TaskExam> {
List<TaskExam> page(TaskPageRequestVM requestVM);
List<TaskExam> getByGradeLevel(Integer gradeLevel);
}
package com.mindskip.xzs.repository;
import com.mindskip.xzs.domain.TextContent;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface TextContentMapper extends BaseMapper<TextContent> {
}
package com.mindskip.xzs.repository;
import com.mindskip.xzs.domain.UserEventLog;
import com.mindskip.xzs.domain.other.KeyValue;
import com.mindskip.xzs.viewmodel.user.UserEventPageRequestVM;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
@Mapper
public interface UserEventLogMapper extends BaseMapper<UserEventLog> {
List<UserEventLog> getUserEventLogByUserId(Integer id);
List<UserEventLog> page(UserEventPageRequestVM requestVM);
List<KeyValue> selectCountByDate(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
}
package com.mindskip.xzs.repository;
import com.mindskip.xzs.domain.other.KeyValue;
import com.mindskip.xzs.domain.User;
import com.mindskip.xzs.viewmodel.user.UserPageRequestVM;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
@Mapper
public interface UserMapper extends BaseMapper<User> {
/**
* getAllUser
*
* @return List<User>
*/
List<User> getAllUser();
/**
* getUserById
*
* @param id id
* @return User
*/
User getUserById(Integer id);
/**
* getUserByUserName
*
* @param username username
* @return User
*/
User getUserByUserName(String username);
/**
* getUserByUserNamePwd
*
* @param username username
* @param pwd pwd
* @return User
*/
User getUserByUserNamePwd(@Param("username") String username, @Param("pwd") String pwd);
/**
* getUserByUuid
*
* @param uuid uuid
* @return User
*/
User getUserByUuid(String uuid);
/**
* userPageList
*
* @param map userPageList
* @return List<User>
*/
List<User> userPageList(Map<String, Object> map);
/**
* userPageCount
*
* @param map map
* @return Integer
*/
Integer userPageCount(Map<String, Object> map);
/**
* @param requestVM requestVM
* @return List<User>
*/
List<User> userPage(UserPageRequestVM requestVM);
/**
* insertUser
*
* @param user user
*/
void insertUser(User user);
/**
* insertUsers
*
* @param users users
*/
void insertUsers(List<User> users);
/**
* updateUser
*
* @param user user
*/
void updateUser(User user);
/**
* updateUsersAge
*
* @param map map
*/
void updateUsersAge(Map<String, Object> map);
/**
* deleteUsersByIds
*
* @param ids ids
*/
void deleteUsersByIds(List<Integer> ids);
/**
* insertUserSql
*
* @param user user
*/
void insertUserSql(User user);
Integer selectAllCount();
List<KeyValue> selectByUserName(String userName);
List<User> selectByIds(List<Integer> ids);
User selectByWxOpenId(@Param("wxOpenId") String wxOpenId);
}
package com.mindskip.xzs.repository;
import com.mindskip.xzs.domain.UserToken;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface UserTokenMapper extends BaseMapper<UserToken> {
UserToken getToken(String token);
}
package com.mindskip.xzs.service;
import com.mindskip.xzs.domain.User;
public interface AuthenticationService {
/**
* authUser
*
* @param username username
* @param password password
* @return boolean
*/
boolean authUser(String username, String password);
/**
* authUser
*
* @param user user
* @param username username
* @param password password
* @return boolean
*/
boolean authUser(User user, String username, String password);
/**
* pwdEncode
*
* @param password password
* @return String
*/
String pwdEncode(String password);
/**
* pwdDecode
*
* @param endodePwd endodePwd
* @return String
*/
String pwdDecode(String endodePwd);
}
package com.mindskip.xzs.service;
/**
* service接口,和mybatis generator 配套使用
*
* @param <T>
*/
public interface BaseService<T> {
/**
* 根据id删除数据,硬删除
*
* @param id id
* @return int
*/
int deleteById(Integer id);
/**
* 插入数据,完整数据插入
*
* @param record record
* @return int
*/
int insert(T record);
/**
* 插入不为null的数据
*
* @param record
* @return int
*/
int insertByFilter(T record);
/**
* 根据id查询数据
*
* @param id
* @return
*/
T selectById(Integer id);
/**
* 更新不为null的数据
*
* @param record
* @return int
*/
int updateByIdFilter(T record);
/**
* 更新完整的数据
*
* @param record
* @return int
*/
int updateById(T record);
}
package com.mindskip.xzs.service;
import com.mindskip.xzs.domain.ExamPaperAnswer;
import com.mindskip.xzs.domain.ExamPaperAnswerInfo;
import com.mindskip.xzs.domain.User;
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperSubmitVM;
import com.mindskip.xzs.viewmodel.student.exampaper.ExamPaperAnswerPageVM;
import com.github.pagehelper.PageInfo;
import java.util.List;
public interface ExamPaperAnswerService extends BaseService<ExamPaperAnswer> {
/**
* 学生考试记录分页
*
* @param requestVM 过滤条件
* @return PageInfo<ExamPaperAnswer>
*/
PageInfo<ExamPaperAnswer> studentPage(ExamPaperAnswerPageVM requestVM);
/**
* 计算试卷提交结果(不入库)
*
* @param examPaperSubmitVM
* @param user
* @return
*/
ExamPaperAnswerInfo calculateExamPaperAnswer(ExamPaperSubmitVM examPaperSubmitVM, User user);
/**
* 试卷批改
* @param examPaperSubmitVM examPaperSubmitVM
* @return String
*/
String judge(ExamPaperSubmitVM examPaperSubmitVM);
/**
* 试卷答题信息转成ViewModel 传给前台
*
* @param id 试卷id
* @return ExamPaperSubmitVM
*/
ExamPaperSubmitVM examPaperAnswerToVM(Integer id);
Integer selectAllCount();
List<Integer> selectMothCount();
PageInfo<ExamPaperAnswer> adminPage(com.mindskip.xzs.viewmodel.paper.ExamPaperAnswerPageRequestVM requestVM);
}
package com.mindskip.xzs.service;
import com.mindskip.xzs.domain.ExamPaperQuestionCustomerAnswer;
import com.mindskip.xzs.domain.other.ExamPaperAnswerUpdate;
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperSubmitItemVM;
import com.mindskip.xzs.viewmodel.student.question.answer.QuestionPageStudentRequestVM;
import com.github.pagehelper.PageInfo;
import java.util.List;
public interface ExamPaperQuestionCustomerAnswerService extends BaseService<ExamPaperQuestionCustomerAnswer> {
PageInfo<ExamPaperQuestionCustomerAnswer> studentPage(QuestionPageStudentRequestVM requestVM);
List<ExamPaperQuestionCustomerAnswer> selectListByPaperAnswerId(Integer id);
/**
* 试卷提交答案入库
*
* @param examPaperQuestionCustomerAnswers List<ExamPaperQuestionCustomerAnswer>
*/
void insertList(List<ExamPaperQuestionCustomerAnswer> examPaperQuestionCustomerAnswers);
/**
* 试卷问题答题信息转成ViewModel 传给前台
*
* @param qa ExamPaperQuestionCustomerAnswer
* @return ExamPaperSubmitItemVM
*/
ExamPaperSubmitItemVM examPaperQuestionCustomerAnswerToVM(ExamPaperQuestionCustomerAnswer qa);
Integer selectAllCount();
List<Integer> selectMothCount();
int updateScore(List<ExamPaperAnswerUpdate> examPaperAnswerUpdates);
}
package com.mindskip.xzs.service;
import com.mindskip.xzs.domain.ExamPaper;
import com.mindskip.xzs.domain.User;
import com.mindskip.xzs.viewmodel.exam.ExamPaperEditRequestVM;
import com.mindskip.xzs.viewmodel.exam.ExamPaperPageRequestVM;
import com.mindskip.xzs.viewmodel.student.dashboard.PaperFilter;
import com.mindskip.xzs.viewmodel.student.dashboard.PaperInfo;
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageVM;
import com.github.pagehelper.PageInfo;
import java.util.List;
public interface ExamPaperService extends BaseService<ExamPaper> {
PageInfo<ExamPaper> page(ExamPaperPageRequestVM requestVM);
PageInfo<ExamPaper> taskExamPage(ExamPaperPageRequestVM requestVM);
PageInfo<ExamPaper> studentPage(ExamPaperPageVM requestVM);
ExamPaper savePaperFromVM(ExamPaperEditRequestVM examPaperEditRequestVM, User user);
ExamPaperEditRequestVM examPaperToVM(Integer id);
List<PaperInfo> indexPaper(PaperFilter paperFilter);
Integer selectAllCount();
List<Integer> selectMothCount();
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment