| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.study.domain.TIntegralRecord; |
| | | import com.ruoyi.study.mapper.TIntegralRecordMapper; |
| | | import com.ruoyi.study.service.ITIntegralRecordService; |
| | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean add(String integral, String method) { |
| | | public Boolean add(String integral, String method, Integer gameId, Integer storyId) { |
| | | TIntegralRecord integralRecord = new TIntegralRecord(); |
| | | integralRecord.setIntegral(integral); |
| | | integralRecord.setMethod(method); |
| | | integralRecord.setUserId(tokenService.getLoginUserStudy().getUserid()); |
| | | integralRecord.setGameId(gameId); |
| | | integralRecord.setStoryId(storyId); |
| | | return this.save(integralRecord); |
| | | } |
| | | } |