修改交班落地数据逻辑
This commit is contained in:
parent
433a03ebb8
commit
a2f467038b
|
|
@ -25,7 +25,7 @@ public interface ShopUserDutyMapper {
|
||||||
|
|
||||||
ShopUserDuty selectByTokenId(@Param("tokenId") Integer tokenId);
|
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<ShopUserDuty> selectByShopId(@Param("shopId") String shopId);
|
List<ShopUserDuty> selectByShopId(@Param("shopId") String shopId);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -264,7 +264,8 @@ public class DutyService {
|
||||||
if (type.equals("close")){
|
if (type.equals("close")){
|
||||||
JSONObject tokenJson = TokenUtil.parseParamFromToken(tbToken.getToken());
|
JSONObject tokenJson = TokenUtil.parseParamFromToken(tbToken.getToken());
|
||||||
Integer shopId = tokenJson.getInteger("shopId");
|
Integer shopId = tokenJson.getInteger("shopId");
|
||||||
shopUserDutyMapper.updateStatusByTokenId(day,shopId);
|
Integer staffId = tokenJson.getInteger("staffId");
|
||||||
|
shopUserDutyMapper.updateStatusByTokenId(day,shopId,staffId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
||||||
|
|
@ -222,6 +222,6 @@
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=INTEGER}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateStatusByTokenId">
|
<update id="updateStatusByTokenId">
|
||||||
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'
|
||||||
</update>
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue