Merge remote-tracking branch 'origin/mark' into su
This commit is contained in:
@@ -474,20 +474,25 @@ func (c *OrderManager) addOrderStatus(orderStatus *model.OrderStatus, db *dao.Da
|
||||
order.VendorStatus = orderStatus.VendorStatus
|
||||
updateFields := []string{
|
||||
"VendorStatus",
|
||||
"UpdatedAt",
|
||||
}
|
||||
if model.IsOrderMainStatus(orderStatus.Status) {
|
||||
order.Status = orderStatus.Status
|
||||
order.StatusTime = orderStatus.StatusTime
|
||||
updateFields = append(updateFields, "Status", "StatusTime")
|
||||
if order.LockStatus != model.OrderStatusUnknown {
|
||||
order.LockStatus = model.OrderStatusUnknown
|
||||
updateFields = append(updateFields, "LockStatus")
|
||||
if model.IsOrderFinalStatus(orderStatus.Status) {
|
||||
order.OrderFinishedAt = orderStatus.StatusTime
|
||||
updateFields = append(updateFields, "OrderFinishedAt")
|
||||
if order.LockStatus != model.OrderStatusUnknown {
|
||||
order.LockStatus = model.OrderStatusUnknown
|
||||
updateFields = append(updateFields, "LockStatus")
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if model.IsOrderUnlockStatus(orderStatus.Status) {
|
||||
order.LockStatus = model.OrderStatusUnknown
|
||||
updateFields = append(updateFields, "LockStatus")
|
||||
} else if !model.IsOrderFinalStatus(orderStatus.Status) {
|
||||
} else if model.IsOrderLockStatus(orderStatus.Status) {
|
||||
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)
|
||||
}
|
||||
@@ -497,10 +502,6 @@ func (c *OrderManager) addOrderStatus(orderStatus *model.OrderStatus, db *dao.Da
|
||||
updateFields = append(updateFields, "LockStatus", "LockStatusTime", "Flag")
|
||||
}
|
||||
}
|
||||
if model.IsOrderFinalStatus(orderStatus.Status) {
|
||||
order.OrderFinishedAt = orderStatus.StatusTime
|
||||
updateFields = append(updateFields, "OrderFinishedAt")
|
||||
}
|
||||
utils.CallFuncLogError(func() error {
|
||||
_, err = db.Db.Update(order, updateFields...)
|
||||
return err
|
||||
|
||||
@@ -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) {
|
||||
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)
|
||||
if offset < 0 {
|
||||
offset = 0
|
||||
@@ -393,6 +402,10 @@ func (c *OrderManager) getOrders(ctx *jxcontext.Context, isIncludeSku, isInclude
|
||||
sqlParams = append(sqlParams, vendorIDs)
|
||||
}
|
||||
}
|
||||
if isPurchase {
|
||||
sqlWhere += " AND t1.user_id = ?"
|
||||
sqlParams = append(sqlParams, userID)
|
||||
}
|
||||
db := dao.GetDB()
|
||||
sql += sqlWhere
|
||||
if isIncludeSku {
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"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/partner"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
@@ -937,3 +938,101 @@ func DeleteSkusFromAct(ctx *jxcontext.Context, vendorID int, skuIDs []int, isAsy
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
@@ -185,7 +185,22 @@ func TestAddActStoreBind(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 {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -98,6 +98,8 @@ func InitServiceInfo(version string, buildTime time.Time, gitCommit string) {
|
||||
"autoSaleAt": AutoSaleAtStr,
|
||||
"userTypeName": model.UserTypeName,
|
||||
"storePriceTypeName": model.StorePriceTypeName,
|
||||
"payStatusName": model.PayStatusName,
|
||||
"refundStatusName": model.RefundStatusName,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
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)
|
||||
if singleStoreHandler != 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)
|
||||
}
|
||||
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
|
||||
}, 2)
|
||||
@@ -183,7 +187,7 @@ func FullSyncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, vendo
|
||||
if singleStoreHandler != nil {
|
||||
_, err = SyncStoreSkuNew(ctx, task, vendorID, storeID, vendorStoreID, nil, nil, nil, false, isContinueWhenError)
|
||||
} 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
|
||||
@@ -292,7 +296,7 @@ func updateStoreSku(db *dao.DaoDB, vendorID int, storeSkuList []*dao.StoreSkuSyn
|
||||
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()
|
||||
storeDetail, err := dao.GetStoreDetail(db, storeID, vendorID)
|
||||
if err != nil {
|
||||
@@ -337,6 +341,9 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, isFull bo
|
||||
}
|
||||
now := jxutils.OperationTime2HourMinuteFormat(time.Now())
|
||||
for _, sku := range skus {
|
||||
if !useVendorPriceDirectly {
|
||||
sku.VendorPrice = 0
|
||||
}
|
||||
sku.MergedStatus = MergeSkuSaleStatusWithStoreOpTime(sku, storeDetail, now)
|
||||
var bareSku *partner.StoreSkuInfo
|
||||
isNeedReorder := false
|
||||
|
||||
@@ -210,6 +210,9 @@ func EarthDistance(lng1, lat1, lng2, lat2 float64) float64 {
|
||||
lng2 = lng2 * rad
|
||||
theta := lng2 - lng1
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ var (
|
||||
|
||||
OrderStatusUnknown: "一般事件",
|
||||
|
||||
OrderStatusCreated: "待支付",
|
||||
OrderStatusNew: "新订单",
|
||||
OrderStatusAccepted: "待拣货",
|
||||
OrderStatusFinishedPickup: "待配送",
|
||||
@@ -171,8 +172,8 @@ const (
|
||||
OrderStatusUndoApplyCancel = -10
|
||||
OrderStatusApplyCancel = -5
|
||||
|
||||
OrderStatusUnknown = 0
|
||||
|
||||
OrderStatusUnknown = 0
|
||||
OrderStatusCreated = 2 // 已支付
|
||||
OrderStatusNew = 5 // 新订单,实际是已经支付
|
||||
OrderStatusAccepted = 10 // 已经接单,也即待出库,待拣货
|
||||
OrderStatusFinishedPickup = 15 // 拣货完成
|
||||
|
||||
@@ -698,3 +698,17 @@ func GetRiskOrderCount(db *DaoDB, dayNum int, includeToday bool) (storeOrderList
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
@@ -9,9 +9,12 @@ type PageShopWithPlaceName struct {
|
||||
|
||||
CityName string `json:"cityName"`
|
||||
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 := `
|
||||
SELECT SQL_CALC_FOUND_ROWS
|
||||
t1.*,
|
||||
@@ -59,6 +62,10 @@ func QueryPageStores(db *DaoDB, pageSize, offset int, keyword string, vendorStor
|
||||
sql += " AND t1.sku_count >= ?"
|
||||
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 != "" {
|
||||
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 ?"
|
||||
@@ -70,9 +77,7 @@ func QueryPageStores(db *DaoDB, pageSize, offset int, keyword string, vendorStor
|
||||
LIMIT ? OFFSET ?
|
||||
`
|
||||
pageSize = FormalizePageSize(pageSize)
|
||||
if offset < 0 {
|
||||
offset = 0
|
||||
}
|
||||
offset = FormalizePageOffset(offset)
|
||||
sqlParams = append(sqlParams, pageSize, offset)
|
||||
var shopList []*PageShopWithPlaceName
|
||||
Begin(db)
|
||||
|
||||
@@ -219,8 +219,9 @@ func GetStoreSkus2(db *DaoDB, vendorID, storeID int, skuIDs []int, mustDirty boo
|
||||
}
|
||||
fieldPrefix := ConvertDBFieldPrefix(model.VendorNames[vendorID])
|
||||
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,
|
||||
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,
|
||||
SELECT t1.id bind_id, t1.sku_id, t1.price, t1.unit_price, t1.status store_sku_status,
|
||||
%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.*,
|
||||
t3.id name_id, t3.prefix, t3.name, t3.unit, t3.upc,
|
||||
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,
|
||||
t4.%s_category_id vendor_vendor_cat_id`
|
||||
fmtParams := []interface{}{
|
||||
tableName, fieldPrefix, fieldPrefix,
|
||||
tableName, fieldPrefix, fieldPrefix, fieldPrefix,
|
||||
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...)
|
||||
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
|
||||
}
|
||||
|
||||
@@ -11,9 +11,31 @@ const (
|
||||
const (
|
||||
PayTypeWX = 1 // 微信支付
|
||||
|
||||
PayStatusNo = 0
|
||||
PayStatusYes = 1
|
||||
PayStatusFailed = 2
|
||||
PayStatusNo = 0
|
||||
PayStatusYes = 1
|
||||
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 {
|
||||
|
||||
@@ -198,7 +198,7 @@ func createSkuAct(ctx *jxcontext.Context, act *model.Act2, actStoreSku []*model.
|
||||
if err = err2; err == nil {
|
||||
vendorActID = utils.Int64ToStr(infoID)
|
||||
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 {
|
||||
for _, v := range actStoreSku {
|
||||
v.VendorActID = vendorActID
|
||||
|
||||
@@ -8,13 +8,13 @@ import (
|
||||
"time"
|
||||
|
||||
"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/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"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/delivery"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -112,6 +112,7 @@ func CreateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64,
|
||||
outJxOrder.OrderID = GenOrderNo(ctx)
|
||||
order, err2 := jxOrder2GoodsOrder(ctx, outJxOrder, deliveryAddress)
|
||||
if err = err2; err == nil {
|
||||
order.Status = model.OrderStatusCreated
|
||||
partner.CurOrderManager.OnOrderNew(order, model.Order2Status(order))
|
||||
}
|
||||
}
|
||||
@@ -123,9 +124,10 @@ func Pay4Order(ctx *jxcontext.Context, orderID int64, payType int, vendorPayType
|
||||
if err == nil {
|
||||
switch payType {
|
||||
case model.PayTypeWX:
|
||||
orderPay, err = pay4OrderByWX(ctx, order, vendorPayType)
|
||||
dao.WrapAddIDCULDEntity(orderPay, ctx.GetUserName())
|
||||
err = dao.CreateEntity(dao.GetDB(), orderPay)
|
||||
if orderPay, err = pay4OrderByWX(ctx, order, vendorPayType); err == nil {
|
||||
dao.WrapAddIDCULDEntity(orderPay, ctx.GetUserName())
|
||||
err = dao.CreateEntity(dao.GetDB(), orderPay)
|
||||
}
|
||||
default:
|
||||
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, "",
|
||||
jxutils.StandardCoordinate2Int(deliveryAddress.Lng), jxutils.StandardCoordinate2Int(deliveryAddress.Lat),
|
||||
model.CoordinateTypeMars, outJxOrder.Weight, checkTime); err == nil {
|
||||
outJxOrder.FreightPrice = 0
|
||||
outJxOrder.TotalPrice = outJxOrder.OrderPrice + outJxOrder.FreightPrice
|
||||
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) {
|
||||
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()
|
||||
if err = dao.GetEntity(db, orderPay, "VendorOrderID", "VendorID", "Status", "DeletedAt"); err == nil || dao.IsNoRowsError(err) {
|
||||
if err == nil {
|
||||
refundID := utils.Int64ToStr(GenRefundID(order))
|
||||
orderPayRefund, err2 := refundOrderByWX(ctx, orderPay, refundID)
|
||||
if err = err2; err == nil {
|
||||
dao.WrapAddIDCULDEntity(orderPayRefund, ctx.GetUserName())
|
||||
err = dao.CreateEntity(dao.GetDB(), orderPay)
|
||||
}
|
||||
} else {
|
||||
if order.Status >= model.OrderStatusNew {
|
||||
globals.SugarLogger.Warnf("订单:%s找不到有效的支付方式", order.VendorOrderID)
|
||||
payList, err2 := dao.GetOrderPayList(db, order.VendorOrderID, jxutils.GetPossibleVendorIDFromVendorOrderID(order.VendorOrderID))
|
||||
if err = err2; err == nil {
|
||||
errList := errlist.New()
|
||||
for _, orderPay := range payList {
|
||||
if orderPay.Status == model.PayStatusYes {
|
||||
refundID := utils.Int64ToStr(GenRefundID(order))
|
||||
orderPayRefund, err2 := refundOrderByWX(ctx, orderPay, refundID)
|
||||
if err = err2; err == nil {
|
||||
dao.WrapAddIDCULDEntity(orderPayRefund, ctx.GetUserName())
|
||||
errList.AddErr(dao.CreateEntity(dao.GetDB(), orderPay))
|
||||
}
|
||||
} else {
|
||||
orderPay.Status = model.PayStatusCanceled
|
||||
_, err2 := dao.UpdateEntity(db, orderPay)
|
||||
errList.AddErr(err2)
|
||||
}
|
||||
}
|
||||
if err == nil {
|
||||
err = changeOrderStatus(order.VendorOrderID, model.OrderStatusCanceled, reason)
|
||||
}
|
||||
errList.AddErr(changeOrderStatus(order.VendorOrderID, model.OrderStatusCanceled, reason))
|
||||
err = errList.GetErrListAsOne()
|
||||
}
|
||||
} else {
|
||||
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)
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package localjx
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/wxpay"
|
||||
@@ -18,10 +19,14 @@ func vendorPayType2WxpayType(vendorPayType string) string {
|
||||
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) {
|
||||
payCreatedAt := time.Now()
|
||||
param := &wxpay.CreateOrderParam{
|
||||
Body: "",
|
||||
Body: getOrderBrief(order),
|
||||
NotifyURL: globals.WxpayNotifyURL,
|
||||
OutTradeNo: order.VendorOrderID,
|
||||
SpbillCreateIP: ctx.GetRealRemoteIP(),
|
||||
@@ -94,15 +99,27 @@ func onWxpayRefund(msg *wxpay.RefundResultMsg) (err error) {
|
||||
db := dao.GetDB()
|
||||
if err = dao.GetEntity(db, orderPayRefund, "RefundID"); err == nil {
|
||||
if msg.ResultCode == wxpay.ResponseCodeSuccess {
|
||||
orderPayRefund.Status = model.PayStatusYes
|
||||
orderPayRefund.Status = model.RefundStatusYes
|
||||
} else {
|
||||
orderPayRefund.Status = model.PayStatusFailed
|
||||
orderPayRefund.Status = model.RefundStatusFailed
|
||||
}
|
||||
orderPayRefund.OriginalData = utils.Format4Output(msg, true)
|
||||
dao.UpdateEntity(db, orderPayRefund)
|
||||
} else if dao.IsNoRowsError(err) {
|
||||
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
|
||||
}
|
||||
|
||||
@@ -120,7 +137,7 @@ func refundOrderByWX(ctx *jxcontext.Context, orderPay *model.OrderPay, refundID
|
||||
VendorRefundID: result.RefundID,
|
||||
VendorOrderID: orderPay.VendorOrderID,
|
||||
VendorID: orderPay.VendorID,
|
||||
Status: model.PayStatusNo,
|
||||
Status: model.RefundStatusNo,
|
||||
TransactionID: orderPay.TransactionID,
|
||||
RefundFee: orderPay.TotalFee,
|
||||
RefundCreatedAt: time.Now(),
|
||||
|
||||
@@ -300,3 +300,23 @@ func (c *ActController) DeleteSkusFromAct() {
|
||||
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
|
||||
})
|
||||
}
|
||||
|
||||
@@ -279,6 +279,7 @@ func (c *OrderController) ExportMTWaybills() {
|
||||
// @Param isJxFirst query bool false "排序是否京西订单优先(缺省为否)"
|
||||
// @Param adjustCount query int false "最小调整次数"
|
||||
// @Param mustInvoice query bool false "是否必须要求开发票"
|
||||
// @Param isPurchase query bool false "是否是用户自已的订单,如果角色只有consumer,会被强制设为true"
|
||||
// @Param offset query int false "结果起始序号(以0开始,缺省为0)"
|
||||
// @Param pageSize query int false "结果页大小(缺省为50,-1表示全部)"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
|
||||
@@ -58,3 +58,17 @@ func (c *JxOrderController) GetAvailableDeliverTime() {
|
||||
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
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"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/netspider"
|
||||
"github.com/astaxie/beego"
|
||||
@@ -49,6 +54,9 @@ func (c *NetSpiderController) GetAndStoreCitiesShops() {
|
||||
// @Param minShopScore query float64 false "门店分值最小值"
|
||||
// @Param minRecentOrderNum query int false "最近单量最小值"
|
||||
// @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
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /QueryPageStores [get]
|
||||
@@ -57,7 +65,74 @@ func (c *NetSpiderController) QueryPageStores() {
|
||||
if params.MapData["vendorID"] == nil {
|
||||
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
|
||||
})
|
||||
}
|
||||
|
||||
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]
|
||||
}
|
||||
|
||||
@@ -74,8 +74,7 @@ func Init() {
|
||||
if !beego.AppConfig.DefaultBool("disableJd", false) {
|
||||
JdAPI = jdapi.New(beego.AppConfig.String("jdToken"), beego.AppConfig.String("jdAppKey"), beego.AppConfig.String("jdSecret"))
|
||||
cookieValue := beego.AppConfig.DefaultString("jdStorePageCookie", "")
|
||||
JdAPI.SetCookie("shop.o2o.jd.com1", cookieValue)
|
||||
JdAPI.SetCookie("lsp-store1.jddj.com", cookieValue)
|
||||
JdAPI.SetJdCookie(cookieValue)
|
||||
|
||||
conf := platformapi.NewDefAPIConfig()
|
||||
conf.MaxSleepSecondWhenExceedLimit = 60 * 30 // 最大重试间隙30分钟
|
||||
|
||||
@@ -34,6 +34,15 @@ func init() {
|
||||
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.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.ControllerComments{
|
||||
Method: "GetActStoreSkuInfo",
|
||||
@@ -601,6 +610,15 @@ func init() {
|
||||
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.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.ControllerComments{
|
||||
Method: "Pay4Order",
|
||||
|
||||
Reference in New Issue
Block a user