| | |
| | | import com.ycl.jxkg.domain.entity.UserEventLog; |
| | | import com.ycl.jxkg.event.UserEvent; |
| | | import com.ycl.jxkg.service.UserService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.ApplicationEventPublisher; |
| | | import org.springframework.security.core.Authentication; |
| | |
| | | userEventLog.setContent(user.getUserName() + " 登录了江西语音视频培训系统"); |
| | | eventPublisher.publishEvent(new UserEvent(userEventLog)); |
| | | com.ycl.jxkg.domain.entity.User newUser = new com.ycl.jxkg.domain.entity.User(); |
| | | newUser.setUserName(user.getUserName()); |
| | | newUser.setImagePath(user.getImagePath()); |
| | | BeanUtils.copyProperties(user,newUser); |
| | | RestUtil.response(response, SystemCode.OK.getCode(), SystemCode.OK.getMessage(), newUser); |
| | | } |
| | | } else { |
| | |
| | | |
| | | /** 是否是继续考试 */ |
| | | private Boolean isContinue; |
| | | |
| | | /** 提交状态 */ |
| | | private String submitStatus; |
| | | public static ExamVO getVoByEntity(@NonNull Exam entity, ExamVO vo) { |
| | | if(vo == null) { |
| | | vo = new ExamVO(); |
| | |
| | | import com.ycl.jxkg.base.Result; |
| | | import com.ycl.jxkg.base.SystemCode; |
| | | import com.ycl.jxkg.context.WebContext; |
| | | import com.ycl.jxkg.domain.base.AbsVo; |
| | | import com.ycl.jxkg.domain.entity.*; |
| | | import com.ycl.jxkg.domain.exam.PaperFixQuestionDTO; |
| | | import com.ycl.jxkg.domain.exam.PaperQuestion; |
| | |
| | | if (baseMapper.updateById(entity) > 0) { |
| | | this.sendMQ(entity, entity.getUpdateVersion() + 1); |
| | | } |
| | | |
| | | return Result.ok("修改成功"); |
| | | } |
| | | |
| | |
| | | <result column="class_name" property="className" /> |
| | | <result column="name" property="examPaperName" /> |
| | | <result column="isContinue" property="isContinue" /> |
| | | <result column="submitStatus" property="submitStatus" /> |
| | | </resultMap> |
| | | |
| | | <select id="getById" resultMap="BaseResultMap"> |
| | |
| | | TE.id, |
| | | TC.class_name, |
| | | TEP.name, |
| | | TEST.status as submitStatus, |
| | | (SELECT IF(COUNT(*) > 0, true, false) FROM t_exam_submit_temp WHERE user_id = #{userId} AND status = 'temp') as isContinue |
| | | FROM |
| | | t_exam TE |
| | | INNER JOIN t_classes TC ON TC.id = TE.classes_id AND TC.deleted = 0 AND TC.status = 'normal' |
| | | INNER JOIN t_classes_user TCU ON TC.id = TCU.classes_id And TCU.deleted = 0 AND TC.deleted = 0 AND TCU.user_id = #{userId} |
| | | INNER JOIN t_exam_paper TEP ON TEP.id = TE.exam_paper_id AND TEP.deleted = 0 |
| | | LEFT JOIN t_exam_submit_temp TEST ON TEST.exam_id = TE.id |
| | | WHERE |
| | | TE.deleted = 0 |
| | | TE.deleted = 0 and TEST.deleted !=1 |
| | | <if test="query.examName != null and query.examName != ''"> |
| | | AND TE.exam_name like concat('%', #{query.examName}, '%') |
| | | </if> |