Commit 6af7b2a7 by 吕明尚

时长日志增加时长类型

parent 5d247ea5
......@@ -161,6 +161,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
durationLog.setOperationTime(new Date());
durationLog.setCreateTime(new Date());
durationLog.setOperationType(YesNoEnum.yes.getIndex());
durationLog.setDurationType(DurationTypeEnum.RECHARGE.getCode());
durationLogService.save(durationLog);
}
if (consumerWallet.getRemainingIntegral().compareTo(new BigDecimal(0)) > 0) {
......@@ -253,6 +254,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
durationLog.setVariableDuration(consumerWallet.getRemainingDuration().subtract(oldDuration));
durationLog.setOperationTime(new Date());
durationLog.setOperationType(YesNoEnum.yes.getIndex());
durationLog.setDurationType(DurationTypeEnum.RECHARGE.getCode());
durationLog.setCreateTime(new Date());
durationLogService.save(durationLog);
logger.debug("新增时长日志");
......
package share.system.service.impl;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import share.common.core.page.TableDataInfo;
import share.common.core.redis.RedisUtil;
import share.common.enums.*;
import share.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import share.system.domain.*;
import share.system.domain.vo.EquityFundExcessVo;
import share.system.domain.vo.EquityFundLogVo;
import share.system.mapper.EquityFundExcessMapper;
import share.system.mapper.SConsumerMapper;
import share.system.service.*;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* 权益金过度Service业务层处理
*
......@@ -291,6 +289,7 @@ public class EquityFundExcessServiceImpl extends ServiceImpl<EquityFundExcessMap
newDurationLog.setVariableDuration(anHour);
newDurationLog.setCurrentDuration(consumerWallet.getRemainingDuration());
newDurationLog.setOperationType(YesNoEnum.yes.getIndex());
newDurationLog.setDurationType(DurationTypeEnum.SHARE.getCode());
newDurationLog.setOperationTime(DateUtils.getNowDate());
durationLogService.insertDurationLog(newDurationLog);
}
......
......@@ -1101,6 +1101,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
durationLog.setVariableDuration(sOrder.getDuration());
durationLog.setCurrentDuration(consumerWallet.getRemainingDuration());
durationLog.setOperationType(YesNoEnum.no.getIndex());
durationLog.setDurationType(DurationTypeEnum.ORDER.getCode());
durationLog.setOperationTime(new Date());
durationLog.setCreateTime(new Date());
durationLogService.save(durationLog);
......@@ -1252,6 +1253,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
durationLog.setVariableDuration(sOrder.getDuration());
durationLog.setCurrentDuration(consumerWallet.getRemainingDuration());
durationLog.setOperationType(YesNoEnum.yes.getIndex());
durationLog.setDurationType(DurationTypeEnum.ORDER_REFUND.getCode());
durationLog.setOperationTime(new Date());
durationLog.setCreateTime(new Date());
durationLogService.save(durationLog);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment