瀏覽代碼

新增账本查询model

wujiefeng 1 年之前
父節點
當前提交
25396d36bf

+ 2 - 1
FullCardServer/src/main/java/com/zhongshu/card/server/core/service/pay/BalancePayService.java

@@ -4,6 +4,7 @@ import com.github.microservice.core.util.JsonUtil;
 import com.github.microservice.core.util.bean.BeanUtil;
 import com.github.microservice.pay.client.model.PayProductParameter;
 import com.github.microservice.pay.client.model.ledger.GeneralLedgerModel;
+import com.github.microservice.pay.client.model.ledger.GeneralLedgerQueryModel;
 import com.github.microservice.pay.client.model.ledger.TransactionLogModel;
 import com.github.microservice.pay.client.model.ledger.TransferTransactionsModel;
 import com.github.microservice.pay.client.model.weChatMiniApp.WeChatMiniAppPayRet;
@@ -189,7 +190,7 @@ public class BalancePayService {
 
     public ResultContent<Long> queryUserBalance(String projectOid, String userId) {
         PayAccount userBalance = payAccountService.getUserChildren(projectOid, userId, PaymentChannelType.BalancePayment);
-        ResultContent<GeneralLedgerModel> ret = generalLedgerService.get(userBalance.getLedgerId());
+        ResultContent<GeneralLedgerQueryModel> ret = generalLedgerService.get(userBalance.getLedgerId());
         if (ret.getState().equals(ResultState.Success)) {
             return ResultContent.buildContent(ret.getContent().getBalance());
         }

+ 3 - 0
FullCardServer/src/main/java/com/zhongshu/card/server/core/service/pay/PayAccountService.java

@@ -154,6 +154,7 @@ public class PayAccountService {
         if (StringUtils.isBlank(ledgerId)){
             throw new Exception("支付中心创建机构总账失败");
         }
+        payAccount.setLedgerId(ledgerId);
         payAccountDao.save(payAccount);
         return payAccount;
     }
@@ -185,6 +186,7 @@ public class PayAccountService {
         if (StringUtils.isBlank(ledgerId)){
             throw new Exception("支付中心创建用户总账失败");
         }
+        payAccount.setLedgerId(ledgerId);
         payAccountDao.save(payAccount);
         return payAccount;
     }
@@ -216,6 +218,7 @@ public class PayAccountService {
         if (StringUtils.isBlank(ledgerId)){
             throw new Exception("支付中心创建项目总账失败");
         }
+        payAccount.setLedgerId(ledgerId);
         payAccountDao.save(payAccount);
         return payAccount;
     }