修改交班落地数据逻辑

This commit is contained in:
19991905653
2024-04-03 09:20:46 +08:00
parent ff7ac0e668
commit 8e1b70e3a8
3 changed files with 6 additions and 4 deletions

View File

@@ -46,7 +46,7 @@
</select>
<select id="selectByShopIdAndTrade"
resultType="com.chaozhanggui.system.cashierservice.entity.ShopUserDuty">
select * from tb_shop_user_duty where trade_day = #{day} and shop_id = #{shopId}
select * from tb_shop_user_duty where trade_day = #{day} and shop_id = #{shopId} and status = '0'
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_shop_user_duty
@@ -222,6 +222,6 @@
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateStatusByTokenId">
update tb_shop_user_duty set status = '1' and login_out_time = now() where token_id = #{tokenId}
update tb_shop_user_duty set status = '1' , login_out_time = now() where shop_id = #{shopId} and trade_day = #{day}
</update>
</mapper>