From dd57216f8ffe4a885a6ccfce2fd6d8e0d16ec83f Mon Sep 17 00:00:00 2001 From: puhanshu <a9236326> Date: 星期四, 13 一月 2022 14:33:52 +0800 Subject: [PATCH] 商业街授权登录 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsGameServiceImpl.java | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsGameServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsGameServiceImpl.java index 336ecf9..db83cb2 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsGameServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsGameServiceImpl.java @@ -232,6 +232,9 @@ } Integer beforeCoins = mcsGame.getCoins(); Integer beforeSurplusCoins = mcsGame.getSurplusCoins(); + if (isNull(beforeSurplusCoins)) { + beforeSurplusCoins = beforeCoins; + } Integer beforeUsedCoins = beforeCoins - beforeSurplusCoins; Integer surplusCoins = coins - beforeUsedCoins; if (surplusCoins < 0) { @@ -443,7 +446,7 @@ public R getMcsGame(Long gameId) { McsGameVO mcsGameVO = this.baseMapper.selectDetailById(gameId); Integer gameCount = this.baseMapper.selectCount(new QueryWrapper<McsGame>().lambda() - .eq(McsGame::getMerchantId, mcsGameVO.getMerchantId()).eq(McsGame::getIsDel, false)); + .eq(McsGame::getMerchantId, mcsGameVO.getMerchantId()).eq(McsGame::getStatus, McsGame.Status.jxz).eq(McsGame::getIsDel, false)); mcsGameVO.setGameCount(gameCount); return R.ok(mcsGameVO); } -- Gitblit v1.7.1