修改bug

master
xiaoCJ 8 months ago
parent 4802bced5a
commit e4f0d58bbc

@ -571,8 +571,10 @@ public class ObjectiveApi {
@AnonymousAccess @AnonymousAccess
@ApiOperation("获取所选客观题数量及分数") @ApiOperation("获取所选客观题数量及分数")
@PostMapping("getChooseObjCountAndSorce") @PostMapping("getChooseObjCountAndSorce")
private Map<Integer, BigDecimal> getChooseObjCountAndSorce(@RequestParam List<String> objectIdList) { private Map<String, BigDecimal> getChooseObjCountAndSorce(@RequestBody List<String> objectIdList) {
return sysObjectiveQuestionMapper.getChooseObjCountAndSorce(objectIdList);
Map<String, BigDecimal> chooseObjCountAndSorce = sysObjectiveQuestionMapper.getChooseObjCountAndSorce(objectIdList);
return chooseObjCountAndSorce;
} }

@ -54,7 +54,7 @@ public interface SysObjectiveQuestionsMapper {
void batchDelete(@Param("list") List<String> ids); void batchDelete(@Param("list") List<String> ids);
Map<Integer, BigDecimal> getChooseObjCountAndSorce(@Param("list") List<String> objectIdList); Map<String, BigDecimal> getChooseObjCountAndSorce(@Param("list") List<String> objectIdList);
List<SysObjectiveQuestionsDto> selectObjByType(@Param("type") String type,@Param("schoolId") String schoolId); List<SysObjectiveQuestionsDto> selectObjByType(@Param("type") String type,@Param("schoolId") String schoolId);
} }

@ -477,8 +477,8 @@
</foreach> </foreach>
</delete> </delete>
<select id="selectByList" parameterType="java.util.List" resultType="java.util.Map"> <select id="getChooseObjCountAndSorce" parameterType="java.util.List" resultType="java.util.Map">
SELECT count(*),sum(score)FROM sys_objective_question SELECT count(*),sum(score)FROM sys_objective_questions
WHERE objective_id IN WHERE objective_id IN
<foreach collection="list" separator="," item="id" open="(" close=")"> <foreach collection="list" separator="," item="id" open="(" close=")">
#{id} #{id}
@ -496,5 +496,4 @@
and s.is_delete = FALSE and s.is_delete = FALSE
and s.type = #{type} and s.type = #{type}
</select> </select>
</mapper> </mapper>
Loading…
Cancel
Save