【修改】拉取试题id,获取服务器列表【新增】试题审核时间、审核人
This commit is contained in:
@@ -151,7 +151,7 @@ public class ExamQuestionController
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*获得学校列表
|
*获得学校分页列表
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getSchoolName")
|
@GetMapping("/getSchoolName")
|
||||||
@@ -160,6 +160,16 @@ public class ExamQuestionController
|
|||||||
{
|
{
|
||||||
return success(examQuestionService.getSchoolName(tenantDto));
|
return success(examQuestionService.getSchoolName(tenantDto));
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*获得学校分页列表(不分页)
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getSchoolNameNopage")
|
||||||
|
@TenantIgnore
|
||||||
|
public CommonResult<List<TenantVo>> getSchoolNameNaPage()
|
||||||
|
{
|
||||||
|
return success(examQuestionService.getSchoolNameNaPage());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务端审核通过试题
|
* 服务端审核通过试题
|
||||||
|
@@ -117,4 +117,9 @@ public interface ExamQuestionMapper extends BaseMapperX<ExamQuestion>
|
|||||||
List<String> seleAllQueueName();
|
List<String> seleAllQueueName();
|
||||||
|
|
||||||
|
|
||||||
|
void updateExamQuestionByIds(@Param("updater") String loginUserNickname, @Param("quIds") List<String> quIds);
|
||||||
|
|
||||||
|
int selectExamQuestionCountByQuId(String quId);
|
||||||
|
|
||||||
|
List<TenantVo> getSchoolNameNaPage();
|
||||||
}
|
}
|
||||||
|
@@ -430,12 +430,14 @@ public class ExamQuestionServiceImpl implements IExamQuestionService
|
|||||||
if (list!=null&&list.size()>0){
|
if (list!=null&&list.size()>0){
|
||||||
for (QuestionExamineDO questionExamineDO : list) {
|
for (QuestionExamineDO questionExamineDO : list) {
|
||||||
String schoolName =questionExamineMapper.selectSchoolName(questionExamineDO.getSource());
|
String schoolName =questionExamineMapper.selectSchoolName(questionExamineDO.getSource());
|
||||||
ExamQuestion examQuestion = examQuestionMapper.selectExamQuestionByQuIdAndTenantId(questionExamineDO.getQuId(),questionExamineDO.getSource());
|
ExamQuestion examQuestion = examQuestionMapper.selectExamQuestionByQuId(questionExamineDO.getQuId());
|
||||||
examQuestion.setCreateTeacher(questionExamineDO.getCreateTeacher());
|
examQuestion.setCreateTeacher(questionExamineDO.getCreateTeacher());
|
||||||
examQuestion.setSchoolName(schoolName);
|
examQuestion.setSchoolName(schoolName);
|
||||||
examQuestion.setSource(questionExamineDO.getSource());
|
examQuestion.setSource(questionExamineDO.getSource());
|
||||||
examQuestion.setType(questionExamineDO.getType());
|
examQuestion.setType(questionExamineDO.getType());
|
||||||
examQuestion.setCreateTime(questionExamineDO.getCreateTime());
|
examQuestion.setCreateTime(questionExamineDO.getCreateTime());
|
||||||
|
examQuestion.setUpdateTime(questionExamineDO.getUpdateTime());
|
||||||
|
examQuestion.setUpdater(questionExamineDO.getUpdater());
|
||||||
examQuestionList.add(examQuestion);
|
examQuestionList.add(examQuestion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -460,7 +462,7 @@ public class ExamQuestionServiceImpl implements IExamQuestionService
|
|||||||
@Override
|
@Override
|
||||||
public int auditQueByIds(List<String> quIds) {
|
public int auditQueByIds(List<String> quIds) {
|
||||||
|
|
||||||
|
examQuestionMapper.updateExamQuestionByIds(SecurityFrameworkUtils.getLoginUserNickname(),quIds);
|
||||||
return examQuestionMapper.auditQueByIds(quIds);
|
return examQuestionMapper.auditQueByIds(quIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -469,6 +471,11 @@ public class ExamQuestionServiceImpl implements IExamQuestionService
|
|||||||
return examQuestionMapper.noAuditQue(quIds);
|
return examQuestionMapper.noAuditQue(quIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<TenantVo> getSchoolNameNaPage() {
|
||||||
|
return examQuestionMapper.getSchoolNameNaPage();
|
||||||
|
}
|
||||||
|
|
||||||
public boolean getExamQuestionToRabbitMQInsertData(String queueName) {
|
public boolean getExamQuestionToRabbitMQInsertData(String queueName) {
|
||||||
// 最先判断类型
|
// 最先判断类型
|
||||||
// TODO 1、拉取数据,保存至数据库 2、回调服务器是否拉取成功(中心服务器)
|
// TODO 1、拉取数据,保存至数据库 2、回调服务器是否拉取成功(中心服务器)
|
||||||
@@ -480,6 +487,12 @@ public class ExamQuestionServiceImpl implements IExamQuestionService
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(examQuestions!=null&&examQuestions.size()>0){
|
if(examQuestions!=null&&examQuestions.size()>0){
|
||||||
|
for (ExamQuestion examQuestion : examQuestions) {
|
||||||
|
int count= examQuestionMapper.selectExamQuestionCountByQuId(examQuestion.getQuId());
|
||||||
|
if (count==0){
|
||||||
|
examQuestion.setQuId(IdUtils.simpleUUID());
|
||||||
|
}
|
||||||
|
}
|
||||||
examQuestionMapper.insertOrUpdate(examQuestions);
|
examQuestionMapper.insertOrUpdate(examQuestions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -497,7 +510,7 @@ public class ExamQuestionServiceImpl implements IExamQuestionService
|
|||||||
QuestionExamineDO questionExamineDO = questionExamineMapper.selectById(quId);
|
QuestionExamineDO questionExamineDO = questionExamineMapper.selectById(quId);
|
||||||
|
|
||||||
// 2、根据试题ID和租户查找试题详情
|
// 2、根据试题ID和租户查找试题详情
|
||||||
ExamQuestion examQuestion_obj = examQuestionMapper.selectExamQuestionByQuIdAndTenantId(quId,questionExamineDO.getSource());
|
ExamQuestion examQuestion_obj = examQuestionMapper.selectExamQuestionByQuId(quId);
|
||||||
// examQuestion_obj.setType(rabbitMQSendInfoVO.getType());
|
// examQuestion_obj.setType(rabbitMQSendInfoVO.getType());
|
||||||
// examQuestion_obj.setSource(SecurityFrameworkUtils.getLoginTenantId());
|
// examQuestion_obj.setSource(SecurityFrameworkUtils.getLoginTenantId());
|
||||||
// examQuestion_obj.setCreateTeacher(SecurityFrameworkUtils.getLoginUserNickname());
|
// examQuestion_obj.setCreateTeacher(SecurityFrameworkUtils.getLoginUserNickname());
|
||||||
|
@@ -97,5 +97,5 @@ public interface IExamQuestionService
|
|||||||
int noAuditQue(List<String> quIds);
|
int noAuditQue(List<String> quIds);
|
||||||
|
|
||||||
|
|
||||||
|
List<TenantVo> getSchoolNameNaPage();
|
||||||
}
|
}
|
||||||
|
@@ -107,6 +107,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
FROM system_tenant
|
FROM system_tenant
|
||||||
WHERE deleted = 0
|
WHERE deleted = 0
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectExamQuestionCountByQuId" resultType="java.lang.Integer">
|
||||||
|
select count(*) from exam_question where qu_id=#{quId}
|
||||||
|
</select>
|
||||||
|
<select id="getSchoolNameNaPage" resultMap="TenantVoResult">
|
||||||
|
SELECT id, name, queue_name
|
||||||
|
FROM system_tenant
|
||||||
|
WHERE deleted = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<insert id="insertExamQuestion" parameterType="ExamQuestion">
|
<insert id="insertExamQuestion" parameterType="ExamQuestion">
|
||||||
@@ -227,6 +235,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateExamQuestionByIds">
|
||||||
|
UPDATE exam_question
|
||||||
|
SET updater = #{updater},
|
||||||
|
update_time = now()
|
||||||
|
WHERE qu_id IN
|
||||||
|
<foreach collection="quIds" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@@ -16,10 +16,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
create_teacher = VALUES(create_teacher),
|
create_teacher = VALUES(create_teacher),
|
||||||
type = VALUES(type),
|
type = VALUES(type),
|
||||||
create_time=now()
|
create_time=now()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</insert>
|
</insert>
|
||||||
<select id="selectSchoolName" resultType="java.lang.String">
|
<select id="selectSchoolName" resultType="java.lang.String">
|
||||||
select name from system_tenant where id =#{source}
|
select name from system_tenant where id =#{source}
|
||||||
|
Reference in New Issue
Block a user