|
|
|
@ -2,12 +2,10 @@ package org.jeecg.modules.applet.service.impl; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import lombok.extern.log4j.Log4j2; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.jeecg.common.api.IAppletUserService; |
|
|
|
import org.jeecg.common.api.vo.Result; |
|
|
|
import org.jeecg.common.exception.JeecgBootException; |
|
|
|
import org.jeecg.common.system.util.AppletUserUtil; |
|
|
|
import org.jeecg.common.system.vo.AppletUser; |
|
|
|
@ -17,19 +15,15 @@ import org.jeecg.modules.applet.entity.StatisticsVo; |
|
|
|
import org.jeecg.modules.applet.service.AppletApiWaterService; |
|
|
|
import org.jeecg.modules.common.IdUtils; |
|
|
|
import org.jeecg.modules.common.wxUtils.WxHttpUtils; |
|
|
|
import org.jeecg.modules.common.wxUtils.transfer.TransferToUser; |
|
|
|
import org.jeecg.modules.common.wxUtils.transfer.WXPayUtility; |
|
|
|
import org.jeecg.modules.demo.appletConfig.service.IAppletConfigService; |
|
|
|
import org.jeecg.modules.demo.appletWater.entity.AppletWater; |
|
|
|
import org.jeecg.modules.demo.appletWater.service.IAppletWaterService; |
|
|
|
import org.jeecg.modules.demo.appletWithdrawal.entity.AppletWithdrawal; |
|
|
|
import org.jeecg.modules.demo.appletWithdrawal.service.IAppletWithdrawalService; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.http.HttpEntity; |
|
|
|
import org.springframework.http.HttpMethod; |
|
|
|
import org.springframework.http.ResponseEntity; |
|
|
|
import org.springframework.scheduling.annotation.Async; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.util.LinkedMultiValueMap; |
|
|
|
import org.springframework.util.MultiValueMap; |
|
|
|
@ -300,11 +294,14 @@ public class AppletApiWaterServiceImpl implements AppletApiWaterService { |
|
|
|
|
|
|
|
Page<AppletWater> page = appletWaterService.lambdaQuery() |
|
|
|
.eq(AppletWater::getUser, userId) |
|
|
|
.orderByDesc(AppletWater::getCreateTime) |
|
|
|
.page(waterPage); |
|
|
|
|
|
|
|
for (AppletWater record : page.getRecords()) { |
|
|
|
record.setUserInfo(appletUserService.getById(record.getUser())); |
|
|
|
record.setWithdrawal(appletWithdrawalService.list().get(0)); |
|
|
|
record.setWithdrawal(appletWithdrawalService.lambdaQuery() |
|
|
|
.eq(AppletWithdrawal::getWaterId, record.getId()) |
|
|
|
.one()); |
|
|
|
} |
|
|
|
|
|
|
|
return page; |
|
|
|
@ -348,7 +345,7 @@ public class AppletApiWaterServiceImpl implements AppletApiWaterService { |
|
|
|
|
|
|
|
//添加流水记录 |
|
|
|
AppletWater water = AppletWater.builder() |
|
|
|
.user(appletWithdrawal.getUserId()) |
|
|
|
.user(currentUser.getId()) |
|
|
|
.money((appletWithdrawal.getMoney())) |
|
|
|
.number(IdUtils.generateNoLS()) |
|
|
|
.oldMoney(currentUser.getCommission()) |
|
|
|
|