pay
This commit is contained in:
13
business/jxstore/cms/order_test.go
Normal file
13
business/jxstore/cms/order_test.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package cms
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Test_Set(t *testing.T) {
|
||||
if _, err := dao.SetOrderStatus(110, 5, "165943225529BCVFdaX"); err != nil {
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
@@ -689,7 +689,7 @@ func SetUserVendorOrderStatus(db *DaoDB, localWayBillID string, status int) (msg
|
||||
//更新order 价格和状态
|
||||
func SetOrderStatus(payPrice, payMethod int, orderID string) (string, error) {
|
||||
|
||||
if _, err := ExecuteSQL(GetDB(), `UPDATE `+`order`+` SET pay_price = ?,pay_method= ? WHERE order_id = ? `, []interface{}{payPrice, payMethod, orderID}...); err != nil {
|
||||
if _, err := ExecuteSQL(GetDB(), `UPDATE [order] SET pay_price = ?,pay_method= ? WHERE order_id = ? `, []interface{}{payPrice, payMethod, orderID}...); err != nil {
|
||||
return "", err
|
||||
}
|
||||
return "更新Order状态成功", nil
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
func Init() {
|
||||
// set default database
|
||||
orm.RegisterDataBase("default", "mysql", beego.AppConfig.String("dbConnectStr"))
|
||||
//orm.RegisterDataBase("api", "mysql", "root:WebServer@1@tcp(gold1.jxc4.com:3306)/api?charset=utf8mb4&loc=Local&parseTime=true")
|
||||
//orm.RegisterDataBase("jxd_dev_0", "mysql", "root:WebServer@1@tcp(test1.jxc4.com:3306)/jxd_dev_0?charset=utf8mb4&loc=Local&parseTime=true")
|
||||
if beego.BConfig.RunMode == "rsm" {
|
||||
//用户
|
||||
orm.RegisterModel(&model.AuthBind{}, &model.User{})
|
||||
@@ -58,4 +58,5 @@ func Init() {
|
||||
orm.RegisterModel(&model.Printer{})
|
||||
// create table
|
||||
orm.RunSyncdb("default", false, true)
|
||||
//orm.RunSyncdb("jxd_dev_0", false, true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user