cash limit
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package cms
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/financial"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
|
||||
@@ -82,6 +84,14 @@ func Cash(ctx *jxcontext.Context, orderID, payType int, vendorPayType string) (e
|
||||
if userBill.AccountBalance < order.PayPrice {
|
||||
return model.ErrCodeAccountBalanceNotEnough, err
|
||||
}
|
||||
//用户一天只能提现一次
|
||||
billExpends, err := dao.GetBillExpend(db, order.UserID, model.BillTypeCash, DayTimeBegin, DayTimeEnd)
|
||||
if err != nil {
|
||||
return errCode, err
|
||||
}
|
||||
if len(billExpends) > 0 {
|
||||
return errCode, fmt.Errorf("抱歉,一天只能提现一次!")
|
||||
}
|
||||
err = payHandler.CreateRefund()
|
||||
return errCode, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user