Merge remote-tracking branch 'origin/mark' into su

This commit is contained in:
苏尹岚
2019-11-28 09:49:47 +08:00
21 changed files with 440 additions and 57 deletions

View File

@@ -474,20 +474,25 @@ func (c *OrderManager) addOrderStatus(orderStatus *model.OrderStatus, db *dao.Da
order.VendorStatus = orderStatus.VendorStatus order.VendorStatus = orderStatus.VendorStatus
updateFields := []string{ updateFields := []string{
"VendorStatus", "VendorStatus",
"UpdatedAt",
} }
if model.IsOrderMainStatus(orderStatus.Status) { if model.IsOrderMainStatus(orderStatus.Status) {
order.Status = orderStatus.Status order.Status = orderStatus.Status
order.StatusTime = orderStatus.StatusTime order.StatusTime = orderStatus.StatusTime
updateFields = append(updateFields, "Status", "StatusTime") updateFields = append(updateFields, "Status", "StatusTime")
if order.LockStatus != model.OrderStatusUnknown { if model.IsOrderFinalStatus(orderStatus.Status) {
order.LockStatus = model.OrderStatusUnknown order.OrderFinishedAt = orderStatus.StatusTime
updateFields = append(updateFields, "LockStatus") updateFields = append(updateFields, "OrderFinishedAt")
if order.LockStatus != model.OrderStatusUnknown {
order.LockStatus = model.OrderStatusUnknown
updateFields = append(updateFields, "LockStatus")
}
} }
} else { } else {
if model.IsOrderUnlockStatus(orderStatus.Status) { if model.IsOrderUnlockStatus(orderStatus.Status) {
order.LockStatus = model.OrderStatusUnknown order.LockStatus = model.OrderStatusUnknown
updateFields = append(updateFields, "LockStatus") updateFields = append(updateFields, "LockStatus")
} else if !model.IsOrderFinalStatus(orderStatus.Status) { } else if model.IsOrderLockStatus(orderStatus.Status) {
if order.LockStatus != model.OrderStatusUnknown { if order.LockStatus != model.OrderStatusUnknown {
globals.SugarLogger.Warnf("addOrderStatus refOrderID:%s, orderID:%s, order.LockStatus:%d, status.LockStatus:%d", orderStatus.RefVendorOrderID, orderStatus.VendorOrderID, order.LockStatus, orderStatus.Status) globals.SugarLogger.Warnf("addOrderStatus refOrderID:%s, orderID:%s, order.LockStatus:%d, status.LockStatus:%d", orderStatus.RefVendorOrderID, orderStatus.VendorOrderID, order.LockStatus, orderStatus.Status)
} }
@@ -497,10 +502,6 @@ func (c *OrderManager) addOrderStatus(orderStatus *model.OrderStatus, db *dao.Da
updateFields = append(updateFields, "LockStatus", "LockStatusTime", "Flag") updateFields = append(updateFields, "LockStatus", "LockStatusTime", "Flag")
} }
} }
if model.IsOrderFinalStatus(orderStatus.Status) {
order.OrderFinishedAt = orderStatus.StatusTime
updateFields = append(updateFields, "OrderFinishedAt")
}
utils.CallFuncLogError(func() error { utils.CallFuncLogError(func() error {
_, err = db.Db.Update(order, updateFields...) _, err = db.Db.Update(order, updateFields...)
return err return err

View File

@@ -229,7 +229,16 @@ func (c *OrderManager) ExportMTWaybills(ctx *jxcontext.Context, fromDateStr, toD
func (c *OrderManager) getOrders(ctx *jxcontext.Context, isIncludeSku, isIncludeFake bool, fromDateStr, toDateStr string, isDateFinish bool, skuIDs []int, isJxFirst bool, params map[string]interface{}, offset, pageSize int) (orders []*model.GoodsOrderExt, totalCount int, err error) { func (c *OrderManager) getOrders(ctx *jxcontext.Context, isIncludeSku, isIncludeFake bool, fromDateStr, toDateStr string, isDateFinish bool, skuIDs []int, isJxFirst bool, params map[string]interface{}, offset, pageSize int) (orders []*model.GoodsOrderExt, totalCount int, err error) {
globals.SugarLogger.Debugf("getOrders from:%s to:%s", fromDateStr, toDateStr) globals.SugarLogger.Debugf("getOrders from:%s to:%s", fromDateStr, toDateStr)
isPurchase, _ := params["isPurchase"].(bool)
userID := ""
if !isPurchase {
if user := ctx.GetFullUser(); user != nil {
userID = user.GetID()
if user.Type&model.UserTypeNonConsumer == 0 {
isPurchase = true
}
}
}
pageSize = jxutils.FormalizePageSize(pageSize) pageSize = jxutils.FormalizePageSize(pageSize)
if offset < 0 { if offset < 0 {
offset = 0 offset = 0
@@ -393,6 +402,10 @@ func (c *OrderManager) getOrders(ctx *jxcontext.Context, isIncludeSku, isInclude
sqlParams = append(sqlParams, vendorIDs) sqlParams = append(sqlParams, vendorIDs)
} }
} }
if isPurchase {
sqlWhere += " AND t1.user_id = ?"
sqlParams = append(sqlParams, userID)
}
db := dao.GetDB() db := dao.GetDB()
sql += sqlWhere sql += sqlWhere
if isIncludeSku { if isIncludeSku {

View File

@@ -7,6 +7,7 @@ import (
"git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/baseapi/utils/errlist" "git.rosy.net.cn/baseapi/utils/errlist"
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
"git.rosy.net.cn/jx-callback/business/jxutils" "git.rosy.net.cn/jx-callback/business/jxutils"
"git.rosy.net.cn/jx-callback/business/partner" "git.rosy.net.cn/jx-callback/business/partner"
"git.rosy.net.cn/jx-callback/globals" "git.rosy.net.cn/jx-callback/globals"
@@ -937,3 +938,101 @@ func DeleteSkusFromAct(ctx *jxcontext.Context, vendorID int, skuIDs []int, isAsy
} }
return hint, err return hint, err
} }
func ForceUpdateVendorPrice(ctx *jxcontext.Context, vendorID int, actType int, storeSkuList []*ActStoreSkuParam, isAsync bool) (hint string, err error) {
var wrongSkuList []*ActStoreSkuParam
var storeSkuBindList []*model.StoreSkuBind
db := dao.GetDB()
errList := errlist.New()
for _, v := range storeSkuList {
storeSkuBind := &model.StoreSkuBind{
StoreID: v.StoreID,
SkuID: v.SkuID,
}
storeSkuBind.DeletedAt = utils.DefaultTimeValue
if err = dao.GetEntity(db, storeSkuBind, model.FieldStoreID, model.FieldSkuID, model.FieldDeletedAt); err == nil {
if v.VendorPrice != 0 {
if err2 := checkDiscountValidation(actType, float64(v.ActualActPrice)*100/float64(v.VendorPrice)); err2 != nil {
v.ErrMsg = err2.Error()
wrongSkuList = append(wrongSkuList, v)
storeSkuBind = nil
}
} else {
vendorPrice := dao.GetStoreSkuBindVendorPrice(storeSkuBind, vendorID)
if checkDiscountValidation(actType, float64(v.ActualActPrice)*100/float64(vendorPrice)) != nil {
if actType == model.ActSkuSecKill {
vendorPrice = int(v.ActualActPrice)*100/maxDiscount4SkuSecKill + 10
} else if actType == model.ActSkuDirectDown {
vendorPrice = int(v.ActualActPrice) + 10
}
dao.SetStoreSkuBindVendorPrice(storeSkuBind, vendorID, vendorPrice)
if vendorID != model.VendorIDJX {
dao.SetStoreSkuBindSyncStatus(storeSkuBind, vendorID, dao.GetStoreSkuBindSyncStatus(storeSkuBind, vendorID)|model.SyncFlagPriceMask)
}
storeSkuBind.LastOperator = ctx.GetUserName()
}
}
if storeSkuBind != nil {
storeSkuBindList = append(storeSkuBindList, storeSkuBind)
}
} else {
errList.AddErr(err)
}
}
if err = errList.GetErrListAsOne(); err != nil {
return "", err
}
if len(wrongSkuList) > 0 {
return "", jsonerr.New(wrongSkuList, model.ErrCodeJsonActPriceTooLarger)
}
storeVendorIDMap := make(map[int]string)
storeSkuIDMap := make(map[int][]int)
task := tasksch.NewSeqTask2(fmt.Sprintf("强制刷新门店商品%s平台价", model.VendorChineseNames[vendorID]), ctx, false,
func(task *tasksch.SeqTask, step int, params ...interface{}) (result interface{}, err error) {
switch step {
case 0:
errList := errlist.New()
for _, storeSkuBind := range storeSkuBindList {
if _, err2 := dao.UpdateEntity(db, storeSkuBind); err2 == nil {
if storeVendorIDMap[storeSkuBind.StoreID] == "" {
if storeDetail, err2 := dao.GetStoreDetail(db, storeSkuBind.StoreID, vendorID); err2 == nil {
storeVendorIDMap[storeSkuBind.StoreID] = storeDetail.VendorStoreID
}
}
storeSkuIDMap[storeSkuBind.StoreID] = append(storeSkuIDMap[storeSkuBind.StoreID], storeSkuBind.SkuID)
errList.AddErr(err2)
}
}
err = errList.GetErrListAsOne()
case 1:
if vendorID != model.VendorIDJX && len(storeVendorIDMap) > 0 {
var storeIDs []int
for storeID := range storeVendorIDMap {
storeIDs = append(storeIDs, storeID)
}
subTask := tasksch.NewParallelTask("同步平台价格", tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx,
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
storeID := batchItemList[0].(int)
_, err = cms.SyncStoreSkuNew2(ctx, task, vendorID, storeID, storeVendorIDMap[storeID], nil, storeSkuIDMap[storeID], nil, true, false, true)
return retVal, err
}, storeIDs)
tasksch.HandleTask(subTask, task, true).Run()
_, err = subTask.GetResult(0)
}
}
return result, err
}, 2)
tasksch.HandleTask(task, nil, true).Run()
if isAsync {
hint = task.GetID()
} else {
_, err2 := task.GetResult(0)
if err = err2; err == nil {
hint = utils.Int2Str(1)
}
}
return hint, err
}

View File

@@ -185,7 +185,22 @@ func TestAddActStoreBind(t *testing.T) {
} }
func TestSyncAct(t *testing.T) { func TestSyncAct(t *testing.T) {
_, err := SyncAct(jxcontext.AdminCtx, nil, 1, nil, nil, nil, false) _, err := SyncAct(jxcontext.AdminCtx, nil, 1, nil, false)
if err != nil {
t.Fatal(err)
}
}
func TestForceUpdateVendorPrice(t *testing.T) {
_, err := ForceUpdateVendorPrice(jxcontext.AdminCtx, model.VendorIDJD, model.ActSkuDirectDown, []*ActStoreSkuParam{
&ActStoreSkuParam{
ActStoreSku: model.ActStoreSku{
StoreID: 100118,
SkuID: 22509,
},
ActualActPrice: 9900,
},
}, false)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }

View File

@@ -98,6 +98,8 @@ func InitServiceInfo(version string, buildTime time.Time, gitCommit string) {
"autoSaleAt": AutoSaleAtStr, "autoSaleAt": AutoSaleAtStr,
"userTypeName": model.UserTypeName, "userTypeName": model.UserTypeName,
"storePriceTypeName": model.StorePriceTypeName, "storePriceTypeName": model.StorePriceTypeName,
"payStatusName": model.PayStatusName,
"refundStatusName": model.RefundStatusName,
}, },
} }
} }

View File

@@ -139,6 +139,10 @@ func SyncStoreCategories(ctx *jxcontext.Context, parentTask tasksch.ITask, vendo
} }
func SyncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, vendorID, storeID int, vendorStoreID string, nameIDs, skuIDs, excludeSkuIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) { func SyncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, vendorID, storeID int, vendorStoreID string, nameIDs, skuIDs, excludeSkuIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) {
return SyncStoreSkuNew2(ctx, parentTask, vendorID, storeID, vendorStoreID, nameIDs, skuIDs, excludeSkuIDs, false, isAsync, isContinueWhenError)
}
func SyncStoreSkuNew2(ctx *jxcontext.Context, parentTask tasksch.ITask, vendorID, storeID int, vendorStoreID string, nameIDs, skuIDs, excludeSkuIDs []int, useVendorPriceDirectly, isAsync, isContinueWhenError bool) (hint string, err error) {
singleStoreHandler, _ := partner.GetPurchasePlatformFromVendorID(vendorID).(partner.ISingleStoreStoreSkuHandler) singleStoreHandler, _ := partner.GetPurchasePlatformFromVendorID(vendorID).(partner.ISingleStoreStoreSkuHandler)
if singleStoreHandler != nil { if singleStoreHandler != nil {
if err = CreateStoreCategoryByStoreSku(ctx, vendorID, storeID, vendorStoreID, nameIDs, skuIDs); err != nil { if err = CreateStoreCategoryByStoreSku(ctx, vendorID, storeID, vendorStoreID, nameIDs, skuIDs); err != nil {
@@ -153,7 +157,7 @@ func SyncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, vendorID,
_, err = SyncStoreCategories(ctx, task, vendorID, storeID, vendorStoreID, nameIDs, skuIDs, false, isContinueWhenError) _, err = SyncStoreCategories(ctx, task, vendorID, storeID, vendorStoreID, nameIDs, skuIDs, false, isContinueWhenError)
} }
case 1: case 1:
err = syncStoreSkuNew(ctx, task, false, vendorID, storeID, nameIDs, skuIDs, excludeSkuIDs, isContinueWhenError) err = syncStoreSkuNew(ctx, task, false, vendorID, storeID, nameIDs, skuIDs, excludeSkuIDs, useVendorPriceDirectly, isContinueWhenError)
} }
return result, err return result, err
}, 2) }, 2)
@@ -183,7 +187,7 @@ func FullSyncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, vendo
if singleStoreHandler != nil { if singleStoreHandler != nil {
_, err = SyncStoreSkuNew(ctx, task, vendorID, storeID, vendorStoreID, nil, nil, nil, false, isContinueWhenError) _, err = SyncStoreSkuNew(ctx, task, vendorID, storeID, vendorStoreID, nil, nil, nil, false, isContinueWhenError)
} else { } else {
err = syncStoreSkuNew(ctx, task, true, vendorID, storeID, nil, nil, nil, isContinueWhenError) err = syncStoreSkuNew(ctx, task, true, vendorID, storeID, nil, nil, nil, false, isContinueWhenError)
} }
} }
return retVal, err return retVal, err
@@ -292,7 +296,7 @@ func updateStoreSku(db *dao.DaoDB, vendorID int, storeSkuList []*dao.StoreSkuSyn
return num, err return num, err
} }
func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, isFull bool, vendorID, storeID int, nameIDs, skuIDs, excludeSkuIDs []int, isContinueWhenError bool) (err error) { func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, isFull bool, vendorID, storeID int, nameIDs, skuIDs, excludeSkuIDs []int, useVendorPriceDirectly, isContinueWhenError bool) (err error) {
db := dao.GetDB() db := dao.GetDB()
storeDetail, err := dao.GetStoreDetail(db, storeID, vendorID) storeDetail, err := dao.GetStoreDetail(db, storeID, vendorID)
if err != nil { if err != nil {
@@ -337,6 +341,9 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, isFull bo
} }
now := jxutils.OperationTime2HourMinuteFormat(time.Now()) now := jxutils.OperationTime2HourMinuteFormat(time.Now())
for _, sku := range skus { for _, sku := range skus {
if !useVendorPriceDirectly {
sku.VendorPrice = 0
}
sku.MergedStatus = MergeSkuSaleStatusWithStoreOpTime(sku, storeDetail, now) sku.MergedStatus = MergeSkuSaleStatusWithStoreOpTime(sku, storeDetail, now)
var bareSku *partner.StoreSkuInfo var bareSku *partner.StoreSkuInfo
isNeedReorder := false isNeedReorder := false

View File

@@ -210,6 +210,9 @@ func EarthDistance(lng1, lat1, lng2, lat2 float64) float64 {
lng2 = lng2 * rad lng2 = lng2 * rad
theta := lng2 - lng1 theta := lng2 - lng1
dist := math.Acos(math.Sin(lat1)*math.Sin(lat2) + math.Cos(lat1)*math.Cos(lat2)*math.Cos(theta)) dist := math.Acos(math.Sin(lat1)*math.Sin(lat2) + math.Cos(lat1)*math.Cos(lat2)*math.Cos(theta))
if dist < 0 {
dist = 0
}
return dist * radius return dist * radius
} }

View File

@@ -46,6 +46,7 @@ var (
OrderStatusUnknown: "一般事件", OrderStatusUnknown: "一般事件",
OrderStatusCreated: "待支付",
OrderStatusNew: "新订单", OrderStatusNew: "新订单",
OrderStatusAccepted: "待拣货", OrderStatusAccepted: "待拣货",
OrderStatusFinishedPickup: "待配送", OrderStatusFinishedPickup: "待配送",
@@ -171,8 +172,8 @@ const (
OrderStatusUndoApplyCancel = -10 OrderStatusUndoApplyCancel = -10
OrderStatusApplyCancel = -5 OrderStatusApplyCancel = -5
OrderStatusUnknown = 0 OrderStatusUnknown = 0
OrderStatusCreated = 2 // 已支付
OrderStatusNew = 5 // 新订单,实际是已经支付 OrderStatusNew = 5 // 新订单,实际是已经支付
OrderStatusAccepted = 10 // 已经接单,也即待出库,待拣货 OrderStatusAccepted = 10 // 已经接单,也即待出库,待拣货
OrderStatusFinishedPickup = 15 // 拣货完成 OrderStatusFinishedPickup = 15 // 拣货完成

View File

@@ -698,3 +698,17 @@ func GetRiskOrderCount(db *DaoDB, dayNum int, includeToday bool) (storeOrderList
return storeOrderList, GetRows(db, &storeOrderList, sql, sqlParams) return storeOrderList, GetRows(db, &storeOrderList, sql, sqlParams)
} }
func GetOrderPayList(db *DaoDB, vendorOrderID string, vendorID int) (payList []*model.OrderPay, err error) {
sql := `
SELECT t1.*
FROM order_pay t1
WHERE t1.deleted_at = ? AND t1.vendor_order_id = ? AND t1.vendor_id = ?
`
sqlParams := []interface{}{
utils.DefaultTimeValue,
vendorOrderID,
vendorID,
}
return payList, GetRows(db, &payList, sql, sqlParams)
}

View File

@@ -9,9 +9,12 @@ type PageShopWithPlaceName struct {
CityName string `json:"cityName"` CityName string `json:"cityName"`
DistrictName string `json:"districtName"` DistrictName string `json:"districtName"`
Distance int `json:"distance"`
} }
func QueryPageStores(db *DaoDB, pageSize, offset int, keyword string, vendorStoreID string, vendorID int, orgCode string, cityCode, districtCode int, tel string, minShopScore float32, minRecentOrderNum, minSkuCount int) (pagedInfo *model.PagedInfo, err error) { func QueryPageStores(db *DaoDB, pageSize, offset int, keyword string, vendorStoreID string, vendorID int, orgCode string,
cityCode, districtCode int, tel string, minShopScore float32, minRecentOrderNum, minSkuCount int,
lng1, lat1, lng2, lat2 float64) (pagedInfo *model.PagedInfo, err error) {
sql := ` sql := `
SELECT SQL_CALC_FOUND_ROWS SELECT SQL_CALC_FOUND_ROWS
t1.*, t1.*,
@@ -59,6 +62,10 @@ func QueryPageStores(db *DaoDB, pageSize, offset int, keyword string, vendorStor
sql += " AND t1.sku_count >= ?" sql += " AND t1.sku_count >= ?"
sqlParams = append(sqlParams, minSkuCount) sqlParams = append(sqlParams, minSkuCount)
} }
if lng1 > 0 {
sql += " AND t1.lng >= ? AND t1.lat >= ? AND t1.lng <= ? AND t1.lat <= ?"
sqlParams = append(sqlParams, lng1, lat1, lng2, lat2)
}
if keyword != "" { if keyword != "" {
keywordLike := "%" + keyword + "%" keywordLike := "%" + keyword + "%"
sql += " AND (t1.name LIKE ? OR t1.tel1 LIKE ? OR t1.tel2 LIKE ? OR t1.org_code LIKE ? OR t1.address LIKE ? OR t2.name LIKE ? OR t3.name LIKE ? OR t1.licence_code LIKE ?" sql += " AND (t1.name LIKE ? OR t1.tel1 LIKE ? OR t1.tel2 LIKE ? OR t1.org_code LIKE ? OR t1.address LIKE ? OR t2.name LIKE ? OR t3.name LIKE ? OR t1.licence_code LIKE ?"
@@ -70,9 +77,7 @@ func QueryPageStores(db *DaoDB, pageSize, offset int, keyword string, vendorStor
LIMIT ? OFFSET ? LIMIT ? OFFSET ?
` `
pageSize = FormalizePageSize(pageSize) pageSize = FormalizePageSize(pageSize)
if offset < 0 { offset = FormalizePageOffset(offset)
offset = 0
}
sqlParams = append(sqlParams, pageSize, offset) sqlParams = append(sqlParams, pageSize, offset)
var shopList []*PageShopWithPlaceName var shopList []*PageShopWithPlaceName
Begin(db) Begin(db)

View File

@@ -219,8 +219,9 @@ func GetStoreSkus2(db *DaoDB, vendorID, storeID int, skuIDs []int, mustDirty boo
} }
fieldPrefix := ConvertDBFieldPrefix(model.VendorNames[vendorID]) fieldPrefix := ConvertDBFieldPrefix(model.VendorNames[vendorID])
sql := ` sql := `
SELECT t1.id bind_id, t1.sku_id, t1.price, t1.unit_price, t1.status store_sku_status, %s.%s_id vendor_sku_id, SELECT t1.id bind_id, t1.sku_id, t1.price, t1.unit_price, t1.status store_sku_status,
t1.%s_sync_status store_sku_sync_status, t1.store_id, t1.deleted_at bind_deleted_at,t1.status_sale_begin,t1.status_sale_end, %s.%s_id vendor_sku_id, t1.%s_sync_status store_sku_sync_status, t1.%s_price vendor_price,
t1.store_id, t1.deleted_at bind_deleted_at,t1.status_sale_begin,t1.status_sale_end,
t2.*, t2.*,
t3.id name_id, t3.prefix, t3.name, t3.unit, t3.upc, t3.id name_id, t3.prefix, t3.name, t3.unit, t3.upc,
IF(t11.%s <> '', t11.%s, t3.img) img, IF(t11.%s <> '', t11.%s, t3.img) img,
@@ -228,7 +229,7 @@ func GetStoreSkus2(db *DaoDB, vendorID, storeID int, skuIDs []int, mustDirty boo
t13.%s desc_img, t13.%s desc_img,
t4.%s_category_id vendor_vendor_cat_id` t4.%s_category_id vendor_vendor_cat_id`
fmtParams := []interface{}{ fmtParams := []interface{}{
tableName, fieldPrefix, fieldPrefix, tableName, fieldPrefix, fieldPrefix, fieldPrefix,
GetDataResFieldName(vendorID), GetDataResFieldName(vendorID), GetDataResFieldName(vendorID), GetDataResFieldName(vendorID),
GetDataResFieldName(vendorID), GetDataResFieldName(vendorID), GetDataResFieldName(vendorID), GetDataResFieldName(vendorID),
GetDataResFieldName(vendorID), GetDataResFieldName(vendorID),
@@ -661,3 +662,53 @@ func GetStoreSkusByNameIDs(db *DaoDB, storeIDs []int, nameID int) (skuList []*St
err = GetRows(db, &skuList, sql, sqlParams...) err = GetRows(db, &skuList, sql, sqlParams...)
return skuList, err return skuList, err
} }
func SetStoreSkuBindVendorPrice(storeSkuBind *model.StoreSkuBind, vendorID int, vendorPrice int) {
switch vendorID {
case model.VendorIDJD:
storeSkuBind.JdPrice = vendorPrice
case model.VendorIDMTWM:
storeSkuBind.MtwmPrice = vendorPrice
case model.VendorIDEBAI:
storeSkuBind.EbaiPrice = vendorPrice
case model.VendorIDJX:
storeSkuBind.JxPrice = vendorPrice
}
}
func GetStoreSkuBindVendorPrice(storeSkuBind *model.StoreSkuBind, vendorID int) (vendorPrice int) {
switch vendorID {
case model.VendorIDJD:
vendorPrice = storeSkuBind.JdPrice
case model.VendorIDMTWM:
vendorPrice = storeSkuBind.MtwmPrice
case model.VendorIDEBAI:
vendorPrice = storeSkuBind.EbaiPrice
case model.VendorIDJX:
vendorPrice = storeSkuBind.JxPrice
}
return vendorPrice
}
func SetStoreSkuBindSyncStatus(storeSkuBind *model.StoreSkuBind, vendorID int, syncStatus int8) {
switch vendorID {
case model.VendorIDJD:
storeSkuBind.JdSyncStatus = syncStatus
case model.VendorIDMTWM:
storeSkuBind.MtwmSyncStatus = syncStatus
case model.VendorIDEBAI:
storeSkuBind.EbaiSyncStatus = syncStatus
}
}
func GetStoreSkuBindSyncStatus(storeSkuBind *model.StoreSkuBind, vendorID int) (syncStatus int8) {
switch vendorID {
case model.VendorIDJD:
syncStatus = storeSkuBind.JdSyncStatus
case model.VendorIDMTWM:
syncStatus = storeSkuBind.MtwmSyncStatus
case model.VendorIDEBAI:
syncStatus = storeSkuBind.EbaiSyncStatus
}
return syncStatus
}

View File

@@ -11,9 +11,31 @@ const (
const ( const (
PayTypeWX = 1 // 微信支付 PayTypeWX = 1 // 微信支付
PayStatusNo = 0 PayStatusNo = 0
PayStatusYes = 1 PayStatusYes = 1
PayStatusFailed = 2 PayStatusFailed = 2
PayStatusCanceled = 3
PayStatusRefund = 4
RefundStatusNo = 0
RefundStatusYes = 1
RefundStatusFailed = 2
)
var (
PayStatusName = map[int]string{
PayStatusNo: "待支付",
PayStatusYes: "已支付",
PayStatusFailed: "支付失败",
PayStatusCanceled: "支付取消",
PayStatusRefund: "已退款",
}
RefundStatusName = map[int]string{
RefundStatusNo: "待退款",
RefundStatusYes: "已退款",
RefundStatusFailed: "退款失败",
}
) )
type ModelTimeInfo struct { type ModelTimeInfo struct {

View File

@@ -198,7 +198,7 @@ func createSkuAct(ctx *jxcontext.Context, act *model.Act2, actStoreSku []*model.
if err = err2; err == nil { if err = err2; err == nil {
vendorActID = utils.Int64ToStr(infoID) vendorActID = utils.Int64ToStr(infoID)
if err = CreatePromotionRules(act.Type, infoID, "", act.LimitUser, act.LimitUser, act.LimitCount, 1, traceInfo); err == nil { if err = CreatePromotionRules(act.Type, infoID, "", act.LimitUser, act.LimitUser, act.LimitCount, 1, traceInfo); err == nil {
if _, err = CreatePromotionSku(act.Type, infoID, "", storeSku2Jd(actStoreSku, model.IsSyncStatusNeedCreate), traceInfo); err == nil { if _, err = CreatePromotionSku(act.Type, infoID, utils.Int2Str(act.ID), storeSku2Jd(actStoreSku, model.IsSyncStatusNeedCreate), traceInfo); err == nil {
if err = ConfirmPromotion(act.Type, infoID, "", traceInfo); err == nil { if err = ConfirmPromotion(act.Type, infoID, "", traceInfo); err == nil {
for _, v := range actStoreSku { for _, v := range actStoreSku {
v.VendorActID = vendorActID v.VendorActID = vendorActID

View File

@@ -8,13 +8,13 @@ import (
"time" "time"
"git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/baseapi/utils/errlist"
"git.rosy.net.cn/jx-callback/business/jxutils" "git.rosy.net.cn/jx-callback/business/jxutils"
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext" "git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
"git.rosy.net.cn/jx-callback/business/model" "git.rosy.net.cn/jx-callback/business/model"
"git.rosy.net.cn/jx-callback/business/model/dao" "git.rosy.net.cn/jx-callback/business/model/dao"
"git.rosy.net.cn/jx-callback/business/partner" "git.rosy.net.cn/jx-callback/business/partner"
"git.rosy.net.cn/jx-callback/business/partner/delivery" "git.rosy.net.cn/jx-callback/business/partner/delivery"
"git.rosy.net.cn/jx-callback/globals"
) )
const ( const (
@@ -112,6 +112,7 @@ func CreateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64,
outJxOrder.OrderID = GenOrderNo(ctx) outJxOrder.OrderID = GenOrderNo(ctx)
order, err2 := jxOrder2GoodsOrder(ctx, outJxOrder, deliveryAddress) order, err2 := jxOrder2GoodsOrder(ctx, outJxOrder, deliveryAddress)
if err = err2; err == nil { if err = err2; err == nil {
order.Status = model.OrderStatusCreated
partner.CurOrderManager.OnOrderNew(order, model.Order2Status(order)) partner.CurOrderManager.OnOrderNew(order, model.Order2Status(order))
} }
} }
@@ -123,9 +124,10 @@ func Pay4Order(ctx *jxcontext.Context, orderID int64, payType int, vendorPayType
if err == nil { if err == nil {
switch payType { switch payType {
case model.PayTypeWX: case model.PayTypeWX:
orderPay, err = pay4OrderByWX(ctx, order, vendorPayType) if orderPay, err = pay4OrderByWX(ctx, order, vendorPayType); err == nil {
dao.WrapAddIDCULDEntity(orderPay, ctx.GetUserName()) dao.WrapAddIDCULDEntity(orderPay, ctx.GetUserName())
err = dao.CreateEntity(dao.GetDB(), orderPay) err = dao.CreateEntity(dao.GetDB(), orderPay)
}
default: default:
err = fmt.Errorf("支付方式:%d当前不支持", payType) err = fmt.Errorf("支付方式:%d当前不支持", payType)
} }
@@ -350,6 +352,7 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64
if outJxOrder.FreightPrice, _, err = delivery.CalculateDeliveryFee(dao.GetDB(), jxOrder.StoreID, "", if outJxOrder.FreightPrice, _, err = delivery.CalculateDeliveryFee(dao.GetDB(), jxOrder.StoreID, "",
jxutils.StandardCoordinate2Int(deliveryAddress.Lng), jxutils.StandardCoordinate2Int(deliveryAddress.Lat), jxutils.StandardCoordinate2Int(deliveryAddress.Lng), jxutils.StandardCoordinate2Int(deliveryAddress.Lat),
model.CoordinateTypeMars, outJxOrder.Weight, checkTime); err == nil { model.CoordinateTypeMars, outJxOrder.Weight, checkTime); err == nil {
outJxOrder.FreightPrice = 0
outJxOrder.TotalPrice = outJxOrder.OrderPrice + outJxOrder.FreightPrice outJxOrder.TotalPrice = outJxOrder.OrderPrice + outJxOrder.FreightPrice
outJxOrder.ActualPayPrice = outJxOrder.TotalPrice outJxOrder.ActualPayPrice = outJxOrder.TotalPrice
} }
@@ -431,29 +434,26 @@ func SelfDeliverDelivered(order *model.GoodsOrder, userName string) (err error)
func CancelOrder(ctx *jxcontext.Context, order *model.GoodsOrder, reason string) (err error) { func CancelOrder(ctx *jxcontext.Context, order *model.GoodsOrder, reason string) (err error) {
if order.Status < model.OrderStatusDelivering { if order.Status < model.OrderStatusDelivering {
orderPay := &model.OrderPay{
VendorOrderID: order.VendorOrderID,
VendorID: jxutils.GetPossibleVendorIDFromVendorOrderID(order.VendorOrderID),
Status: model.PayStatusYes,
}
orderPay.DeletedAt = utils.DefaultTimeValue
db := dao.GetDB() db := dao.GetDB()
if err = dao.GetEntity(db, orderPay, "VendorOrderID", "VendorID", "Status", "DeletedAt"); err == nil || dao.IsNoRowsError(err) { payList, err2 := dao.GetOrderPayList(db, order.VendorOrderID, jxutils.GetPossibleVendorIDFromVendorOrderID(order.VendorOrderID))
if err == nil { if err = err2; err == nil {
refundID := utils.Int64ToStr(GenRefundID(order)) errList := errlist.New()
orderPayRefund, err2 := refundOrderByWX(ctx, orderPay, refundID) for _, orderPay := range payList {
if err = err2; err == nil { if orderPay.Status == model.PayStatusYes {
dao.WrapAddIDCULDEntity(orderPayRefund, ctx.GetUserName()) refundID := utils.Int64ToStr(GenRefundID(order))
err = dao.CreateEntity(dao.GetDB(), orderPay) orderPayRefund, err2 := refundOrderByWX(ctx, orderPay, refundID)
} if err = err2; err == nil {
} else { dao.WrapAddIDCULDEntity(orderPayRefund, ctx.GetUserName())
if order.Status >= model.OrderStatusNew { errList.AddErr(dao.CreateEntity(dao.GetDB(), orderPay))
globals.SugarLogger.Warnf("订单:%s找不到有效的支付方式", order.VendorOrderID) }
} else {
orderPay.Status = model.PayStatusCanceled
_, err2 := dao.UpdateEntity(db, orderPay)
errList.AddErr(err2)
} }
} }
if err == nil { errList.AddErr(changeOrderStatus(order.VendorOrderID, model.OrderStatusCanceled, reason))
err = changeOrderStatus(order.VendorOrderID, model.OrderStatusCanceled, reason) err = errList.GetErrListAsOne()
}
} }
} else { } else {
err = fmt.Errorf("当前订单状态:%s不允许取消", model.OrderStatusName[order.Status]) err = fmt.Errorf("当前订单状态:%s不允许取消", model.OrderStatusName[order.Status])
@@ -475,3 +475,9 @@ func changeOrderStatus(vendorOrderID string, status int, remark string) (err err
} }
return partner.CurOrderManager.OnOrderStatusChanged(orderStatus) return partner.CurOrderManager.OnOrderStatusChanged(orderStatus)
} }
func GetOrderPay(ctx *jxcontext.Context, vendorOrderID string) (payList []*model.OrderPay, err error) {
db := dao.GetDB()
payList, err = dao.GetOrderPayList(db, vendorOrderID, jxutils.GetPossibleVendorIDFromVendorOrderID(vendorOrderID))
return payList, err
}

View File

@@ -1,6 +1,7 @@
package localjx package localjx
import ( import (
"fmt"
"time" "time"
"git.rosy.net.cn/baseapi/platformapi/wxpay" "git.rosy.net.cn/baseapi/platformapi/wxpay"
@@ -18,10 +19,14 @@ func vendorPayType2WxpayType(vendorPayType string) string {
return vendorPayType return vendorPayType
} }
func getOrderBrief(order *model.GoodsOrder) string {
return fmt.Sprintf("%s等共%d件商品", order.Skus[0].SkuName, order.GoodsCount)
}
func pay4OrderByWX(ctx *jxcontext.Context, order *model.GoodsOrder, vendorPayType string) (orderPay *model.OrderPay, err error) { func pay4OrderByWX(ctx *jxcontext.Context, order *model.GoodsOrder, vendorPayType string) (orderPay *model.OrderPay, err error) {
payCreatedAt := time.Now() payCreatedAt := time.Now()
param := &wxpay.CreateOrderParam{ param := &wxpay.CreateOrderParam{
Body: "", Body: getOrderBrief(order),
NotifyURL: globals.WxpayNotifyURL, NotifyURL: globals.WxpayNotifyURL,
OutTradeNo: order.VendorOrderID, OutTradeNo: order.VendorOrderID,
SpbillCreateIP: ctx.GetRealRemoteIP(), SpbillCreateIP: ctx.GetRealRemoteIP(),
@@ -94,15 +99,27 @@ func onWxpayRefund(msg *wxpay.RefundResultMsg) (err error) {
db := dao.GetDB() db := dao.GetDB()
if err = dao.GetEntity(db, orderPayRefund, "RefundID"); err == nil { if err = dao.GetEntity(db, orderPayRefund, "RefundID"); err == nil {
if msg.ResultCode == wxpay.ResponseCodeSuccess { if msg.ResultCode == wxpay.ResponseCodeSuccess {
orderPayRefund.Status = model.PayStatusYes orderPayRefund.Status = model.RefundStatusYes
} else { } else {
orderPayRefund.Status = model.PayStatusFailed orderPayRefund.Status = model.RefundStatusFailed
} }
orderPayRefund.OriginalData = utils.Format4Output(msg, true) orderPayRefund.OriginalData = utils.Format4Output(msg, true)
dao.UpdateEntity(db, orderPayRefund) dao.UpdateEntity(db, orderPayRefund)
} else if dao.IsNoRowsError(err) { } else if dao.IsNoRowsError(err) {
globals.SugarLogger.Warnf("收到异常的退款事件, msg:%s", utils.Format4Output(msg, true)) globals.SugarLogger.Warnf("收到异常的退款事件, msg:%s", utils.Format4Output(msg, true))
} }
orderPay := &model.OrderPay{
VendorOrderID: orderPayRefund.VendorOrderID,
VendorID: jxutils.GetPossibleVendorIDFromVendorOrderID(orderPayRefund.VendorOrderID),
PayType: model.PayTypeWX,
Status: model.PayStatusYes,
}
orderPay.DeletedAt = utils.DefaultTimeValue
if err = dao.GetEntity(db, orderPay, "VendorOrderID", "VendorID", "PayType", "Status", "DeletedAt"); err == nil {
orderPay.Status = model.PayStatusRefund
dao.UpdateEntity(db, orderPay)
}
return err return err
} }
@@ -120,7 +137,7 @@ func refundOrderByWX(ctx *jxcontext.Context, orderPay *model.OrderPay, refundID
VendorRefundID: result.RefundID, VendorRefundID: result.RefundID,
VendorOrderID: orderPay.VendorOrderID, VendorOrderID: orderPay.VendorOrderID,
VendorID: orderPay.VendorID, VendorID: orderPay.VendorID,
Status: model.PayStatusNo, Status: model.RefundStatusNo,
TransactionID: orderPay.TransactionID, TransactionID: orderPay.TransactionID,
RefundFee: orderPay.TotalFee, RefundFee: orderPay.TotalFee,
RefundCreatedAt: time.Now(), RefundCreatedAt: time.Now(),

View File

@@ -300,3 +300,23 @@ func (c *ActController) DeleteSkusFromAct() {
return retVal, "", err return retVal, "", err
}) })
} }
// @Title 强制更新商品平台价
// @Description 强制更新商品平台价
// @Param token header string true "认证token"
// @Param type formData int true "活动类型3直降4秒杀美团当前不支持秒杀"
// @Param vendorID formData int true "厂商ID当前只支持京东0京西用于记录活动信息9"
// @Param actStoreSkuList formData string true "活动门店商品信息"
// @Param isAsync formData bool false "是否异步,缺省否(暂时只支持同步)"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /ForceUpdateVendorPrice [post]
func (c *ActController) ForceUpdateVendorPrice() {
c.callForceUpdateVendorPrice(func(params *tActForceUpdateVendorPriceParams) (retVal interface{}, errCode string, err error) {
var actStoreSkuList []*act.ActStoreSkuParam
if err = jxutils.Strings2Objs(params.ActStoreSkuList, &actStoreSkuList); err == nil {
act.ForceUpdateVendorPrice(params.Ctx, params.VendorID, params.Type, actStoreSkuList, params.IsAsync)
}
return retVal, "", err
})
}

View File

@@ -279,6 +279,7 @@ func (c *OrderController) ExportMTWaybills() {
// @Param isJxFirst query bool false "排序是否京西订单优先(缺省为否)" // @Param isJxFirst query bool false "排序是否京西订单优先(缺省为否)"
// @Param adjustCount query int false "最小调整次数" // @Param adjustCount query int false "最小调整次数"
// @Param mustInvoice query bool false "是否必须要求开发票" // @Param mustInvoice query bool false "是否必须要求开发票"
// @Param isPurchase query bool false "是否是用户自已的订单如果角色只有consumer会被强制设为true"
// @Param offset query int false "结果起始序号以0开始缺省为0" // @Param offset query int false "结果起始序号以0开始缺省为0"
// @Param pageSize query int false "结果页大小缺省为50-1表示全部" // @Param pageSize query int false "结果页大小缺省为50-1表示全部"
// @Success 200 {object} controllers.CallResult // @Success 200 {object} controllers.CallResult

View File

@@ -58,3 +58,17 @@ func (c *JxOrderController) GetAvailableDeliverTime() {
return retVal, "", err return retVal, "", err
}) })
} }
// @Title 得到一个订单的支付信息
// @Description 得到一个订单的支付信息
// @Param token header string true "认证token"
// @Param vendorOrderID query string true "订单号,如果此项不为空,忽略其它所有查询条件"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /GetOrderPay [get]
func (c *JxOrderController) GetOrderPay() {
c.callGetOrderPay(func(params *tJxorderGetOrderPayParams) (retVal interface{}, errCode string, err error) {
retVal, err = localjx.GetOrderPay(params.Ctx, params.VendorOrderID)
return retVal, "", err
})
}

View File

@@ -1,7 +1,12 @@
package controllers package controllers
import ( import (
"fmt"
"sort"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxutils" "git.rosy.net.cn/jx-callback/business/jxutils"
"git.rosy.net.cn/jx-callback/business/model"
"git.rosy.net.cn/jx-callback/business/model/dao" "git.rosy.net.cn/jx-callback/business/model/dao"
"git.rosy.net.cn/jx-callback/business/netspider" "git.rosy.net.cn/jx-callback/business/netspider"
"github.com/astaxie/beego" "github.com/astaxie/beego"
@@ -49,6 +54,9 @@ func (c *NetSpiderController) GetAndStoreCitiesShops() {
// @Param minShopScore query float64 false "门店分值最小值" // @Param minShopScore query float64 false "门店分值最小值"
// @Param minRecentOrderNum query int false "最近单量最小值" // @Param minRecentOrderNum query int false "最近单量最小值"
// @Param minSkuCount query int false "SKU数量最小值" // @Param minSkuCount query int false "SKU数量最小值"
// @Param radius query int false "关注点半径(米)"
// @Param lng query string false "关注点经度"
// @Param lat query string false "关注点纬度"
// @Success 200 {object} controllers.CallResult // @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult // @Failure 200 {object} controllers.CallResult
// @router /QueryPageStores [get] // @router /QueryPageStores [get]
@@ -57,7 +65,74 @@ func (c *NetSpiderController) QueryPageStores() {
if params.MapData["vendorID"] == nil { if params.MapData["vendorID"] == nil {
params.VendorID = -1 params.VendorID = -1
} }
retVal, err = dao.QueryPageStores(dao.GetDB(), params.PageSize, params.Offset, params.Keyword, params.VendorStoreID, params.VendorID, params.OrgCode, params.CityCode, params.DistrictCode, params.Tel, float32(params.MinShopScore), params.MinRecentOrderNum, params.MinSkuCount) var lng, lat, lng1, lat1, lng2, lat2 float64
params.Offset = dao.FormalizePageOffset(params.Offset)
params.PageSize = dao.FormalizePageSize(params.PageSize)
offset := params.Offset
pageSize := params.PageSize
if params.Radius > 0 {
lng = utils.Str2Float64WithDefault(params.Lng, 0)
lat = utils.Str2Float64WithDefault(params.Lat, 0)
if lng == 0 || lat == 0 {
return nil, "", fmt.Errorf("坐标信息%s,%s不合法", params.Lng, params.Lat)
}
lng2, _ = jxutils.ConvertDistanceToLogLat(lng, lat, float64(params.Radius), 90)
_, lat2 = jxutils.ConvertDistanceToLogLat(lng, lat, float64(params.Radius), 0)
lng1 = lng - (lng2 - lng)
lat1 = lat - (lat2 - lat)
offset = 0
pageSize = model.UnlimitedPageSize
}
pagedInfo, err := dao.QueryPageStores(dao.GetDB(), pageSize, offset, params.Keyword, params.VendorStoreID, params.VendorID, params.OrgCode,
params.CityCode, params.DistrictCode, params.Tel, float32(params.MinShopScore), params.MinRecentOrderNum, params.MinSkuCount,
lng1, lat1, lng2, lat2)
if err == nil {
if params.Radius > 0 && (params.Offset != 0 || params.PageSize != model.UnlimitedPageSize) {
shopList2, _ := pagedInfo.Data.([]*dao.PageShopWithPlaceName)
var shopList []*dao.PageShopWithPlaceName
pagedInfo.TotalCount = 0
if len(shopList2) > 0 {
for _, v := range shopList2 {
v.Distance = int(jxutils.EarthDistance(v.Lng, v.Lat, lng, lat) * 1000)
if v.Distance < 0 {
v.Distance = 0
}
if v.Distance <= params.Radius {
shopList = append(shopList, v)
}
}
pagedInfo.TotalCount = len(shopList)
if pagedInfo.TotalCount > 0 {
sort.Sort(PageShopList(shopList))
if params.Offset < len(shopList) {
index := params.Offset + params.PageSize
if index > len(shopList) {
index = len(shopList)
}
shopList = shopList[params.Offset:index]
} else {
shopList = nil
}
}
}
pagedInfo.Data = shopList
}
retVal = pagedInfo
}
return retVal, "", err return retVal, "", err
}) })
} }
type PageShopList []*dao.PageShopWithPlaceName
func (l PageShopList) Len() int {
return len(l)
}
func (l PageShopList) Less(i, j int) bool {
return l[i].Distance < l[j].Distance
}
func (l PageShopList) Swap(i, j int) {
l[i], l[j] = l[j], l[i]
}

View File

@@ -74,8 +74,7 @@ func Init() {
if !beego.AppConfig.DefaultBool("disableJd", false) { if !beego.AppConfig.DefaultBool("disableJd", false) {
JdAPI = jdapi.New(beego.AppConfig.String("jdToken"), beego.AppConfig.String("jdAppKey"), beego.AppConfig.String("jdSecret")) JdAPI = jdapi.New(beego.AppConfig.String("jdToken"), beego.AppConfig.String("jdAppKey"), beego.AppConfig.String("jdSecret"))
cookieValue := beego.AppConfig.DefaultString("jdStorePageCookie", "") cookieValue := beego.AppConfig.DefaultString("jdStorePageCookie", "")
JdAPI.SetCookie("shop.o2o.jd.com1", cookieValue) JdAPI.SetJdCookie(cookieValue)
JdAPI.SetCookie("lsp-store1.jddj.com", cookieValue)
conf := platformapi.NewDefAPIConfig() conf := platformapi.NewDefAPIConfig()
conf.MaxSleepSecondWhenExceedLimit = 60 * 30 // 最大重试间隙30分钟 conf.MaxSleepSecondWhenExceedLimit = 60 * 30 // 最大重试间隙30分钟

View File

@@ -34,6 +34,15 @@ func init() {
Filters: nil, Filters: nil,
Params: nil}) Params: nil})
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:ActController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:ActController"],
beego.ControllerComments{
Method: "ForceUpdateVendorPrice",
Router: `/ForceUpdateVendorPrice`,
AllowHTTPMethods: []string{"post"},
MethodParams: param.Make(),
Filters: nil,
Params: nil})
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:ActController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:ActController"], beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:ActController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:ActController"],
beego.ControllerComments{ beego.ControllerComments{
Method: "GetActStoreSkuInfo", Method: "GetActStoreSkuInfo",
@@ -601,6 +610,15 @@ func init() {
Filters: nil, Filters: nil,
Params: nil}) Params: nil})
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JxOrderController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JxOrderController"],
beego.ControllerComments{
Method: "GetOrderPay",
Router: `/GetOrderPay`,
AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),
Filters: nil,
Params: nil})
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JxOrderController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JxOrderController"], beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JxOrderController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:JxOrderController"],
beego.ControllerComments{ beego.ControllerComments{
Method: "Pay4Order", Method: "Pay4Order",