123
This commit is contained in:
@@ -501,7 +501,6 @@ type StoreAcctOrder struct {
|
|||||||
VendorOrderID string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"`
|
VendorOrderID string `orm:"column(vendor_order_id);size(48)" json:"vendorOrderID"`
|
||||||
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||||||
StoreID int `orm:"column(store_id)" json:"storeID"` // 外部系统里记录的 jxstoreid
|
StoreID int `orm:"column(store_id)" json:"storeID"` // 外部系统里记录的 jxstoreid
|
||||||
BrandID int `orm:"column(brand_id)"json:"brandID"` //外部系统里记录的brandID
|
|
||||||
ActualPayPrice int `json:"actualPayPrice"` // 单位为分 顾客实际支付
|
ActualPayPrice int `json:"actualPayPrice"` // 单位为分 顾客实际支付
|
||||||
UserID string `orm:"column(user_id);size(48);index" json:"userID"`
|
UserID string `orm:"column(user_id);size(48);index" json:"userID"`
|
||||||
OrderType int `json:"orderType"`
|
OrderType int `json:"orderType"`
|
||||||
|
|||||||
@@ -580,11 +580,14 @@ func OnPayFinished(orderPay *model.OrderPay) (err error) {
|
|||||||
storeOrder := &model.StoreAcctOrder{
|
storeOrder := &model.StoreAcctOrder{
|
||||||
VendorOrderID: orderPay.VendorOrderID,
|
VendorOrderID: orderPay.VendorOrderID,
|
||||||
}
|
}
|
||||||
|
Storebrand := &model.BrandOrder{
|
||||||
|
VendorOrderID: orderPay.VendorOrderID,
|
||||||
|
}
|
||||||
if err = dao.GetEntity(dao.GetDB(), storeOrder, "VendorOrderID"); err == nil && storeOrder.ID != 0 {
|
if err = dao.GetEntity(dao.GetDB(), storeOrder, "VendorOrderID"); err == nil && storeOrder.ID != 0 {
|
||||||
storeOrder.OrderFinishedAt = time.Now()
|
storeOrder.OrderFinishedAt = time.Now()
|
||||||
storeOrder.Status = model.OrderStatusFinished
|
storeOrder.Status = model.OrderStatusFinished
|
||||||
if _, err = dao.UpdateEntity(dao.GetDB(), storeOrder, "OrderFinishedAt", "Status"); err == nil {
|
if _, err = dao.UpdateEntity(dao.GetDB(), storeOrder, "OrderFinishedAt", "Status"); err == nil {
|
||||||
partner.CurStoreAcctManager.InsertBrandBill(jxcontext.AdminCtx, storeOrder.BrandID, storeOrder.ActualPayPrice, 1, 1, "")
|
partner.CurStoreAcctManager.InsertBrandBill(jxcontext.AdminCtx, Storebrand.BrandID, storeOrder.ActualPayPrice, 1, 1, "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case model.PayTypeTL_BrandBillCharge:
|
case model.PayTypeTL_BrandBillCharge:
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
package localjx
|
|
||||||
|
|
||||||
import (
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
|
||||||
"git.rosy.net.cn/jx-callback/globals/testinit"
|
|
||||||
)
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
testinit.Init()
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestGenOrderNo(t *testing.T) {
|
|
||||||
orderNo := GenOrderNo(jxcontext.AdminCtx)
|
|
||||||
t.Log(orderNo)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestGetAvailableDeliverTime(t *testing.T) {
|
|
||||||
timeInfo, err := GetAvailableDeliverTime(jxcontext.AdminCtx, 100118)
|
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
t.Log(utils.Format4Output(timeInfo, false))
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user