无关风月
2024-07-02 fb9f95e888411a348652f4bd210bd998fee01afd
ruoyi-service/ruoyi-study/src/main/java/com/ruoyi/study/service/impl/TIntegralRecordServiceImpl.java
@@ -4,7 +4,6 @@
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;
@@ -34,11 +33,15 @@
    @Override
    @Transactional(rollbackFor = Exception.class)
    public Boolean add(String integral, String method) {
    public Boolean add(String integral, String method, Integer gameId, Integer storyId, Integer difficulty, Integer storyType) {
        TIntegralRecord integralRecord = new TIntegralRecord();
        integralRecord.setIntegral(integral);
        integralRecord.setMethod(method);
        integralRecord.setUserId(tokenService.getLoginUserStudy().getUserid());
        integralRecord.setGameId(gameId);
        integralRecord.setStoryId(storyId);
        integralRecord.setGameDifficulty(difficulty);
        integralRecord.setStoryType(storyType);
        return this.save(integralRecord);
    }
}