|
@@ -24,6 +24,8 @@ 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 java.math.BigDecimal;
|
|
|
|
|
+import java.math.BigInteger;
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
@@ -82,6 +84,9 @@ public class SysDeptAccountServiceImpl extends ServiceImpl<SysDeptAccountMapper,
|
|
|
if (sysDeptAccount.getAmount().compareTo(deptAccount.getManagementFee()) > 0) {
|
|
if (sysDeptAccount.getAmount().compareTo(deptAccount.getManagementFee()) > 0) {
|
|
|
throw new SystemException("提现金额大于机构账户金额");
|
|
throw new SystemException("提现金额大于机构账户金额");
|
|
|
}
|
|
}
|
|
|
|
|
+ if (sysDeptAccount.getAmount().equals(new BigDecimal(BigInteger.ZERO))) {
|
|
|
|
|
+ throw new SystemException("提现金额不能为0");
|
|
|
|
|
+ }
|
|
|
// 减去提现金额
|
|
// 减去提现金额
|
|
|
deptAccount.setManagementFee(deptAccount.getManagementFee().subtract(sysDeptAccount.getAmount()));
|
|
deptAccount.setManagementFee(deptAccount.getManagementFee().subtract(sysDeptAccount.getAmount()));
|
|
|
sysDeptAccountService.updateById(deptAccount);
|
|
sysDeptAccountService.updateById(deptAccount);
|