|
@@ -11,6 +11,7 @@ import com.ipaynow.jiaxin.response.ReceiptlDownloadResponse;
|
|
|
import com.ydtech.core.page.HttpResult;
|
|
import com.ydtech.core.page.HttpResult;
|
|
|
import com.ydtech.exception.SystemException;
|
|
import com.ydtech.exception.SystemException;
|
|
|
import com.ydtech.modules.admin.constants.ManagementSource;
|
|
import com.ydtech.modules.admin.constants.ManagementSource;
|
|
|
|
|
+import com.ydtech.modules.admin.constants.SwitchConfig;
|
|
|
import com.ydtech.modules.admin.dao.SysAmountAuditingMapper;
|
|
import com.ydtech.modules.admin.dao.SysAmountAuditingMapper;
|
|
|
import com.ydtech.modules.admin.dao.SysUserAccountHistoryMapper;
|
|
import com.ydtech.modules.admin.dao.SysUserAccountHistoryMapper;
|
|
|
import com.ydtech.modules.admin.dao.SysUserBankCardMapper;
|
|
import com.ydtech.modules.admin.dao.SysUserBankCardMapper;
|
|
@@ -154,13 +155,30 @@ public class TtqfServiceImpl implements TtqfService {
|
|
|
SysAmountAuditingVo amountAuditingVo = new SysAmountAuditingVo();
|
|
SysAmountAuditingVo amountAuditingVo = new SysAmountAuditingVo();
|
|
|
amountAuditingVo.setAmount(noticeEntity.getAmount());
|
|
amountAuditingVo.setAmount(noticeEntity.getAmount());
|
|
|
amountAuditingVo.setUserId(ttqfLog.getUserId());
|
|
amountAuditingVo.setUserId(ttqfLog.getUserId());
|
|
|
- writeRecord(amountAuditingVo,ttqfLog.getSysAmountAuditingId(),noticeEntity.getFeeAmount());
|
|
|
|
|
|
|
+ pushLg(ttqfLog);
|
|
|
|
|
+ //writeRecord(amountAuditingVo,ttqfLog.getSysAmountAuditingId(),noticeEntity.getFeeAmount());
|
|
|
}
|
|
}
|
|
|
log.info("接收打款通知回调 + paymentNotice ================={}", parse);
|
|
log.info("接收打款通知回调 + paymentNotice ================={}", parse);
|
|
|
return TtqfResponse.ok();
|
|
return TtqfResponse.ok();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ public void pushLg(PayTtqfLog ttqfLog){
|
|
|
|
|
+ SysUser sysUser = userService.getById(ttqfLog.getUserId());
|
|
|
|
|
+ PushLgEntity lgEntity = new PushLgEntity();
|
|
|
|
|
+ lgEntity.setApplicationTime(new Date());
|
|
|
|
|
+ lgEntity.setBusinessUmber(ttqfLog.getSysAmountAuditingId());
|
|
|
|
|
+ lgEntity.setPayee(sysUser.getName());
|
|
|
|
|
+ lgEntity.setPayeeId(ttqfLog.getUserId());
|
|
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(ttqfLog.getRequestData());
|
|
|
|
|
+ lgEntity.setReceivingAccount(String.valueOf(jsonObject.get("userBankCardNo")));
|
|
|
|
|
+ lgEntity.setExtractMoney(ttqfLog.getAmount());
|
|
|
|
|
+ lgEntity.setServiceCharge(new BigDecimal(ttqfLog.getFeeAmount()));
|
|
|
|
|
+ lgEntity.setExtractStatus("4");
|
|
|
|
|
+ pushLgEntityService.sendLgData(lgEntity);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
public void writeRecord(SysAmountAuditingVo sysAmountAuditingVo,String id,BigDecimal feeAmount){
|
|
public void writeRecord(SysAmountAuditingVo sysAmountAuditingVo,String id,BigDecimal feeAmount){
|
|
|
SysAmountAuditingEntity sysAmountAuditingEntity = sysAmountAuditingService.getById(id);
|
|
SysAmountAuditingEntity sysAmountAuditingEntity = sysAmountAuditingService.getById(id);
|
|
|
if (ObjectUtils.isEmpty(sysAmountAuditingEntity)){
|
|
if (ObjectUtils.isEmpty(sysAmountAuditingEntity)){
|
|
@@ -226,10 +244,13 @@ public class TtqfServiceImpl implements TtqfService {
|
|
|
public HttpResult queryPressing(UserWithdrawal withdrawal) {
|
|
public HttpResult queryPressing(UserWithdrawal withdrawal) {
|
|
|
//不是个代走线上提现
|
|
//不是个代走线上提现
|
|
|
//提现控制(线上或线下)关闭走线上
|
|
//提现控制(线上或线下)关闭走线上
|
|
|
- if (isManagement(BaseController.getUser().getId()) || !sysSwitchConfigService.getBalanceExtractStatus()){
|
|
|
|
|
|
|
+// if (isManagement(BaseController.getUser().getId()) || !sysSwitchConfigService.getBalanceExtractStatus()){
|
|
|
|
|
+// return HttpResult.ok(WithdrawalFRes.builder().bizCode("0").msg("").url("").build());
|
|
|
|
|
+// }
|
|
|
|
|
+ SysUser sysUser = SpringUtil.getBean(SysUserBankCardMapper.class).selectByIdPay(withdrawal.getUserId());
|
|
|
|
|
+ if (!sysSwitchConfigService.isEnabled(SwitchConfig.VIRTUAL_WITHDRAWAL.getCode()) && !sysUser.isInternalId()){
|
|
|
return HttpResult.ok(WithdrawalFRes.builder().bizCode("0").msg("").url("").build());
|
|
return HttpResult.ok(WithdrawalFRes.builder().bizCode("0").msg("").url("").build());
|
|
|
}
|
|
}
|
|
|
- SysUser sysUser = SpringUtil.getBean(SysUserBankCardMapper.class).selectByIdPay(withdrawal.getUserId());
|
|
|
|
|
if (Objects.isNull(sysUser)){
|
|
if (Objects.isNull(sysUser)){
|
|
|
return HttpResult.error("用户不存在,请检查");
|
|
return HttpResult.error("用户不存在,请检查");
|
|
|
}
|
|
}
|
|
@@ -320,7 +341,7 @@ public class TtqfServiceImpl implements TtqfService {
|
|
|
return HttpResult.ok(balance);
|
|
return HttpResult.ok(balance);
|
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
|
log.error("提现申请提交失败{}",e.getMessage());
|
|
log.error("提现申请提交失败{}",e.getMessage());
|
|
|
- throw new RuntimeException("提现申请提交失败");
|
|
|
|
|
|
|
+ return HttpResult.error("提现申请提交失败:" + e.getMessage());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|