| | |
| | | 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.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; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TIntegralRecordServiceImpl extends ServiceImpl<TIntegralRecordMapper, TIntegralRecord> implements ITIntegralRecordService { |
| | | |
| | | @Resource |
| | | private TokenService tokenService; |
| | | |
| | | @Override |
| | | public IPage<TIntegralRecord> integralDetail(Page<TIntegralRecord> page, Long userId, String time) { |
| | | public IPage<TIntegralRecord> integralDetail(Page<TIntegralRecord> page, Integer userId, String time) { |
| | | return baseMapper.integralDetail(userId, time, page); |
| | | } |
| | | |
| | |
| | | TIntegralRecord integralRecord = new TIntegralRecord(); |
| | | integralRecord.setIntegral(integral); |
| | | integralRecord.setMethod(method); |
| | | integralRecord.setUserId(SecurityUtils.getUserId().intValue()); |
| | | integralRecord.setUserId(tokenService.getLoginUserStudy().getUserid()); |
| | | return this.save(integralRecord); |
| | | } |
| | | } |