Commit 03a0d007 authored by cy's avatar cy

vip用户方案查询,客户端方案修改

parent f6cc3205
......@@ -562,4 +562,17 @@ public class StringUtil {
}
return result;
}
public static List<String> strToArrayStr(String s) {
if (StringUtils.isEmpty(s)) {
return new ArrayList<>();
}
List<String> result = new ArrayList<>();
String[] str = s.split(",");
for (String string : str) {
result.add(string);
}
return result;
}
}
......@@ -199,10 +199,15 @@
<if test="total != null">
and lowest_mark=#{total}
</if>
<if test="local != null">
and nature LIKE CONCAT('%',#{local},'%')
<if test="locals != null and (locals.size)>0">
and
<foreach collection="locals" index="index" item="local" separator="or" open="(" close=")">
nature LIKE CONCAT('%',#{local},'%')
</foreach>
</if>
<if test="professionNames != null">
<if test="professionNames != null and (professionNames.size)>0">
and
<foreach collection="professionNames" index="index" item="id" separator="or" open="(" close=")">
major_name LIKE CONCAT('%',#{id},'%')
......
......@@ -124,6 +124,12 @@ public class SchemeRecordServiceImpl extends ServiceImpl<SchemeRecordMapper, Sch
volunteer.setQueryTime(schemeQueryRecord.getCreateTime());
}
result.sort(Comparator.comparing(Volunteer::getLowestMark).reversed());
//最低位次为空,则用--代替
for(Volunteer info : result){
if(info.getLowestRank() == null){
info.setLowestRank("--");
}
}
return R.ok(result);
}
......@@ -169,6 +175,11 @@ public class SchemeRecordServiceImpl extends ServiceImpl<SchemeRecordMapper, Sch
List<Integer> ids = list.stream().map(UserVolunteer::getVolunteerId).collect(Collectors.toList());
List<Volunteer> result = volunteerMapper.getListByIds(ids);
for(Volunteer info :result){
if(null == info.getLowestRank()){
info.setLowestRank("0");
}
}
result.sort(Comparator.comparing(Volunteer::getLowestMark).reversed());
//调用工具生成PDF
try {
......
......@@ -115,7 +115,6 @@ public class SendSmsSerViceImpl implements SendSmsSerVice {
public R<Boolean> valid(String phone, String code, Integer type, String source) {
String value = SceneType.getNameByCode(type);
//获取短信验证码key
//String key = CachePrefix.SMS_CODE.getPrefix() + value + "_" + source + "_" + phone;
String key = CachePrefix.SMS_CODE.getPrefix() + "_" + source + "_" + phone;
//判断缓存是否过期
long time = redisService.getExpire(key);
......
......@@ -56,9 +56,6 @@ public class VolunteerListener extends AnalysisEventListener<Volunteer> {
if (StringUtils.isEmpty(volunteer.getAcademy())) {
throw new RuntimeException("院校不能为空!");
}
if (StringUtils.isBlank(volunteer.getLowestRank())) {
volunteer.setLowestRank("--");
}
if (StringUtils.isEmpty(volunteer.getCourseDemand())) {
throw new RuntimeException("选考科目要求不能为空!");
......
......@@ -386,10 +386,7 @@ public class VolunteerManager {
for (Volunteer volunteer : list) {
volunteer.setSchemeId(schemeInfo.getId());
volunteer.setType(schemeInfo.getType());
if (!SchemeTypeEnums.UNDERGRADUATE_CULTURE.getCode().equals(volunteer.getType()) ||
!SchemeTypeEnums.JUNIOR_COLLEGE_MAJOR.getCode().equals(volunteer.getType())) {
volunteer.setLowestRank(null);
}
}
boolean bool = volunteerService.saveBatch(list);
if (!bool) {
......
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