|
@@ -1,7 +1,9 @@
|
|
|
package com.sqx.modules.pay.service.impl;
|
|
package com.sqx.modules.pay.service.impl;
|
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.sqx.common.constant.RedisKey;
|
|
import com.sqx.common.constant.RedisKey;
|
|
@@ -19,7 +21,9 @@ import com.sqx.modules.app.service.UserMoneyDetailsService;
|
|
|
import com.sqx.modules.app.service.UserService;
|
|
import com.sqx.modules.app.service.UserService;
|
|
|
import com.sqx.modules.common.entity.CommonInfo;
|
|
import com.sqx.modules.common.entity.CommonInfo;
|
|
|
import com.sqx.modules.common.service.CommonInfoService;
|
|
import com.sqx.modules.common.service.CommonInfoService;
|
|
|
|
|
+import com.sqx.modules.datacentre.entity.RiderBankCardInfo;
|
|
|
import com.sqx.modules.datacentre.query.DataCenterQuery;
|
|
import com.sqx.modules.datacentre.query.DataCenterQuery;
|
|
|
|
|
+import com.sqx.modules.datacentre.service.RiderBankCardInfoService;
|
|
|
import com.sqx.modules.errand.dao.ErrandComplaintDao;
|
|
import com.sqx.modules.errand.dao.ErrandComplaintDao;
|
|
|
import com.sqx.modules.errand.dao.TbIndentDao;
|
|
import com.sqx.modules.errand.dao.TbIndentDao;
|
|
|
import com.sqx.modules.errand.entity.ErrandComplaint;
|
|
import com.sqx.modules.errand.entity.ErrandComplaint;
|
|
@@ -101,7 +105,8 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|
|
private ShopBankCardInfoService shopBankCardInfoService;
|
|
private ShopBankCardInfoService shopBankCardInfoService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private RedissonClient redissonClient;
|
|
private RedissonClient redissonClient;
|
|
|
-
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private RiderBankCardInfoService riderBankCardInfoService;
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -392,6 +397,17 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|
|
|
|
|
|
|
// 用户提现
|
|
// 用户提现
|
|
|
if (type == 1) {
|
|
if (type == 1) {
|
|
|
|
|
+// 骑手银行卡信息
|
|
|
|
|
+ LambdaQueryWrapper<RiderBankCardInfo> wrapper=new LambdaQueryWrapper<>();
|
|
|
|
|
+ wrapper.eq(RiderBankCardInfo::getUserId,userId);
|
|
|
|
|
+ RiderBankCardInfo riderBankCardInfo = riderBankCardInfoService.getOne(wrapper);
|
|
|
|
|
+ if (ObjectUtils.isEmpty(riderBankCardInfo)) {
|
|
|
|
|
+ throw new SqxException("银行卡信息不存在,请联系客服人员添加");
|
|
|
|
|
+ }
|
|
|
|
|
+ cashOut.setBankRealName(riderBankCardInfo.getRealName());
|
|
|
|
|
+ cashOut.setOpenBank(riderBankCardInfo.getOpenBank());
|
|
|
|
|
+ cashOut.setBankCardNo(riderBankCardInfo.getCardNo());
|
|
|
|
|
+
|
|
|
//用户提现手续费
|
|
//用户提现手续费
|
|
|
CommonInfo one1 = commonInfoService.findOne(114);
|
|
CommonInfo one1 = commonInfoService.findOne(114);
|
|
|
Double value = Double.valueOf(one1.getValue());
|
|
Double value = Double.valueOf(one1.getValue());
|
|
@@ -403,6 +419,18 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|
|
}
|
|
}
|
|
|
// 骑手提现
|
|
// 骑手提现
|
|
|
else if(type == 3){
|
|
else if(type == 3){
|
|
|
|
|
+// 骑手银行卡信息
|
|
|
|
|
+ LambdaQueryWrapper<RiderBankCardInfo> wrapper=new LambdaQueryWrapper<>();
|
|
|
|
|
+ wrapper.eq(RiderBankCardInfo::getUserId,userId);
|
|
|
|
|
+ RiderBankCardInfo riderBankCardInfo = riderBankCardInfoService.getOne(wrapper);
|
|
|
|
|
+ if (ObjectUtils.isEmpty(riderBankCardInfo)) {
|
|
|
|
|
+ throw new SqxException("银行卡信息不存在,请联系客服人员添加");
|
|
|
|
|
+ }
|
|
|
|
|
+ cashOut.setBankRealName(riderBankCardInfo.getRealName());
|
|
|
|
|
+ cashOut.setOpenBank(riderBankCardInfo.getOpenBank());
|
|
|
|
|
+ cashOut.setBankCardNo(riderBankCardInfo.getCardNo());
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
//骑手提现手续费
|
|
//骑手提现手续费
|
|
|
CommonInfo one1 = commonInfoService.findOne(114);
|
|
CommonInfo one1 = commonInfoService.findOne(114);
|
|
|
Double value = Double.valueOf(one1.getValue());
|
|
Double value = Double.valueOf(one1.getValue());
|