关闭 提现
This commit is contained in:
@@ -1472,7 +1472,7 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void firstBindAwardsMoney(UserEntity entity) {
|
||||
reentrantReadWriteLock.writeLock().lock();
|
||||
// reentrantReadWriteLock.writeLock().lock();
|
||||
try {
|
||||
CommonInfo one = commonRepository.findOne(920);
|
||||
BigDecimal money = new BigDecimal(one.getValue());
|
||||
@@ -1489,17 +1489,17 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
||||
userMoneyDetails.setCreateTime(DateUtil.format(new Date(System.currentTimeMillis() - 1000), "yyyy-MM-dd HH:mm:ss"));
|
||||
userMoneyDetails.setMoneyType(1);
|
||||
boolean ret = userMoneyDetailsService.save(userMoneyDetails);
|
||||
if (ret) {
|
||||
ThreadUtil.execAsync(()->{
|
||||
discSpinningService.withdrawAsync(entity, money.doubleValue(), "[提现]");
|
||||
},true);
|
||||
}
|
||||
// if (ret) {
|
||||
// ThreadUtil.execAsync(()->{
|
||||
// discSpinningService.withdrawAsync(entity, money.doubleValue(), "[提现]");
|
||||
// },true);
|
||||
// }
|
||||
} catch (Exception e) {
|
||||
log.error("首绑支付宝发放奖励异常,用户信息:{}", JSONUtil.toJsonStr(entity));
|
||||
log.error("首绑支付宝发放奖励异常:", e);
|
||||
throw new RuntimeException("首绑奖励失败");
|
||||
} finally {
|
||||
reentrantReadWriteLock.writeLock().unlock();
|
||||
// reentrantReadWriteLock.writeLock().unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,10 +95,10 @@ public class DiscSpinningServiceImpl extends ServiceImpl<DiscSpinningDao, DiscSp
|
||||
userMoneyService.updateAmount(1, receive.getUserId(), receive.getNumber().doubleValue());
|
||||
|
||||
|
||||
if (receive.getNumber().compareTo(new BigDecimal("0.1")) > 0 && StringUtils.isNotBlank(userInfo.getZhiFuBao()) && StringUtils.isNotBlank(userInfo.getZhiFuBaoName())) {
|
||||
//提现
|
||||
withdraw(userInfo, receive.getNumber().doubleValue());
|
||||
}
|
||||
// if (receive.getNumber().compareTo(new BigDecimal("0.1")) > 0 && StringUtils.isNotBlank(userInfo.getZhiFuBao()) && StringUtils.isNotBlank(userInfo.getZhiFuBaoName())) {
|
||||
// //提现
|
||||
// withdraw(userInfo, receive.getNumber().doubleValue());
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.sqx.modules.pay.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.sqx.common.utils.PageUtils;
|
||||
@@ -15,6 +16,7 @@ import com.sqx.modules.app.service.UserMoneyService;
|
||||
import com.sqx.modules.app.service.UserService;
|
||||
import com.sqx.modules.common.entity.CommonInfo;
|
||||
import com.sqx.modules.common.service.CommonInfoService;
|
||||
import com.sqx.modules.course.entity.CourseCollect;
|
||||
import com.sqx.modules.invite.entity.InviteMoney;
|
||||
import com.sqx.modules.invite.service.InviteMoneyService;
|
||||
import com.sqx.modules.message.dao.MessageInfoDao;
|
||||
@@ -427,7 +429,7 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
||||
alipayName = sysUserEntity.getZhiFuBaoName();
|
||||
} else {
|
||||
UserEntity userInfo = userService.queryByUserId(userId);
|
||||
if(userInfo.getStatus().equals(0)){
|
||||
if (userInfo.getStatus().equals(0)) {
|
||||
return Result.error(9999, "账号不存在!");
|
||||
}
|
||||
if (StringUtils.isBlank(userInfo.getZhiFuBao()) || StringUtils.isBlank(userInfo.getZhiFuBaoName())) {
|
||||
@@ -482,15 +484,16 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
||||
if (userMoney.getAmount().doubleValue() < money) {
|
||||
return Result.success("可提现余额不足!");
|
||||
}
|
||||
BaseResp baseResp = WuyouPay.extractOrder(outOrderNo, cashOut.getMoney(), cashOut.getZhifubao(), cashOut.getZhifubaoName());
|
||||
if (baseResp.getStatus() != null && (baseResp.getStatus().equals(2) || baseResp.getStatus().equals(10000))){
|
||||
userMoneyDetails.setContent("成功提现:" + money);
|
||||
cashOut.setState(1);
|
||||
}
|
||||
|
||||
if (baseResp.getErrorMsg() != null) {
|
||||
return Result.error(baseResp.getErrorMsg());
|
||||
}
|
||||
// BaseResp baseResp = WuyouPay.extractOrder(outOrderNo, cashOut.getMoney(), cashOut.getZhifubao(), cashOut.getZhifubaoName());
|
||||
// if (baseResp.getStatus() != null && (baseResp.getStatus().equals(2) || baseResp.getStatus().equals(10000))){
|
||||
// userMoneyDetails.setContent("成功提现:" + money);
|
||||
// cashOut.setState(1);
|
||||
// }
|
||||
//
|
||||
// if (baseResp.getErrorMsg() != null) {
|
||||
// return Result.error(baseResp.getErrorMsg());
|
||||
// }
|
||||
|
||||
userMoneyDetailsService.save(userMoneyDetails);
|
||||
baseMapper.insert(cashOut);
|
||||
|
||||
Reference in New Issue
Block a user