/** * JKES 相关 Redis 键(与旧系统 lepao* 隔离,统一 jkes_ / jkes_* 前缀) * 账户以学号 student_num(JKES 的 code)为主键。 */ function runnerFlag(studentNum) { return `jkes_runner:${studentNum}` } function lepaoSuccess(studentNum) { return `jkes_lepaoSuccess:${studentNum}` } function lepaoProgress(studentNum) { return `jkes_lepaoProgress:${studentNum}` } /** @param {number} month1to12 */ function monthState(studentNum, year, month1to12) { const m = String(month1to12).padStart(2, '0') return `jkes_month:${studentNum}:${year}-${m}` } function consume(baseKey) { return `jkes_lepao:consume:${baseKey}` } function refund(baseKey) { return `jkes_lepao:refund:${baseKey}` } module.exports = { runnerFlag, lepaoSuccess, lepaoProgress, monthState, consume, refund }