Compare commits
No commits in common. "447cd262adc40fb42477d85059346a8a9dfeb62d" and "fca80acccb3d58ba13b02a5c0a5b7d74034040ae" have entirely different histories.
447cd262ad
...
fca80acccb
|
@ -93,7 +93,16 @@ public class AliPayController extends BaseController {
|
||||||
String state = ShareCodeUtils.idToCode(SecurityUtils.getUserId()); // 防止CSRF攻击
|
String state = ShareCodeUtils.idToCode(SecurityUtils.getUserId()); // 防止CSRF攻击
|
||||||
|
|
||||||
String encodedRedirectUri = URLEncoder.encode(bindUrl, "UTF-8");
|
String encodedRedirectUri = URLEncoder.encode(bindUrl, "UTF-8");
|
||||||
String authUrl = String.format(aliConfig.getOauthUrl(),appId, scope, encodedRedirectUri, state);
|
// 线上
|
||||||
|
// String authUrl = String.format(
|
||||||
|
// "https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=%s&scope=%s&redirect_uri=%s&state=%s",
|
||||||
|
// appId, scope, encodedRedirectUri, state
|
||||||
|
// );
|
||||||
|
// 沙箱
|
||||||
|
String authUrl = String.format(
|
||||||
|
"https://openauth-sandbox.dl.alipaydev.com/oauth2/publicAppAuthorize.htm?app_id=%s&scope=%s&redirect_uri=%s&state=%s",
|
||||||
|
appId, scope, encodedRedirectUri, state
|
||||||
|
);
|
||||||
|
|
||||||
// QrCodeUtil.generate(authUrl, 300, 300, "png", response.getOutputStream());
|
// QrCodeUtil.generate(authUrl, 300, 300, "png", response.getOutputStream());
|
||||||
return R.ok(authUrl, "成功");
|
return R.ok(authUrl, "成功");
|
||||||
|
@ -206,7 +215,7 @@ public class AliPayController extends BaseController {
|
||||||
return R.fail(HttpStatus.SHOW_ERROR_MSG,"提现金额最小为0.1");
|
return R.fail(HttpStatus.SHOW_ERROR_MSG,"提现金额最小为0.1");
|
||||||
}
|
}
|
||||||
|
|
||||||
return aliPayService.fetch(amount);
|
return aliPayService.fetch(amount.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -161,10 +161,6 @@ mall:
|
||||||
gatewayUrl: https://openapi-sandbox.dl.alipaydev.com/gateway.do
|
gatewayUrl: https://openapi-sandbox.dl.alipaydev.com/gateway.do
|
||||||
# 绑定回调
|
# 绑定回调
|
||||||
bindUrl: http://113.45.190.154:8080/ali/pay/callback
|
bindUrl: http://113.45.190.154:8080/ali/pay/callback
|
||||||
# 参与方的标识类型,目前支持如下类型: 1、ALIPAY_USER_ID 支付宝的会员ID 2、ALIPAY_LOGON_ID:支付宝登录号,支持邮箱和手机号格式 3、ALIPAY_OPEN_ID:支付宝openid
|
|
||||||
identityType: ALIPAY_USER_ID
|
|
||||||
# 授权url
|
|
||||||
oauthUrl: https://openauth-sandbox.dl.alipaydev.com/oauth2/publicAppAuthorize.htm?app_id=%s&scope=%s&redirect_uri=%s&state=%s
|
|
||||||
|
|
||||||
huawei:
|
huawei:
|
||||||
obs:
|
obs:
|
||||||
|
|
|
@ -148,10 +148,6 @@ mall:
|
||||||
gatewayUrl: https://openapi.alipay.com/gateway.do
|
gatewayUrl: https://openapi.alipay.com/gateway.do
|
||||||
# 绑定回调
|
# 绑定回调
|
||||||
bindUrl: https://36072a51.r27.cpolar.top/ali/pay/callback
|
bindUrl: https://36072a51.r27.cpolar.top/ali/pay/callback
|
||||||
# 参与方的标识类型,目前支持如下类型: 1、ALIPAY_USER_ID 支付宝的会员ID 2、ALIPAY_LOGON_ID:支付宝登录号,支持邮箱和手机号格式 3、ALIPAY_OPEN_ID:支付宝openid
|
|
||||||
identityType: ALIPAY_OPEN_ID
|
|
||||||
# 授权url
|
|
||||||
oauthUrl: https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=%s&scope=%s&redirect_uri=%s&state=%s
|
|
||||||
|
|
||||||
huawei:
|
huawei:
|
||||||
obs:
|
obs:
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.mcwl.common.enums;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author:ChenYan
|
||||||
|
* @Project:McWl
|
||||||
|
* @Package:com.mcwl.pay.domain
|
||||||
|
* @Filename:PaymentStatus
|
||||||
|
* @Description TODO
|
||||||
|
* @Date:2025/1/3 17:24
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public enum CommissionRationEnum {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 佣金配给邀请者用户
|
||||||
|
*/
|
||||||
|
COMMISSION_RATION_INVITER_USER("CommissionRationInviterUser"),
|
||||||
|
/**
|
||||||
|
* 佣金配给商家用户
|
||||||
|
*/
|
||||||
|
COMMISSION_RATION_MERCHANT("CommissionRationMerchant");
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
}
|
|
@ -2,13 +2,11 @@ package com.mcwl.myInvitation.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.mcwl.common.core.redis.RedisCache;
|
|
||||||
import com.mcwl.myInvitation.domain.CommissionRatio;
|
import com.mcwl.myInvitation.domain.CommissionRatio;
|
||||||
import com.mcwl.myInvitation.domain.vo.CommissionRatioVo;
|
import com.mcwl.myInvitation.domain.vo.CommissionRatioVo;
|
||||||
import com.mcwl.myInvitation.mapper.CommissionRatioMapper;
|
import com.mcwl.myInvitation.mapper.CommissionRatioMapper;
|
||||||
import com.mcwl.myInvitation.service.CommissionRatioService;
|
import com.mcwl.myInvitation.service.CommissionRatioService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -22,8 +20,6 @@ import java.util.Objects;
|
||||||
public class CommissionRatioServiceImpl extends ServiceImpl<CommissionRatioMapper, CommissionRatio> implements CommissionRatioService {
|
public class CommissionRatioServiceImpl extends ServiceImpl<CommissionRatioMapper, CommissionRatio> implements CommissionRatioService {
|
||||||
|
|
||||||
|
|
||||||
private final RedisCache redisCache;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<CommissionRatioVo> ratioList() {
|
public List<CommissionRatioVo> ratioList() {
|
||||||
List<CommissionRatio> list = baseMapper.selectList(null);
|
List<CommissionRatio> list = baseMapper.selectList(null);
|
||||||
|
@ -45,10 +41,7 @@ public class CommissionRatioServiceImpl extends ServiceImpl<CommissionRatioMappe
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
commissionRatio.setRatio(ratio);
|
commissionRatio.setRatio(ratio);
|
||||||
baseMapper.updateById(commissionRatio);
|
baseMapper.insert(commissionRatio);
|
||||||
|
|
||||||
redisCache.deleteObject("CommissionRationInviterUser");
|
|
||||||
redisCache.deleteObject("CommissionRationMerchant");
|
|
||||||
|
|
||||||
return this.getCommissionRatioVo(commissionRatio);
|
return this.getCommissionRatioVo(commissionRatio);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,8 +30,4 @@ public class AliConfig {
|
||||||
private String gatewayUrl;
|
private String gatewayUrl;
|
||||||
@Value("${mall.mgt.aliPayConfig.notifyUrl}")
|
@Value("${mall.mgt.aliPayConfig.notifyUrl}")
|
||||||
private String notifyUrl;
|
private String notifyUrl;
|
||||||
@Value("${mall.mgt.aliPayConfig.identityType}")
|
|
||||||
private String identityType;
|
|
||||||
@Value("${mall.mgt.aliPayConfig.oauthUrl}")
|
|
||||||
private String oauthUrl;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@ package com.mcwl.pay.service.impl;
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.lang.UUID;
|
import cn.hutool.core.lang.UUID;
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import cn.hutool.extra.mail.MailUtil;
|
import cn.hutool.extra.mail.MailUtil;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
@ -48,7 +47,6 @@ import com.mcwl.system.service.ISysUserPayAccountService;
|
||||||
import com.mcwl.system.service.ISysUserService;
|
import com.mcwl.system.service.ISysUserService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
@ -129,13 +127,13 @@ public class AliPayServiceImpl implements AliPayService {
|
||||||
Long productId = orderTradeDto.getProductId();
|
Long productId = orderTradeDto.getProductId();
|
||||||
|
|
||||||
if (!Optional.ofNullable(productId).isPresent()) {
|
if (!Optional.ofNullable(productId).isPresent()) {
|
||||||
throw new ServiceException("memberLevelId不能为空", HttpStatus.SHOW_ERROR_MSG);
|
throw new ServiceException("memberLevelId不能为空");
|
||||||
}
|
}
|
||||||
|
|
||||||
MemberLevel memberLevel = memberLevelService.getById(productId);
|
MemberLevel memberLevel = memberLevelService.getById(productId);
|
||||||
|
|
||||||
if (!Optional.ofNullable(memberLevel).isPresent()) {
|
if (!Optional.ofNullable(memberLevel).isPresent()) {
|
||||||
throw new ServiceException("memberLevel不存在", HttpStatus.SHOW_ERROR_MSG);
|
throw new ServiceException("memberLevel不存在");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置orderTrade信息
|
// 设置orderTrade信息
|
||||||
|
@ -286,16 +284,7 @@ public class AliPayServiceImpl implements AliPayService {
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public R<String> fetch(String amount) throws AlipayApiException, FileNotFoundException {
|
public R<String> fetch(String amount) throws AlipayApiException, FileNotFoundException {
|
||||||
String lock = redisCache.getCacheObject("alipay:fetch:user:" + SecurityUtils.getUserId());
|
|
||||||
if (!StrUtil.isEmpty(lock)) {
|
|
||||||
return R.fail(HttpStatus.SHOW_ERROR_MSG, "请勿频繁点击");
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
redisCache.setCacheObject("alipay:fetch:user:" + SecurityUtils.getUserId(), "1");
|
|
||||||
|
|
||||||
Long userId = SecurityUtils.getUserId();
|
Long userId = SecurityUtils.getUserId();
|
||||||
|
|
||||||
|
|
||||||
SysUser sysUser = sysUserService.selectUserById(userId);
|
SysUser sysUser = sysUserService.selectUserById(userId);
|
||||||
if (sysUser.getWallet() < Double.parseDouble(amount)) {
|
if (sysUser.getWallet() < Double.parseDouble(amount)) {
|
||||||
return R.fail(HttpStatus.SHOW_ERROR_MSG,"钱包余额不足");
|
return R.fail(HttpStatus.SHOW_ERROR_MSG,"钱包余额不足");
|
||||||
|
@ -335,8 +324,9 @@ public class AliPayServiceImpl implements AliPayService {
|
||||||
// 收款方信息
|
// 收款方信息
|
||||||
Participant payeeInfo = new Participant();
|
Participant payeeInfo = new Participant();
|
||||||
|
|
||||||
|
// 线上环境
|
||||||
payeeInfo.setIdentity(sysUserPayAccount.getOpenId());
|
payeeInfo.setIdentity(sysUserPayAccount.getOpenId());
|
||||||
payeeInfo.setIdentityType(aliConfig.getIdentityType());
|
payeeInfo.setIdentityType("ALIPAY_OPEN_ID");
|
||||||
model.setPayeeInfo(payeeInfo);
|
model.setPayeeInfo(payeeInfo);
|
||||||
|
|
||||||
request.setBizModel(model);
|
request.setBizModel(model);
|
||||||
|
@ -359,14 +349,10 @@ public class AliPayServiceImpl implements AliPayService {
|
||||||
|
|
||||||
String content = String.format("账户余额不足:用户%s提现%s", sysUser.getNickName(), amount);
|
String content = String.format("账户余额不足:用户%s提现%s", sysUser.getNickName(), amount);
|
||||||
MailUtil.send(tos, "魔创未来", content, false);
|
MailUtil.send(tos, "魔创未来", content, false);
|
||||||
throw new ServiceException("网络连接出错,请稍后再试", HttpStatus.SHOW_ERROR_MSG);
|
throw new ServiceException("网络连接出错,请稍后再试");
|
||||||
}
|
}
|
||||||
System.out.println("用户" + SecurityUtils.getLoginUser().getUser().getNickName() + "提现失败:" + response.getSubMsg());
|
System.out.println("用户" + SecurityUtils.getLoginUser().getUser().getNickName() + "提现失败:" + response.getSubMsg());
|
||||||
throw new ServiceException("提现失败", HttpStatus.SHOW_ERROR_MSG);
|
throw new ServiceException("提现失败");
|
||||||
} finally {
|
|
||||||
redisCache.deleteObject("alipay:fetch:user:" + SecurityUtils.getUserId());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -454,7 +440,6 @@ public class AliPayServiceImpl implements AliPayService {
|
||||||
if (response.isSuccess()) {
|
if (response.isSuccess()) {
|
||||||
// 支付宝用户唯一ID
|
// 支付宝用户唯一ID
|
||||||
String openId = response.getOpenId();
|
String openId = response.getOpenId();
|
||||||
String uid = response.getUserId();
|
|
||||||
// 判断是否已经绑定过
|
// 判断是否已经绑定过
|
||||||
SysUserPayAccount sysUserPayAccount = sysUserPayAccountService.lambdaQuery()
|
SysUserPayAccount sysUserPayAccount = sysUserPayAccountService.lambdaQuery()
|
||||||
.eq(SysUserPayAccount::getUserId, userId)
|
.eq(SysUserPayAccount::getUserId, userId)
|
||||||
|
@ -465,12 +450,12 @@ public class AliPayServiceImpl implements AliPayService {
|
||||||
// 已经绑定过,直接返回
|
// 已经绑定过,直接返回
|
||||||
return "success";
|
return "success";
|
||||||
}
|
}
|
||||||
System.out.println("绑定成功!openId/uid:" + openId);
|
System.out.println("绑定成功!openId:" + openId);
|
||||||
// 将openId与当前商城用户绑定(保存到数据库)
|
// 将openId与当前商城用户绑定(保存到数据库)
|
||||||
SysUserPayAccount userPayAccount = new SysUserPayAccount();
|
SysUserPayAccount userPayAccount = new SysUserPayAccount();
|
||||||
userPayAccount.setUserId(userId);
|
userPayAccount.setUserId(userId);
|
||||||
userPayAccount.setAppId(aliConfig.getAppId());
|
userPayAccount.setAppId(aliConfig.getAppId());
|
||||||
userPayAccount.setOpenId(StrUtil.isEmpty(openId) ? uid : openId);
|
userPayAccount.setOpenId(openId);
|
||||||
userPayAccount.setType(0);
|
userPayAccount.setType(0);
|
||||||
sysUserPayAccountService.save(userPayAccount);
|
sysUserPayAccountService.save(userPayAccount);
|
||||||
redisCache.setCacheObject("alipay:bind:user:status:" + userId, "1", 4, TimeUnit.SECONDS);
|
redisCache.setCacheObject("alipay:bind:user:status:" + userId, "1", 4, TimeUnit.SECONDS);
|
||||||
|
@ -542,7 +527,6 @@ public class AliPayServiceImpl implements AliPayService {
|
||||||
sysUserPayAccountLog.setUserId(sysUser.getUserId());
|
sysUserPayAccountLog.setUserId(sysUser.getUserId());
|
||||||
sysUserPayAccountLog.setAmount(Double.valueOf(amount));
|
sysUserPayAccountLog.setAmount(Double.valueOf(amount));
|
||||||
sysUserPayAccountLog.setAccount("支付宝");
|
sysUserPayAccountLog.setAccount("支付宝");
|
||||||
sysUserPayAccountLog.setWallet(sysUser.getWallet());
|
|
||||||
sysUserPayAccountLogService.save(sysUserPayAccountLog);
|
sysUserPayAccountLogService.save(sysUserPayAccountLog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
@ -115,19 +114,6 @@ public class OrderTradeServiceImpl extends ServiceImpl<OrderTradeMapper, OrderTr
|
||||||
.expireAfterAccess(3, TimeUnit.MINUTES)
|
.expireAfterAccess(3, TimeUnit.MINUTES)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
@PostConstruct
|
|
||||||
public void init() {
|
|
||||||
CommissionRatio commissionRatio1 = commissionRatioService.lambdaQuery()
|
|
||||||
.eq(CommissionRatio::getType, 0)
|
|
||||||
.one();
|
|
||||||
CommissionRatio commissionRatio2 = commissionRatioService.lambdaQuery()
|
|
||||||
.eq(CommissionRatio::getType, 1)
|
|
||||||
.one();
|
|
||||||
redisCache.setCacheObject(CommissionRationEnum.COMMISSION_RATION_INVITER_USER.getName(), commissionRatio1.getRatio().toString());
|
|
||||||
redisCache.setCacheObject(CommissionRationEnum.COMMISSION_RATION_MERCHANT.getName(), commissionRatio2.getRatio().toString());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void productHandler(ProductRes productRes) {
|
public void productHandler(ProductRes productRes) {
|
||||||
|
@ -690,7 +676,6 @@ public class OrderTradeServiceImpl extends ServiceImpl<OrderTradeMapper, OrderTr
|
||||||
.eq(CommissionRatio::getType, 1)
|
.eq(CommissionRatio::getType, 1)
|
||||||
.one();
|
.one();
|
||||||
CommissionRationMerchant = commissionRatio.getRatio().toString();
|
CommissionRationMerchant = commissionRatio.getRatio().toString();
|
||||||
redisCache.setCacheObject(CommissionRationEnum.COMMISSION_RATION_MERCHANT.getName(), CommissionRationMerchant);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 佣金配给邀请者用户比例
|
// 佣金配给邀请者用户比例
|
||||||
|
@ -700,7 +685,6 @@ public class OrderTradeServiceImpl extends ServiceImpl<OrderTradeMapper, OrderTr
|
||||||
.eq(CommissionRatio::getType, 0)
|
.eq(CommissionRatio::getType, 0)
|
||||||
.one();
|
.one();
|
||||||
commissionRationInviterUser = commissionRatio.getRatio().toString();
|
commissionRationInviterUser = commissionRatio.getRatio().toString();
|
||||||
redisCache.setCacheObject(CommissionRationEnum.COMMISSION_RATION_INVITER_USER.getName(), commissionRationInviterUser);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Double rationMerchant = redisCache.getCacheObject(CommissionRationMerchant);
|
Double rationMerchant = redisCache.getCacheObject(CommissionRationMerchant);
|
||||||
|
|
|
@ -61,7 +61,6 @@
|
||||||
sys_user u ON mil.user_id = u.user_id
|
sys_user u ON mil.user_id = u.user_id
|
||||||
WHERE
|
WHERE
|
||||||
mil.user_id = #{userId}
|
mil.user_id = #{userId}
|
||||||
and mil.del_flag = '0' and mi.del_flag = '0' and u.del_flag = '0'
|
|
||||||
ORDER BY
|
ORDER BY
|
||||||
<choose>
|
<choose>
|
||||||
<when test="orderByColumn == 'create_time'">
|
<when test="orderByColumn == 'create_time'">
|
||||||
|
|
|
@ -132,7 +132,6 @@
|
||||||
ON ml.user_id = u.user_id
|
ON ml.user_id = u.user_id
|
||||||
WHERE
|
WHERE
|
||||||
ml.user_id = #{userId}
|
ml.user_id = #{userId}
|
||||||
and ml.del_flag = '0' and m.del_flag = '0' and u.del_flag = '0'
|
|
||||||
ORDER BY
|
ORDER BY
|
||||||
<choose>
|
<choose>
|
||||||
<when test="orderByColumn == 'create_time'">
|
<when test="orderByColumn == 'create_time'">
|
||||||
|
|
|
@ -88,7 +88,6 @@
|
||||||
ON wfl.user_id = u.user_id
|
ON wfl.user_id = u.user_id
|
||||||
WHERE
|
WHERE
|
||||||
wfl.user_id = #{userId}
|
wfl.user_id = #{userId}
|
||||||
and wfl.del_flag = '0' and wf.del_flag = '0' and u.del_flag = '0'
|
|
||||||
ORDER BY
|
ORDER BY
|
||||||
<choose>
|
<choose>
|
||||||
<when test="orderByColumn == 'create_time'">
|
<when test="orderByColumn == 'create_time'">
|
||||||
|
|
|
@ -28,9 +28,5 @@ public class SysUserPayAccountLog extends BaseEntity {
|
||||||
* 提现账户
|
* 提现账户
|
||||||
*/
|
*/
|
||||||
private String account;
|
private String account;
|
||||||
/**
|
|
||||||
* 剩余金币
|
|
||||||
*/
|
|
||||||
private Double wallet;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,8 +41,7 @@ public class SysUserPayAccountLogServiceImpl extends ServiceImpl<SysUserPayAccou
|
||||||
|
|
||||||
baseMapper.selectPage(page, new LambdaQueryWrapper<SysUserPayAccountLog>()
|
baseMapper.selectPage(page, new LambdaQueryWrapper<SysUserPayAccountLog>()
|
||||||
.select(SysUserPayAccountLog::getAmount, SysUserPayAccountLog::getAccount, SysUserPayAccountLog::getCreateTime)
|
.select(SysUserPayAccountLog::getAmount, SysUserPayAccountLog::getAccount, SysUserPayAccountLog::getCreateTime)
|
||||||
.eq(SysUserPayAccountLog::getUserId, userId)
|
.eq(SysUserPayAccountLog::getUserId, userId));
|
||||||
.orderByDesc(SysUserPayAccountLog::getCreateTime));
|
|
||||||
|
|
||||||
TableDataInfo rspData = new TableDataInfo();
|
TableDataInfo rspData = new TableDataInfo();
|
||||||
rspData.setCode(HttpStatus.SUCCESS);
|
rspData.setCode(HttpStatus.SUCCESS);
|
||||||
|
|
Loading…
Reference in New Issue