Comments (10)
@hymRedemption 我可能没太理解你的意思~
from kano.
现在提现申请的限制好像只是让 index 页面根据当前状态提供相应的页面显示。但对于 create 方法来说,没有再次对这些限制进行检查。
这个条件检查现在是在 request && save
这个 AASM event 来做的吧。
from kano.
@nobrick 我看了, aasm event 里面好像没有加入条件检查
from kano.
validate :requested_withdrawal_must_be_unique, if: 'to? :requested'
实际上是在 save 的时候验证的。
from kano.
哦,看到了。 感觉业务相关的 validate 放入 model,看着好混乱。
from kano.
@hymRedemption 如果是 serializable transaction,在执行 save 的时候,会自动调用这个 callback,只有一个 save 而且 commit 了,另一个在 commit 的时候会 abort,然后重试的时候检测已经有 requested withdrawal 被创建。
from kano.
@nobrick 我知道了,刚开始没找到相关的 validate 。 主要感觉现在代码开始混起来了。
from kano.
另一个问题就是,用户只要保留住提现申请的页面。就可以不用在我们限定的提现日提现。他可以随便在那天进行提现。
这个我其实很早觉得提现日不用固定,但是 @wangxiran 可能认为这样在管理上更方便一些。
from kano.
@nobrick OK,那我就把这个 issue 关闭了
from kano.
OK
from kano.
Related Issues (20)
- 后台的订单详情未显示维修内容 HOT 1
- 重发订单
- 下单页面增加物件数量和对应名称(件) HOT 2
- 下单页面输入框改进 HOT 2
- 下单页面错误提示改进 HOT 1
- 订单流转功能 HOT 1
- 下单页面支持上传图片 HOT 1
- 师傅头像支持 HOT 1
- 后台订单详情页面的师傅链接指向错误 HOT 1
- 前端并发问题 HOT 1
- 简化下单界面
- Rename .css.scss to .scss
- 财会信息管理的链接跳转 HOT 1
- 师傅端提现历史记录
- 取消现金支付,增加师傅代用户微信支付
- 15分钟无人接单slack反馈
- 后台支持取消订单
- 订单两周后自动作废
- 170防隐私电话
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kano.