|
@@ -34,11 +34,15 @@ public class PersonScoreServiceImpl extends ServiceImpl<PersonScoreMapper, Perso
|
|
@Override
|
|
@Override
|
|
public HttpRespMsg addOrUpdate(PersonScore personScore) {
|
|
public HttpRespMsg addOrUpdate(PersonScore personScore) {
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
|
|
+ Integer personScoreInit = 0;
|
|
if (personScore.getId() == null) {
|
|
if (personScore.getId() == null) {
|
|
//添加操作
|
|
//添加操作
|
|
personScoreMapper.insert(personScore);
|
|
personScoreMapper.insert(personScore);
|
|
|
|
+ Score score = new Score();
|
|
|
|
+ score.setScoreId(personScore.getScoreId());
|
|
|
|
+ score.setPersonalScore(personScoreInit+personScore.getCan()+personScore.getDiligence()+personScore.getVirtue()+personScore.getPerformance());
|
|
|
|
+ scoreMapper.update(score,new QueryWrapper<Score>().eq("score_id",personScore.getScoreId()));
|
|
}else{
|
|
}else{
|
|
- Integer personScoreInit = 0;
|
|
|
|
personScoreMapper.updateById(personScore);
|
|
personScoreMapper.updateById(personScore);
|
|
Score score = new Score();
|
|
Score score = new Score();
|
|
score.setScoreId(personScore.getScoreId());
|
|
score.setScoreId(personScore.getScoreId());
|