Git Product home page Git Product logo

Comments (10)

nobrick avatar nobrick commented on July 18, 2024

@hymRedemption 我可能没太理解你的意思~

from kano.

nobrick avatar nobrick commented on July 18, 2024

现在提现申请的限制好像只是让 index 页面根据当前状态提供相应的页面显示。但对于 create 方法来说,没有再次对这些限制进行检查。

这个条件检查现在是在 request && save 这个 AASM event 来做的吧。

from kano.

hymRedemption avatar hymRedemption commented on July 18, 2024

@nobrick 我看了, aasm event 里面好像没有加入条件检查

from kano.

nobrick avatar nobrick commented on July 18, 2024
  validate :requested_withdrawal_must_be_unique, if: 'to? :requested'

实际上是在 save 的时候验证的。

from kano.

hymRedemption avatar hymRedemption commented on July 18, 2024

哦,看到了。 感觉业务相关的 validate 放入 model,看着好混乱。

from kano.

nobrick avatar nobrick commented on July 18, 2024

@hymRedemption 如果是 serializable transaction,在执行 save 的时候,会自动调用这个 callback,只有一个 save 而且 commit 了,另一个在 commit 的时候会 abort,然后重试的时候检测已经有 requested withdrawal 被创建。

from kano.

hymRedemption avatar hymRedemption commented on July 18, 2024

@nobrick 我知道了,刚开始没找到相关的 validate 。 主要感觉现在代码开始混起来了。

from kano.

nobrick avatar nobrick commented on July 18, 2024

另一个问题就是,用户只要保留住提现申请的页面。就可以不用在我们限定的提现日提现。他可以随便在那天进行提现。

这个我其实很早觉得提现日不用固定,但是 @wangxiran 可能认为这样在管理上更方便一些。

from kano.

hymRedemption avatar hymRedemption commented on July 18, 2024

@nobrick OK,那我就把这个 issue 关闭了

from kano.

nobrick avatar nobrick commented on July 18, 2024

OK

from kano.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.