|
@@ -887,21 +887,22 @@ public class WorkServiceImpl extends ServiceImpl<WorkDao, WorkEntity> implements
|
|
|
workStu.setCancelTime(DateFormatUtils.format(now, "yyyy-MM-dd HH:mm:ss"));
|
|
workStu.setCancelTime(DateFormatUtils.format(now, "yyyy-MM-dd HH:mm:ss"));
|
|
|
workStuDao.updateById(workStu);
|
|
workStuDao.updateById(workStu);
|
|
|
|
|
|
|
|
- //退还积分
|
|
|
|
|
- ScoreStu scoreStu = scoreStuService.getOneByStuIdActId(stuId, workId);
|
|
|
|
|
- //退还积分记录
|
|
|
|
|
- ScoreStu add = new ScoreStu();
|
|
|
|
|
- add.setDay(DateForStr.getInfoDateStr(new Date()));
|
|
|
|
|
- add.setStuId(stuId);
|
|
|
|
|
- add.setScoreType(ScoreType.STORE_SCORE.getCode());
|
|
|
|
|
- add.setTaskId(TaskType.WORK_CANCEL.getCode());
|
|
|
|
|
- add.setBusinessId(workId);
|
|
|
|
|
- add.setScoreEvent(TaskType.WORK_CANCEL.getInfo());
|
|
|
|
|
- add.setScoreValue(Math.abs(scoreStu.getScoreValue()));
|
|
|
|
|
- add.setCreateTime(new Date());
|
|
|
|
|
- add.setSurplusScore(Math.abs(scoreStu.getScoreValue())+ this.scoreStuService.getTotalScore(stuId));
|
|
|
|
|
- scoreStuMapper.insert(add);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ //如果是小程序报名退还积分
|
|
|
|
|
+ if (workStu.getFromTo().equals("1")){
|
|
|
|
|
+ ScoreStu scoreStu = scoreStuService.getOneByStuIdActId(stuId, workId);
|
|
|
|
|
+ //退还积分记录
|
|
|
|
|
+ ScoreStu add = new ScoreStu();
|
|
|
|
|
+ add.setDay(DateForStr.getInfoDateStr(new Date()));
|
|
|
|
|
+ add.setStuId(stuId);
|
|
|
|
|
+ add.setScoreType(ScoreType.STORE_SCORE.getCode());
|
|
|
|
|
+ add.setTaskId(TaskType.WORK_CANCEL.getCode());
|
|
|
|
|
+ add.setBusinessId(workId);
|
|
|
|
|
+ add.setScoreEvent(TaskType.WORK_CANCEL.getInfo());
|
|
|
|
|
+ add.setScoreValue(Math.abs(scoreStu.getScoreValue()));
|
|
|
|
|
+ add.setCreateTime(new Date());
|
|
|
|
|
+ add.setSurplusScore(Math.abs(scoreStu.getScoreValue())+ this.scoreStuService.getTotalScore(stuId));
|
|
|
|
|
+ scoreStuMapper.insert(add);
|
|
|
|
|
+ }
|
|
|
/*MemberInfoEntity member = memberInfoDao.selectById(stuId);
|
|
/*MemberInfoEntity member = memberInfoDao.selectById(stuId);
|
|
|
member.setFreezeTime(DateFormatUtils.format(now,"yyyy-MM-dd HH:mm:ss"));
|
|
member.setFreezeTime(DateFormatUtils.format(now,"yyyy-MM-dd HH:mm:ss"));
|
|
|
memberInfoDao.updateById(member);*/
|
|
memberInfoDao.updateById(member);*/
|