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); + } + } } }