Commit 99f1ee24 authored by licc's avatar licc

x修改成绩编辑

parent fc31e30d
...@@ -55,6 +55,22 @@ ...@@ -55,6 +55,22 @@
update_time =now() update_time =now()
</sql> </sql>
<sql id="updateCondition2">
user_id = #{userId},
culture_grade =#{cultureGrade},
major_grade =#{majorGrade},
language_grade =#{languageGrade},
math_grade =#{mathGrade},
english_grade =#{englishGrade},
physics_grade = #{physicsGrade},
chemistry_grade = #{chemistryGrade},
biology_grade = #{biologyGrade},
history_grade = #{historyGrade},
geography_grade = #{geographyGrade},
politics_grade = #{politicsGrade},
update_time =now()
</sql>
<sql id="criteria"> <sql id="criteria">
<if test="id != null">id = #{id}</if> <if test="id != null">id = #{id}</if>
<if test="userId != null">and user_id = #{userId}</if> <if test="userId != null">and user_id = #{userId}</if>
...@@ -86,7 +102,7 @@ ...@@ -86,7 +102,7 @@
UPDATE UPDATE
<include refid="table"/> <include refid="table"/>
<set> <set>
<include refid="updateCondition"/> <include refid="updateCondition2"/>
</set> </set>
<where> <where>
id = #{id} id = #{id}
......
...@@ -247,16 +247,16 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp ...@@ -247,16 +247,16 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp
} }
//6保存用户方案记录、志愿之间的关联关系,扣减查询次数 //6保存用户方案记录、志愿之间的关联关系,扣减查询次数
R<Integer> bool = volunteerManager.saveUserVolunteer(user, list, scoreInfo, queryVo.getBigMajorNames()); // R<Integer> bool = volunteerManager.saveUserVolunteer(user, list, scoreInfo, queryVo.getBigMajorNames());
if (null != bool && bool.getCode() == 500) { // if (null != bool && bool.getCode() == 500) {
return R.error(bool.getMessage()); // return R.error(bool.getMessage());
} // }
//排序 //排序
list.sort(Comparator.comparing(Volunteer::getLowestMark).reversed()); list.sort(Comparator.comparing(Volunteer::getLowestMark).reversed());
volunteerVo.setUserId(user.getId()); volunteerVo.setUserId(user.getId());
assert bool != null; // assert bool != null;
volunteerVo.setRecordId(bool.getData()); // volunteerVo.setRecordId(bool.getData());
volunteerVo.setVolunteers(list); volunteerVo.setVolunteers(list);
volunteerVo.setTotal(list.size()); volunteerVo.setTotal(list.size());
return R.ok(volunteerVo); return R.ok(volunteerVo);
......
Markdown is supported
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