Commit 196e8c29 authored by licc's avatar licc

修改方案上传 不是文化类,无最低位次

parent 078b4ae0
package cn.wisenergy.service.common;
import cn.wisenergy.common.utils.R;
import cn.wisenergy.common.utils.StringUtil;
import cn.wisenergy.mapper.*;
import cn.wisenergy.model.app.*;
import cn.wisenergy.model.enums.CardStatus;
......@@ -15,7 +14,6 @@ import cn.wisenergy.service.app.UserVolunteerService;
import cn.wisenergy.service.app.VolunteerService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
......@@ -107,10 +105,7 @@ public class VolunteerManager {
userLimitRecord.setUserId(userLimit.getUserId());
int record = userLimitRecordMapper.add(userLimitRecord);
if (record == 0) {
return false;
}
return true;
return record != 0;
}
/**
......@@ -147,9 +142,7 @@ public class VolunteerManager {
payRecord.setType(addLimitVo.getPayType());
payRecord.setUserId(addLimitVo.getUserId());
int pay = payRecordMapper.add(payRecord);
if (pay == 0) {
return false;
}
return pay != 0;
} else {
//1、更新用户查询次数信息
int limit = userLimitMapper.edit(userLimit);
......@@ -169,18 +162,15 @@ public class VolunteerManager {
QueryWrapper<PayRecord> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("trade_no", payRecord.getTradeNo());
PayRecord byTradeNo = payRecordMapper.selectOne(queryWrapper);
int pay = 0;
int pay;
if (null != byTradeNo) {
pay = payRecordMapper.updateById(payRecord);
} else {
pay = payRecordMapper.add(payRecord);
}
if (pay == 0) {
return false;
}
return pay != 0;
}
return true;
}
/**
......@@ -257,7 +247,6 @@ public class VolunteerManager {
}
schemeQueryRecord.setScore(scoreInfo.getCultureGrade().toString());
List<Integer> ids = list.stream().map(Volunteer::getId).collect(Collectors.toList());
//保存方案查询记录
int count = schemeRecordMapper.add(schemeQueryRecord);
if (count == 0) {
......@@ -303,9 +292,7 @@ public class VolunteerManager {
//flag =2 编辑
if (null != flag && flag == 2) {
int edit = scoreInfoMapper.edit(scoreInfo);
if (edit == 0) {
return false;
}
return edit != 0;
}
return true;
}
......@@ -356,10 +343,7 @@ public class VolunteerManager {
int add = staffUserVipMapper.add(staffUserVip);
//判断数据是否添加成功
if (add == 0) {
return false;
}
return true;
return add != 0;
}
/**
......@@ -379,11 +363,7 @@ public class VolunteerManager {
//2、保存用户成绩信息
int save = scoreInfoMapper.edit(scoreInfo);
if (save == 0) {
return false;
}
return true;
return save != 0;
}
/**
......@@ -434,11 +414,7 @@ public class VolunteerManager {
//更行志愿状态为删除
int count = volunteerMapper.updateBySchemeId(schemeId);
if (size != count) {
return false;
}
return true;
return size == count;
}
/**
......
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