Commit d66a7d2d by 吕明尚

Merge branch 'dev' into test

parents 19579016 89f6b378
...@@ -651,7 +651,8 @@ public class RedisTask { ...@@ -651,7 +651,8 @@ public class RedisTask {
public void AutoEquityFundExcess() { public void AutoEquityFundExcess() {
logger.debug("AutoEquityFundExcess:权益金增加开始"); logger.debug("AutoEquityFundExcess:权益金增加开始");
List<EquityFundExcess> list = equityFundExcessService.list(new LambdaQueryWrapper<EquityFundExcess>() List<EquityFundExcess> list = equityFundExcessService.list(new LambdaQueryWrapper<EquityFundExcess>()
.le(EquityFundExcess::getExpireTime, new Date())); .le(EquityFundExcess::getExpireTime, new Date())
.eq(EquityFundExcess::getRebateType,YesNoEnum.no.getIndex()));
if (CollectionUtil.isEmpty(list)) { if (CollectionUtil.isEmpty(list)) {
return; return;
} }
...@@ -665,6 +666,7 @@ public class RedisTask { ...@@ -665,6 +666,7 @@ public class RedisTask {
list.stream().forEach(item->{ list.stream().forEach(item->{
ConsumerWallet consumerWallet = consumerWalletMap.get(item.getUid()); ConsumerWallet consumerWallet = consumerWalletMap.get(item.getUid());
consumerWallet.setEquityFund(consumerWallet.getEquityFund().add(item.getEquityFund())); consumerWallet.setEquityFund(consumerWallet.getEquityFund().add(item.getEquityFund()));
consumerWallet.setAccumulateEquityFund(consumerWallet.getAccumulateEquityFund().add(item.getEquityFund()));
consumerWalletList.add(consumerWallet); consumerWalletList.add(consumerWallet);
EquityFundLog equityFundLog = new EquityFundLog(); EquityFundLog equityFundLog = new EquityFundLog();
...@@ -676,7 +678,7 @@ public class RedisTask { ...@@ -676,7 +678,7 @@ public class RedisTask {
equityFundLog.setCreateTime(new Date()); equityFundLog.setCreateTime(new Date());
equityFundLogList.add(equityFundLog); equityFundLogList.add(equityFundLog);
item.setIsDelete(YesNoEnum.yes.getIndex()); // item.setIsDelete(YesNoEnum.yes.getIndex());
item.setRebateType(YesNoEnum.yes.getIndex()); item.setRebateType(YesNoEnum.yes.getIndex());
ids.add(item); ids.add(item);
}); });
......
...@@ -321,11 +321,11 @@ public class EquityFundExcessServiceImpl extends ServiceImpl<EquityFundExcessMap ...@@ -321,11 +321,11 @@ public class EquityFundExcessServiceImpl extends ServiceImpl<EquityFundExcessMap
// BigDecimal addEquityFund = new BigDecimal(99).multiply(new BigDecimal(equityFund)).setScale(2, RoundingMode.HALF_UP); // BigDecimal addEquityFund = new BigDecimal(99).multiply(new BigDecimal(equityFund)).setScale(2, RoundingMode.HALF_UP);
// BigDecimal aEquityFund = ObjectUtil.isNotEmpty(consumerWallet.getEquityFund()) ? consumerWallet.getEquityFund() : BigDecimal.ZERO; // BigDecimal aEquityFund = ObjectUtil.isNotEmpty(consumerWallet.getEquityFund()) ? consumerWallet.getEquityFund() : BigDecimal.ZERO;
// consumerWallet.setEquityFund(aEquityFund.add(addEquityFund)); // consumerWallet.setEquityFund(aEquityFund.add(addEquityFund));
BigDecimal accumulateEquityFund = ObjectUtil.isNotEmpty(consumerWallet.getAccumulateEquityFund()) ? consumerWallet.getAccumulateEquityFund() : BigDecimal.ZERO; // BigDecimal accumulateEquityFund = ObjectUtil.isNotEmpty(consumerWallet.getAccumulateEquityFund()) ? consumerWallet.getAccumulateEquityFund() : BigDecimal.ZERO;
consumerWallet.setAccumulateEquityFund(accumulateEquityFund. // consumerWallet.setAccumulateEquityFund(accumulateEquityFund.
add(addEquityFund)); // add(addEquityFund));
consumerWallet.setUpdateTime(DateUtils.getNowDate()); // consumerWallet.setUpdateTime(DateUtils.getNowDate());
consumerWalletService.updateConsumerWallet(consumerWallet); // consumerWalletService.updateConsumerWallet(consumerWallet);
//添加临时权益金日志记录 //添加临时权益金日志记录
String equityFundExc = sysConfigService.selectConfigByKey("sys.equityFundExcess.equityFundExcess"); String equityFundExc = sysConfigService.selectConfigByKey("sys.equityFundExcess.equityFundExcess");
EquityFundExcess equityFundExcess = new EquityFundExcess(); EquityFundExcess equityFundExcess = new EquityFundExcess();
......
...@@ -369,7 +369,7 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer ...@@ -369,7 +369,7 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
.ne(ConsumerMember::getConsumerId, sConsumer.getNewId())); .ne(ConsumerMember::getConsumerId, sConsumer.getNewId()));
List<SConsumer> userMap = sConsumerService.list(uSConsumer); List<SConsumer> userMap = sConsumerService.list(uSConsumer);
int start = (sConsumer.getPageNum() - 1) * sConsumer.getPageSize(); int start = (sConsumer.getPageNum() - 1) * sConsumer.getPageSize();
int end = Math.min(start + sConsumer.getPageSize(), userMap.size()); int end = Math.min(start + sConsumer.getPageSize(), count - 1);
List<SConsumer> pagedList = userMap.subList(start, end); List<SConsumer> pagedList = userMap.subList(start, end);
TableDataInfo tableDataInfo = new TableDataInfo(); TableDataInfo tableDataInfo = new TableDataInfo();
tableDataInfo.setRows(pagedList); tableDataInfo.setRows(pagedList);
......
...@@ -499,11 +499,10 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -499,11 +499,10 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
.eq(EquityFundExcess::getOutTradeNo,sOrder.getOrderNo()) .eq(EquityFundExcess::getOutTradeNo,sOrder.getOrderNo())
.eq(EquityFundExcess::getRebateType,YesNoEnum.no.getIndex())); .eq(EquityFundExcess::getRebateType,YesNoEnum.no.getIndex()));
if (ObjectUtil.isNotEmpty(equityFundExcess)){ if (ObjectUtil.isNotEmpty(equityFundExcess)){
ConsumerWallet aConsumerWallet = consumerWalletService.getOne(new LambdaQueryWrapper<ConsumerWallet>() // ConsumerWallet aConsumerWallet = consumerWalletService.getOne(new LambdaQueryWrapper<ConsumerWallet>()
.eq(ConsumerWallet::getConsumerId,sharingActivities.getUid())); // .eq(ConsumerWallet::getConsumerId,sharingActivities.getUid()));
aConsumerWallet.setEquityFund(aConsumerWallet.getEquityFund().subtract(equityFundExcess.getEquityFund())); // aConsumerWallet.setAccumulateEquityFund(aConsumerWallet.getAccumulateEquityFund().subtract(equityFundExcess.getEquityFund()));
aConsumerWallet.setAccumulateEquityFund(aConsumerWallet.getAccumulateEquityFund().subtract(equityFundExcess.getEquityFund())); // consumerWalletService.updateConsumerWallet(aConsumerWallet);
consumerWalletService.updateConsumerWallet(aConsumerWallet);
equityFundExcessService.removeById(equityFundExcess.getId()); equityFundExcessService.removeById(equityFundExcess.getId());
} }
} }
......
...@@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectEquityFundExcessList" parameterType="EquityFundExcess" resultMap="EquityFundExcessResult"> <select id="selectEquityFundExcessList" parameterType="EquityFundExcess" resultMap="EquityFundExcessResult">
<include refid="selectEquityFundExcessVo"/> <include refid="selectEquityFundExcessVo"/>
where is_delete = 0 where 1=1
<if test="equityFund != null "> and equity_fund = #{equityFund}</if> <if test="equityFund != null "> and equity_fund = #{equityFund}</if>
<if test="outTradeNo != null and outTradeNo != ''"> and out_trade_no like concat('%', #{outTradeNo}, '%')</if> <if test="outTradeNo != null and outTradeNo != ''"> and out_trade_no like concat('%', #{outTradeNo}, '%')</if>
<if test="startDate != null"> <if test="startDate != null">
......
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