|
@@ -366,21 +366,6 @@ public class DistributorRechargeServiceImpl implements DistributorRechargeServic
|
|
|
try{
|
|
try{
|
|
|
if (rechargeReqDTO.getStoreId() != null){
|
|
if (rechargeReqDTO.getStoreId() != null){
|
|
|
isShareBalance.set(true);
|
|
isShareBalance.set(true);
|
|
|
-// StoreReqDTO reqDTO = this.convertStorePlatBalance(rechargeReqDTO.getStoreId(), tradeMode, money, Long.parseLong(rechargeReqDTO.getOrderId()), tradeType, null);
|
|
|
|
|
-// TenantUtils.execute(distributor.getAccountTenantId(), () -> {
|
|
|
|
|
-// StoreInfoReqDTO storeData = storeApi.getStoreById(rechargeReqDTO.getStoreId()).getCheckedData();
|
|
|
|
|
-// Asserts.isTrue(!ObjectUtil.equals(storeData.getBalanceType(), StoreBalanceTypeEnum.FORBIDDEN.getType()), "当前门店禁止使用预付款");
|
|
|
|
|
-// if(ObjectUtil.equals(storeData.getBalanceType(), StoreBalanceTypeEnum.FIXED.getType())){
|
|
|
|
|
-// //只能使用门店自己的预付款
|
|
|
|
|
-// CommonResult<StoreRespDTO> storeResult = storeApi.storePlatTrade(reqDTO);
|
|
|
|
|
-// Asserts.isTrue(storeResult.isSuccess(), storeResult.getMsg());
|
|
|
|
|
-// storeRespDTO.set(storeResult.getCheckedData());
|
|
|
|
|
-// }else if(ObjectUtil.equals(storeData.getBalanceType(), StoreBalanceTypeEnum.SHARE.getType())){
|
|
|
|
|
-// isShareBalance.set(true);
|
|
|
|
|
-// }else {
|
|
|
|
|
-// Asserts.isTrue(true,"门店禁用预付款");
|
|
|
|
|
-// }
|
|
|
|
|
-// });
|
|
|
|
|
}else {
|
|
}else {
|
|
|
isShareBalance.set(true);
|
|
isShareBalance.set(true);
|
|
|
}
|
|
}
|
|
@@ -405,13 +390,13 @@ public class DistributorRechargeServiceImpl implements DistributorRechargeServic
|
|
|
|
|
|
|
|
if(!flag){
|
|
if(!flag){
|
|
|
//尝试授信
|
|
//尝试授信
|
|
|
- tradeType = DistributorTradeTypeEnum.CREDIT_TRANS.getType();
|
|
|
|
|
|
|
+// tradeType = DistributorTradeTypeEnum.CREDIT_TRANS.getType();
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
if (!canChangeToCredit) {
|
|
if (!canChangeToCredit) {
|
|
|
throw exception0(11_028, "分销商无预付款交易权限!");
|
|
throw exception0(11_028, "分销商无预付款交易权限!");
|
|
|
}
|
|
}
|
|
|
- tradeType = DistributorTradeTypeEnum.CREDIT_TRANS.getType();
|
|
|
|
|
|
|
+// tradeType = DistributorTradeTypeEnum.CREDIT_TRANS.getType();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if(tradeType == DistributorTradeTypeEnum.CREDIT_TRANS.getType()){
|
|
if(tradeType == DistributorTradeTypeEnum.CREDIT_TRANS.getType()){
|
|
@@ -432,22 +417,6 @@ public class DistributorRechargeServiceImpl implements DistributorRechargeServic
|
|
|
afterBalance = beforeBalance.add(money);
|
|
afterBalance = beforeBalance.add(money);
|
|
|
AtomicBoolean isShareBalance = new AtomicBoolean(false);
|
|
AtomicBoolean isShareBalance = new AtomicBoolean(false);
|
|
|
AtomicReference<StoreRespDTO> storeRespDTO = new AtomicReference<>();
|
|
AtomicReference<StoreRespDTO> storeRespDTO = new AtomicReference<>();
|
|
|
-// if (rechargeReqDTO.getStoreId() != null){
|
|
|
|
|
-// StoreReqDTO reqDTO = this.convertStorePlatBalance(rechargeReqDTO.getStoreId(), tradeMode, money, Long.parseLong(rechargeReqDTO.getOrderId()), tradeType, rechargeReqDTO.getRefundId());
|
|
|
|
|
-// TenantUtils.execute(distributor.getAccountTenantId(), () -> {
|
|
|
|
|
-// StoreInfoReqDTO storeData = storeApi.getStoreById(rechargeReqDTO.getStoreId()).getCheckedData();
|
|
|
|
|
-// if(ObjectUtil.equals(storeData.getBalanceType(), StoreBalanceTypeEnum.FIXED.getType())){
|
|
|
|
|
-// CommonResult<StoreRespDTO> storeResult = storeApi.storePlatTrade(reqDTO);
|
|
|
|
|
-// Asserts.isTrue(storeResult.isSuccess(), storeResult.getMsg());
|
|
|
|
|
-// storeRespDTO.set(storeResult.getCheckedData());
|
|
|
|
|
-// }else{
|
|
|
|
|
-// isShareBalance.set(true);
|
|
|
|
|
-// }
|
|
|
|
|
-// });
|
|
|
|
|
-// }else{
|
|
|
|
|
-// isShareBalance.set(true);
|
|
|
|
|
-// }
|
|
|
|
|
-
|
|
|
|
|
if(true){
|
|
if(true){
|
|
|
tradeName =(tradeType==10?"定向库存":"")+"余额退款金额:" + money + "元,退款到账后剩余余额" + afterBalance + "元";
|
|
tradeName =(tradeType==10?"定向库存":"")+"余额退款金额:" + money + "元,退款到账后剩余余额" + afterBalance + "元";
|
|
|
//操作账户资金
|
|
//操作账户资金
|
|
@@ -572,22 +541,6 @@ public class DistributorRechargeServiceImpl implements DistributorRechargeServic
|
|
|
isShareBalance = new AtomicBoolean(true);
|
|
isShareBalance = new AtomicBoolean(true);
|
|
|
storeRespDTO = new AtomicReference<>();
|
|
storeRespDTO = new AtomicReference<>();
|
|
|
if (rechargeReqDTO.getStoreId() != null){
|
|
if (rechargeReqDTO.getStoreId() != null){
|
|
|
-// StoreReqDTO reqDTO = this.convertStorePlatBalance(rechargeReqDTO.getStoreId(), tradeMode, money, Long.parseLong(rechargeReqDTO.getOrderId()), tradeType, null);
|
|
|
|
|
-// TenantUtils.execute(distributor.getAccountTenantId(), () -> {
|
|
|
|
|
-// StoreInfoReqDTO storeData = storeApi.getStoreById(rechargeReqDTO.getStoreId()).getCheckedData();
|
|
|
|
|
-// Asserts.isTrue(!ObjectUtil.equals(storeData.getBalanceType(), StoreBalanceTypeEnum.FORBIDDEN.getType()), "当前门店禁止使用预付款");
|
|
|
|
|
-// if(ObjectUtil.equals(storeData.getBalanceType(), StoreBalanceTypeEnum.FIXED.getType())){
|
|
|
|
|
-// //只能使用门店自己的预付款
|
|
|
|
|
-// CommonResult<StoreRespDTO> storeResult = storeApi.storePlatTrade(reqDTO);
|
|
|
|
|
-// Asserts.isTrue(storeResult.isSuccess(), storeResult.getMsg());
|
|
|
|
|
-// storeRespDTO.set(storeResult.getCheckedData());
|
|
|
|
|
-// }else if(ObjectUtil.equals(storeData.getBalanceType(), StoreBalanceTypeEnum.SHARE.getType())){
|
|
|
|
|
-// isShareBalance.set(true);
|
|
|
|
|
-// }else {
|
|
|
|
|
-// Asserts.isTrue(true,"门店禁用预付款");
|
|
|
|
|
-// }
|
|
|
|
|
-// });
|
|
|
|
|
-// }else {
|
|
|
|
|
isShareBalance.set(true);
|
|
isShareBalance.set(true);
|
|
|
}
|
|
}
|
|
|
|
|
|