feat(企微签到):逻辑:员工使用企微扫码后直接跳出签到页面,在签到页面对该课程进行点击签到!
deploy-hxtesting / build-and-deploy (push) Successful in 1m14s
deploy-hxtesting / build-and-deploy (push) Successful in 1m14s
规则:1.签到要校验是否为培训当天签到,如果不是当天扫码签到则进行友好提示;2. 签到需提供员工工号及随机时间戳(超过签到二维码有效期后需重新扫码签到);3.签到二维码每5分钟自动更新一次(更新后之前扫码签到自动作废需重新扫码); 补充说明:1.签到页面需展示该签到课程相关信息;2.展示签到倒计时还有多久过期,过期后需重新扫码进行优化提示;3.签到后提示签到成功!自动登录进入平台系统并进入该课程详情页面
This commit is contained in:
1 parent
9950a28346
commit
f43fbef5db
24 files changed
+1336
-67
No files matched your search
@@ -0,0 +1,9 @@
|
||||
-- Migration: 000162_training_sign_rotation (down)
|
||||
-- 回滚轮换/防重放列;签到流水 nonce 列一并移除(留痕数据随列删除)。
|
||||
|
||||
ALTER TABLE tr_sign_codes
|
||||
DROP COLUMN IF EXISTS prev_token,
|
||||
DROP COLUMN IF EXISTS prev_expire_at;
|
||||
|
||||
ALTER TABLE tr_sign_records
|
||||
DROP COLUMN IF EXISTS nonce;
|
||||
@@ -0,0 +1,17 @@
|
||||
-- Migration: 000162_training_sign_rotation
|
||||
-- 企微扫码签到免登 + 二维码 5 分钟轮换(2026-11 需求):
|
||||
-- 1. tr_sign_codes 增 prev_token / prev_expire_at:轮换时旧 token 挪入前码位,
|
||||
-- 宽限期内(rotation_grace_sec,默认 30s)仍可签到,防"扫码即轮换"踩空;
|
||||
-- upsert 覆盖后旧 token 即刻退出当前码位(GetSignCodeByToken 不再命中)。
|
||||
-- 2. tr_sign_records 增 nonce:扫码签到随机时间戳防重放留痕,同 nonce 二次
|
||||
-- 提交直接拒绝;历史行默认空串,不参与查重(空 nonce 不查)。
|
||||
-- 全部 ADD COLUMN IF NOT EXISTS,迁移幂等可重放。
|
||||
|
||||
DO $$ BEGIN RAISE NOTICE '[Migration 000162] Adding sign-code rotation / sign-record nonce columns...'; END $$;
|
||||
|
||||
ALTER TABLE tr_sign_codes
|
||||
ADD COLUMN IF NOT EXISTS prev_token VARCHAR(64) NOT NULL DEFAULT '',
|
||||
ADD COLUMN IF NOT EXISTS prev_expire_at TIMESTAMP WITH TIME ZONE;
|
||||
|
||||
ALTER TABLE tr_sign_records
|
||||
ADD COLUMN IF NOT EXISTS nonce VARCHAR(64) NOT NULL DEFAULT '';
|
||||
Reference in new issue
Block a user