aa
This commit is contained in:
@@ -20,7 +20,7 @@ import (
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
)
|
||||
|
||||
func CreateOrder(ctx *jxcontext.Context, orderType int, way string, price int, lng, lat float64) (orderID, errCode string, err error) {
|
||||
func CreateOrder(ctx *jxcontext.Context, type1, orderType int, way string, price int, lng, lat float64) (orderID, errCode string, err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
order *model.Order
|
||||
@@ -29,7 +29,7 @@ func CreateOrder(ctx *jxcontext.Context, orderType int, way string, price int, l
|
||||
if err = auth2.CheckWeixinminiAuthBind(ctx.GetUserID()); err != nil {
|
||||
return "", errCode, err
|
||||
}
|
||||
if orderType == model.OrderTypeCash {
|
||||
if type1 == model.OrderTypeCash {
|
||||
//如果用户没有对应账单信息就给他生成一条
|
||||
userBill, err := dao.GetUserBill(db, ctx.GetUserID(), "")
|
||||
if userBill == nil {
|
||||
@@ -51,7 +51,8 @@ func CreateOrder(ctx *jxcontext.Context, orderType int, way string, price int, l
|
||||
order = &model.Order{
|
||||
OrderID: utils.Int64ToStr(jxutils.GenOrderNo()),
|
||||
UserID: ctx.GetUserID(),
|
||||
Type: orderType,
|
||||
Type: type1,
|
||||
OrderType: orderType,
|
||||
Way: way,
|
||||
Status: model.OrderStatusWait4Pay,
|
||||
PayPrice: price,
|
||||
|
||||
Reference in New Issue
Block a user