Skip to content

pay user auto adjust level #98

Closed

Description

@xengine-qyt

充值用户自动调整用户级别支持.
比如原始普通用户,充值后自动调整为VIP级别,或者原始为VIP,到期后为普通用户

Activity

  1. Issues-translate-bot commented on May 9, 2025

    @Issues-translate-bot

    Bot detected the issue body's language is not English, translate it automatically.


    Recharge user automatically adjusts user level support

  2. github-actions commented on Apr 27, 2026

    @github-actions
    Contributor

    Pull request created: #114

    Generated by 自动处理 Issue

  3. github-actions commented on Apr 27, 2026

    @github-actions
    Contributor

    已按需求实现“充值自动调级、到期自动回退”并提交 PR:feat: pay user auto adjust level(分支:feat/issue-98-auto-adjust-user-level)。

    实现思路:

    • 根因是原充值流程只更新了剩余时长/卡类型,没有同步更新 nUserLevel。
    • 在 SQLite 和 MySQL 两套数据库实现中,充值成功后自动将 nUserLevel 更新为 0(VIP/可登录级别)。
    • 在用户时长耗尽的离线结算流程里(nTimeLeft <= 0),自动将 nUserLevel 回退为 20(普通级别)。
    • 仅改数据库模块,未改协议和表结构,兼容现有调用。

    建议验证:

    1. 注册新用户(默认 nUserLevel=20)并充值,确认自动变为 0。
    2. 让用户时长耗尽,确认自动回退为 20。
    3. 分别在 SQLite / MySQL 模式下验证上述流程。

    Generated by 自动处理 Issue for issue #98 · ◷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions