处理钱包日志bug

This commit is contained in:
TinyAnts 2023-04-03 16:32:30 +08:00
parent e88f113183
commit 36bb1f7b7d
3 changed files with 7 additions and 4 deletions

View File

@ -2,6 +2,7 @@ package com.mdd.front.controller;
import com.mdd.common.core.AjaxResult; import com.mdd.common.core.AjaxResult;
import com.mdd.common.core.PageResult; import com.mdd.common.core.PageResult;
import com.mdd.front.LikeFrontThreadLocal;
import com.mdd.front.service.ILogsService; import com.mdd.front.service.ILogsService;
import com.mdd.front.validate.common.PageValidate; import com.mdd.front.validate.common.PageValidate;
import com.mdd.front.vo.RechargeRecordVo; import com.mdd.front.vo.RechargeRecordVo;
@ -28,7 +29,9 @@ public class LogsController {
public AjaxResult<Object> userMoney(@Validated PageValidate pageValidate, public AjaxResult<Object> userMoney(@Validated PageValidate pageValidate,
@RequestParam(defaultValue = "0") Integer type) { @RequestParam(defaultValue = "0") Integer type) {
PageResult<RechargeRecordVo> list = iLogsService.userMoney(pageValidate, type); Integer userId = LikeFrontThreadLocal.getUserId();
PageResult<RechargeRecordVo> list = iLogsService.userMoney(pageValidate, userId, type);
return AjaxResult.success(list); return AjaxResult.success(list);
} }

View File

@ -9,6 +9,6 @@ import com.mdd.front.vo.RechargeRecordVo;
*/ */
public interface ILogsService { public interface ILogsService {
PageResult<RechargeRecordVo> userMoney(PageValidate pageValidate, Integer type); PageResult<RechargeRecordVo> userMoney(PageValidate pageValidate, Integer userId, Integer type);
} }

View File

@ -24,7 +24,7 @@ public class LogsServiceImpl implements ILogsService {
LogMoneyMapper logMoneyMapper; LogMoneyMapper logMoneyMapper;
@Override @Override
public PageResult<RechargeRecordVo> userMoney(PageValidate pageValidate, Integer type) { public PageResult<RechargeRecordVo> userMoney(PageValidate pageValidate, Integer userId, Integer type) {
Integer pageNo = pageValidate.getPageNo(); Integer pageNo = pageValidate.getPageNo();
Integer pageSize = pageValidate.getPageSize(); Integer pageSize = pageValidate.getPageSize();
@ -44,7 +44,7 @@ public class LogsServiceImpl implements ILogsService {
vo.setAction(logMoney.getAction()); vo.setAction(logMoney.getAction());
vo.setOrderAmount(logMoney.getChangeAmount()); vo.setOrderAmount(logMoney.getChangeAmount());
vo.setTips(LogMoneyEnum.getMsgByCode(logMoney.getChangeType())); vo.setTips(LogMoneyEnum.getMsgByCode(logMoney.getChangeType()));
vo.setCreateTime(TimeUtils.timestampToDate(vo.getCreateTime())); vo.setCreateTime(TimeUtils.timestampToDate(logMoney.getCreateTime()));
list.add(vo); list.add(vo);
} }