From a2f467038bd98fb278a15e26f69596f319c78201 Mon Sep 17 00:00:00 2001 From: 19991905653 Date: Wed, 3 Apr 2024 10:03:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=A4=E7=8F=AD=E8=90=BD?= =?UTF-8?q?=E5=9C=B0=E6=95=B0=E6=8D=AE=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/cashierservice/dao/ShopUserDutyMapper.java | 2 +- .../system/cashierservice/service/DutyService.java | 3 ++- src/main/resources/mapper/ShopUserDutyMapper.xml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyMapper.java b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyMapper.java index bcfc162..c0fde4b 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyMapper.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/dao/ShopUserDutyMapper.java @@ -25,7 +25,7 @@ public interface ShopUserDutyMapper { ShopUserDuty selectByTokenId(@Param("tokenId") Integer tokenId); - void updateStatusByTokenId(@Param("day") String day,@Param("shopId") Integer shopId); + void updateStatusByTokenId(@Param("day") String day, @Param("shopId") Integer shopId,@Param("staffId") Integer staffId); List selectByShopId(@Param("shopId") String shopId); 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 44d6803..a680325 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/DutyService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/DutyService.java @@ -264,7 +264,8 @@ public class DutyService { if (type.equals("close")){ JSONObject tokenJson = TokenUtil.parseParamFromToken(tbToken.getToken()); Integer shopId = tokenJson.getInteger("shopId"); - shopUserDutyMapper.updateStatusByTokenId(day,shopId); + Integer staffId = tokenJson.getInteger("staffId"); + shopUserDutyMapper.updateStatusByTokenId(day,shopId,staffId); } } } catch (Exception e) { diff --git a/src/main/resources/mapper/ShopUserDutyMapper.xml b/src/main/resources/mapper/ShopUserDutyMapper.xml index a10c479..86e8d83 100644 --- a/src/main/resources/mapper/ShopUserDutyMapper.xml +++ b/src/main/resources/mapper/ShopUserDutyMapper.xml @@ -222,6 +222,6 @@ where id = #{id,jdbcType=INTEGER} - update tb_shop_user_duty set status = '1' , login_out_time = now() where shop_id = #{shopId} and trade_day = #{day} and status = '0' + update tb_shop_user_duty set status = '1' , login_out_time = now(),user_id = #{staffId} where shop_id = #{shopId} and trade_day = #{day} and status = '0' \ No newline at end of file