From e7692107a67a4aa398b5f41913039522efb3121f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=9B=E5=8F=89=E9=97=AA=E9=97=AA?= <18322780655@163.com> Date: Fri, 2 Aug 2024 11:10:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=A4=E7=8F=AD=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/cashierservice/service/DutyService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/DutyService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/DutyService.java index b826d07..ab6e510 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/DutyService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/DutyService.java @@ -364,7 +364,10 @@ public class DutyService { ShopUserDuty shopUserDuty = shopUserDutyMapper.selectByShopIdAndStatus(shopId, "0"); // cloudPrinterService.handoverprintData(token, shopUserDuty.getId(), "",true); // shopUserDutyMapper.updateStatusByTokenId(day, shopId, staffId); - shopUserDutyMapper.updateStatusById(shopUserDuty.getId(), staffId); + if(Objects.nonNull(shopUserDuty)){ + shopUserDutyMapper.updateStatusById(shopUserDuty.getId(), staffId); + } + } } }