| | |
| | | package com.ruoyi.study.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.study.domain.TGameRecord; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.study.domain.TIntegralRecord; |
| | | import com.ruoyi.study.mapper.TGameRecordMapper; |
| | | import com.ruoyi.study.mapper.TIntegralRecordMapper; |
| | | import com.ruoyi.study.service.ITGameRecordService; |
| | | import com.ruoyi.study.service.ITIntegralRecordService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TIntegralRecordServiceImpl extends ServiceImpl<TIntegralRecordMapper, TIntegralRecord> implements ITIntegralRecordService { |
| | | |
| | | @Override |
| | | public IPage<TIntegralRecord> integralDetail(Page<TIntegralRecord> page, Long userId, String time) { |
| | | return baseMapper.integralDetail(userId, time, page); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean add(String integral, String method) { |
| | | TIntegralRecord integralRecord = new TIntegralRecord(); |
| | | integralRecord.setIntegral(integral); |
| | | integralRecord.setMethod(method); |
| | | integralRecord.setUserId(SecurityUtils.getUserId().intValue()); |
| | | return this.save(integralRecord); |
| | | } |
| | | } |