Merge remote-tracking branch 'origin/mark' into jdshop
This commit is contained in:
@@ -698,6 +698,9 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
|
|||||||
}
|
}
|
||||||
saleInfoMap[index] = saleInfo
|
saleInfoMap[index] = saleInfo
|
||||||
}
|
}
|
||||||
|
if v.EarningType == model.EarningTypeQuote {
|
||||||
|
saleInfo.RealEarningPrice += v.ShopPrice * int64(v.Count)
|
||||||
|
}
|
||||||
saleInfo.ShopPrice += v.ShopPrice * int64(v.Count)
|
saleInfo.ShopPrice += v.ShopPrice * int64(v.Count)
|
||||||
saleInfo.VendorPrice += v.VendorPrice * int64(v.Count)
|
saleInfo.VendorPrice += v.VendorPrice * int64(v.Count)
|
||||||
saleInfo.SalePrice += v.SalePrice * int64(v.Count)
|
saleInfo.SalePrice += v.SalePrice * int64(v.Count)
|
||||||
@@ -705,10 +708,16 @@ func (c *OrderManager) GetStoresOrderSaleInfoNew(ctx *jxcontext.Context, storeID
|
|||||||
if v.VendorOrderID == flagVendorOrderID {
|
if v.VendorOrderID == flagVendorOrderID {
|
||||||
if k == 0 {
|
if k == 0 {
|
||||||
saleInfo.EarningPrice = v.NewEarningPrice
|
saleInfo.EarningPrice = v.NewEarningPrice
|
||||||
|
if v.EarningType == model.EarningTypePoints {
|
||||||
|
saleInfo.RealEarningPrice += v.NewEarningPrice
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
flagVendorOrderID = v.VendorOrderID
|
flagVendorOrderID = v.VendorOrderID
|
||||||
saleInfo.EarningPrice += v.NewEarningPrice
|
saleInfo.EarningPrice += v.NewEarningPrice
|
||||||
|
if v.EarningType == model.EarningTypePoints {
|
||||||
|
saleInfo.RealEarningPrice += v.NewEarningPrice
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
universalOrderID := jxutils.ComposeUniversalOrderID(v.VendorOrderID, v.VendorID)
|
universalOrderID := jxutils.ComposeUniversalOrderID(v.VendorOrderID, v.VendorID)
|
||||||
|
|||||||
@@ -89,20 +89,22 @@ func (s *DefScheduler) canOrderCreateWaybillNormally(order *model.GoodsOrder, sa
|
|||||||
}
|
}
|
||||||
if savedOrderInfo != nil {
|
if savedOrderInfo != nil {
|
||||||
//TODO 2020-07-21 发单时间要在门店的营业时间内
|
//TODO 2020-07-21 发单时间要在门店的营业时间内
|
||||||
if savedOrderInfo.storeDetail.OpenTime1 != 0 && savedOrderInfo.storeDetail.CloseTime1 != 0 {
|
if savedOrderInfo.storeDetail != nil {
|
||||||
time1 := jxutils.JxOperationTime2TimeByDate(savedOrderInfo.storeDetail.OpenTime1, time.Now())
|
if savedOrderInfo.storeDetail.OpenTime1 != 0 && savedOrderInfo.storeDetail.CloseTime1 != 0 {
|
||||||
time2 := jxutils.JxOperationTime2TimeByDate(savedOrderInfo.storeDetail.CloseTime1, time.Now())
|
time1 := jxutils.JxOperationTime2TimeByDate(savedOrderInfo.storeDetail.OpenTime1, time.Now())
|
||||||
if time.Now().Sub(time1) < 0 || time.Now().Sub(time2) > 0 {
|
time2 := jxutils.JxOperationTime2TimeByDate(savedOrderInfo.storeDetail.CloseTime1, time.Now())
|
||||||
if savedOrderInfo.storeDetail.OpenTime2 != 0 && savedOrderInfo.storeDetail.CloseTime2 != 0 {
|
if time.Now().Sub(time1) < 0 || time.Now().Sub(time2) > 0 {
|
||||||
time3 := jxutils.JxOperationTime2TimeByDate(savedOrderInfo.storeDetail.OpenTime2, time.Now())
|
if savedOrderInfo.storeDetail.OpenTime2 != 0 && savedOrderInfo.storeDetail.CloseTime2 != 0 {
|
||||||
time4 := jxutils.JxOperationTime2TimeByDate(savedOrderInfo.storeDetail.CloseTime2, time.Now())
|
time3 := jxutils.JxOperationTime2TimeByDate(savedOrderInfo.storeDetail.OpenTime2, time.Now())
|
||||||
if time.Now().Sub(time3) < 0 || time.Now().Sub(time4) > 0 {
|
time4 := jxutils.JxOperationTime2TimeByDate(savedOrderInfo.storeDetail.CloseTime2, time.Now())
|
||||||
globals.SugarLogger.Warnf("createWaybillOn3rdProviders return orderID: %s,不在门店营业时间范围内1!", order.VendorOrderID)
|
if time.Now().Sub(time3) < 0 || time.Now().Sub(time4) > 0 {
|
||||||
return fmt.Errorf("不在门店营业时间范围内!")
|
// globals.SugarLogger.Warnf("createWaybillOn3rdProviders return orderID: %s,不在门店营业时间范围内1!", order.VendorOrderID)
|
||||||
|
err = fmt.Errorf("不在门店营业时间范围内!")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// globals.SugarLogger.Warnf("createWaybillOn3rdProviders return orderID: %s,不在门店营业时间范围内2!", order.VendorOrderID)
|
||||||
|
err = fmt.Errorf("不在门店营业时间范围内!")
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
globals.SugarLogger.Warnf("createWaybillOn3rdProviders return orderID: %s,不在门店营业时间范围内2!", order.VendorOrderID)
|
|
||||||
return fmt.Errorf("不在门店营业时间范围内!")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1098,8 +1098,8 @@ func (v *VendorSync) SyncJdsStoresSkus(ctx *jxcontext.Context, storeIDs []int, i
|
|||||||
var (
|
var (
|
||||||
db = dao.GetDB()
|
db = dao.GetDB()
|
||||||
)
|
)
|
||||||
storeSkus, _ := dao.GetStoresSkusInfo(db, []int{model.JdShopMainStoreID}, nil)
|
// storeSkus, _ := dao.GetStoresSkusInfo(db, []int{model.JdShopMainStoreID}, nil)
|
||||||
_, hint, err = v.LoopStoresMap2(ctx, nil, db, fmt.Sprintf("同步京东商城库存商品信息:%v", storeIDs), isAsync, true, []int{model.VendorIDJDShop}, storeIDs, false,
|
_, hint, err = v.LoopStoresMap2(ctx, nil, db, fmt.Sprintf("同步京东商城门店的可售信息:%v", storeIDs), isAsync, true, []int{model.VendorIDJDShop}, storeIDs, false,
|
||||||
func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (interface{}, error) {
|
func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (interface{}, error) {
|
||||||
loopMapInfo := batchItemList[0].(*LoopStoreMapInfo)
|
loopMapInfo := batchItemList[0].(*LoopStoreMapInfo)
|
||||||
if handler := v.GetStoreHandler(loopMapInfo.VendorID); handler != nil {
|
if handler := v.GetStoreHandler(loopMapInfo.VendorID); handler != nil {
|
||||||
@@ -1107,7 +1107,7 @@ func (v *VendorSync) SyncJdsStoresSkus(ctx *jxcontext.Context, storeIDs []int, i
|
|||||||
if storeMap.Status > model.StoreStatusDisabled && storeMap.StoreID != model.JdShopMainStoreID && storeMap.SyncRule != 0 {
|
if storeMap.Status > model.StoreStatusDisabled && storeMap.StoreID != model.JdShopMainStoreID && storeMap.SyncRule != 0 {
|
||||||
err = syncJdsStoresSkus(ctx, db, t, storeMap, isAsync, isContinueWhenError)
|
err = syncJdsStoresSkus(ctx, db, t, storeMap, isAsync, isContinueWhenError)
|
||||||
}
|
}
|
||||||
err = syncJdsStoreStock(ctx, db, t, storeSkus, storeMap, isAsync, isContinueWhenError)
|
// err = syncJdsStoreStock(ctx, db, t, storeSkus, storeMap, isAsync, isContinueWhenError)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil, partner.AddVendorInfo2Err(err, loopMapInfo.VendorID)
|
return nil, partner.AddVendorInfo2Err(err, loopMapInfo.VendorID)
|
||||||
@@ -1115,44 +1115,36 @@ func (v *VendorSync) SyncJdsStoresSkus(ctx *jxcontext.Context, storeIDs []int, i
|
|||||||
return hint, err
|
return hint, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func syncJdsStoreStock(ctx *jxcontext.Context, db *dao.DaoDB, parentTask tasksch.ITask, storeSkus []*model.StoreSkuBind, storeMap *model.StoreMap, isAsync, isContinueWhenError bool) (err error) {
|
func SyncJdsStoreStock(ctx *jxcontext.Context, db *dao.DaoDB, parentTask tasksch.ITask, isAsync, isContinueWhenError bool) (err error) {
|
||||||
// for _, storeSku := range storeSkus {
|
storeMaps, err := dao.GetStoresMapList(db, []int{model.VendorIDJDShop}, nil, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "")
|
||||||
// stock := 0
|
if err != nil {
|
||||||
// storeSku2, _ := dao.GetStoresSkusInfo(db, []int{storeMap.StoreID}, []int{storeSku.SkuID})
|
return err
|
||||||
// if storeSku.JdsID != 0 {
|
}
|
||||||
// if len(storeSku2) > 0 {
|
storeSkus, err := dao.GetStoresSkusInfo(db, []int{model.JdShopMainStoreID}, nil)
|
||||||
// if storeSku2[0].Status == model.StoreSkuBindStatusNormal && storeSku.Status == model.StoreSkuBindStatusNormal {
|
if err != nil {
|
||||||
// stock = 9999
|
return err
|
||||||
// }
|
}
|
||||||
// if storeMap.VendorStoreID != "" {
|
for _, storeMap := range storeMaps {
|
||||||
// err = api.JdShopAPI.UpdateSkuSiteStock(storeSku.JdsID, stock, utils.Str2Int(storeMap.VendorStoreID))
|
task := tasksch.NewParallelTask("syncJdsStoreStock", tasksch.NewParallelConfig().SetIsContinueWhenError(isContinueWhenError).SetParallelCount(1), ctx,
|
||||||
// }
|
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||||
// } else {
|
storeSku := batchItemList[0].(*model.StoreSkuBind)
|
||||||
// err = api.JdShopAPI.UpdateSkuSiteStock(storeSku.JdsID, 0, utils.Str2Int(storeMap.VendorStoreID))
|
stock := 0
|
||||||
// }
|
storeSku2, _ := dao.GetStoresSkusInfo(db, []int{storeMap.StoreID}, []int{storeSku.SkuID})
|
||||||
// }
|
if storeSku.JdsID != 0 {
|
||||||
// }
|
if len(storeSku2) > 0 {
|
||||||
task := tasksch.NewParallelTask("syncJdsStoreStock", tasksch.NewParallelConfig().SetIsContinueWhenError(isContinueWhenError).SetParallelCount(1), ctx,
|
if storeSku2[0].Status == model.StoreSkuBindStatusNormal && storeSku.Status == model.StoreSkuBindStatusNormal {
|
||||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
stock = 9999
|
||||||
storeSku := batchItemList[0].(*model.StoreSkuBind)
|
}
|
||||||
stock := 0
|
if storeMap.VendorStoreID != "" {
|
||||||
storeSku2, _ := dao.GetStoresSkusInfo(db, []int{storeMap.StoreID}, []int{storeSku.SkuID})
|
err = api.JdShopAPI.UpdateSkuSiteStock(storeSku.JdsID, stock, utils.Str2Int(storeMap.VendorStoreID))
|
||||||
if storeSku.JdsID != 0 {
|
}
|
||||||
if len(storeSku2) > 0 {
|
} else {
|
||||||
if storeSku2[0].Status == model.StoreSkuBindStatusNormal && storeSku.Status == model.StoreSkuBindStatusNormal {
|
err = api.JdShopAPI.UpdateSkuSiteStock(storeSku.JdsID, 0, utils.Str2Int(storeMap.VendorStoreID))
|
||||||
stock = 9999
|
|
||||||
}
|
}
|
||||||
if storeMap.VendorStoreID != "" {
|
|
||||||
err = api.JdShopAPI.UpdateSkuSiteStock(storeSku.JdsID, stock, utils.Str2Int(storeMap.VendorStoreID))
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
err = api.JdShopAPI.UpdateSkuSiteStock(storeSku.JdsID, 0, utils.Str2Int(storeMap.VendorStoreID))
|
|
||||||
}
|
}
|
||||||
}
|
return retVal, err
|
||||||
return retVal, err
|
}, storeSkus)
|
||||||
}, storeSkus)
|
tasksch.HandleTask(task, parentTask, true).Run()
|
||||||
tasksch.HandleTask(task, parentTask, true).Run()
|
|
||||||
if !isAsync {
|
|
||||||
_, err = task.GetResult(0)
|
_, err = task.GetResult(0)
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ var (
|
|||||||
"20:30:00",
|
"20:30:00",
|
||||||
}
|
}
|
||||||
dailyWorkTimeList2 = []string{
|
dailyWorkTimeList2 = []string{
|
||||||
"18:30:00",
|
"02:00:00",
|
||||||
}
|
}
|
||||||
priceReferTimeList = []string{
|
priceReferTimeList = []string{
|
||||||
"03:00:00",
|
"03:00:00",
|
||||||
@@ -383,8 +383,10 @@ func syncStoreSku() {
|
|||||||
func doDailyWork2() {
|
func doDailyWork2() {
|
||||||
globals.SugarLogger.Debug("doDailyWork2")
|
globals.SugarLogger.Debug("doDailyWork2")
|
||||||
|
|
||||||
//同步京东商城门店库存和商品
|
//同步京东商城门店的商品
|
||||||
cms.CurVendorSync.SyncJdsStoresSkus(jxcontext.AdminCtx, nil, true, true)
|
cms.CurVendorSync.SyncJdsStoresSkus(jxcontext.AdminCtx, nil, true, true)
|
||||||
|
//刷新京东商城的门店库存
|
||||||
|
cms.SyncJdsStoreStock(jxcontext.AdminCtx, dao.GetDB(), nil, true, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
func doDailyWork() {
|
func doDailyWork() {
|
||||||
|
|||||||
@@ -591,9 +591,9 @@ func RefreshOrderSkuRelated(order *model.GoodsOrder) *model.GoodsOrder {
|
|||||||
func RefreshOrderEarningPrice2(order *model.GoodsOrder, payPercentage int) *model.GoodsOrder {
|
func RefreshOrderEarningPrice2(order *model.GoodsOrder, payPercentage int) *model.GoodsOrder {
|
||||||
if order.EarningType == model.EarningTypePoints {
|
if order.EarningType == model.EarningTypePoints {
|
||||||
if order.VendorID == model.VendorIDJDShop || order.VendorID == model.VendorIDJX {
|
if order.VendorID == model.VendorIDJDShop || order.VendorID == model.VendorIDJX {
|
||||||
order.NewEarningPrice = order.TotalShopMoney * int64((100 - payPercentage/2)) / 100
|
|
||||||
} else {
|
|
||||||
order.NewEarningPrice = order.TotalShopMoney * int64((100 - payPercentage)) / 100
|
order.NewEarningPrice = order.TotalShopMoney * int64((100 - payPercentage)) / 100
|
||||||
|
} else {
|
||||||
|
order.NewEarningPrice = order.TotalShopMoney * int64((100 - payPercentage/2)) / 100
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
order.NewEarningPrice = order.EarningPrice
|
order.NewEarningPrice = order.EarningPrice
|
||||||
|
|||||||
@@ -31,6 +31,8 @@ type StoresOrderSaleInfo struct {
|
|||||||
|
|
||||||
DistanceFreightMoney int64 `json:"distanceFreightMoney"` // 商户承担的远距离配送费(当前只有京东到家有值)
|
DistanceFreightMoney int64 `json:"distanceFreightMoney"` // 商户承担的远距离配送费(当前只有京东到家有值)
|
||||||
WaybillTipMoney int64 `json:"waybillTipMoney"` // 京西加的平台配送小费
|
WaybillTipMoney int64 `json:"waybillTipMoney"` // 京西加的平台配送小费
|
||||||
|
|
||||||
|
RealEarningPrice int64 `json:"realEarningPrice"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type OrderSkuWithActualPayPrice struct {
|
type OrderSkuWithActualPayPrice struct {
|
||||||
@@ -45,6 +47,7 @@ type OrderSkuWithActualPayPrice struct {
|
|||||||
|
|
||||||
PayPercentage int `json:"payPercentage"`
|
PayPercentage int `json:"payPercentage"`
|
||||||
NewEarningPrice int64 `json:"newEarningPrice"`
|
NewEarningPrice int64 `json:"newEarningPrice"`
|
||||||
|
EarningType int `json:"earningType"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type tGoodsAndOrder struct {
|
type tGoodsAndOrder struct {
|
||||||
@@ -373,7 +376,7 @@ func GetStoreOrderSkuList(db *DaoDB, storeIDs []int, finishedAtBegin, finishedAt
|
|||||||
sql := `
|
sql := `
|
||||||
SELECT t1.*,
|
SELECT t1.*,
|
||||||
IF(t2.jx_store_id > 0, t2.jx_store_id, t2.store_id) store_id, t2.status, t2.actual_pay_price, t2.distance_freight_money, t2.waybill_tip_money, t2.new_earning_price,
|
IF(t2.jx_store_id > 0, t2.jx_store_id, t2.store_id) store_id, t2.status, t2.actual_pay_price, t2.distance_freight_money, t2.waybill_tip_money, t2.new_earning_price,
|
||||||
t3.pay_percentage
|
t3.pay_percentage, t2.earning_type
|
||||||
FROM order_sku t1
|
FROM order_sku t1
|
||||||
JOIN goods_order t2 ON t2.vendor_order_id = t1.vendor_order_id AND t2.vendor_id = t1.vendor_id
|
JOIN goods_order t2 ON t2.vendor_order_id = t1.vendor_order_id AND t2.vendor_id = t1.vendor_id
|
||||||
LEFT JOIN store t3 ON t3.id = IF(t2.jx_store_id > 0, t2.jx_store_id, t2.store_id)
|
LEFT JOIN store t3 ON t3.id = IF(t2.jx_store_id > 0, t2.jx_store_id, t2.store_id)
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ func (c *DeliveryHandler) pushToGy(msg *mtpsapi.CallbackOrderMsg) {
|
|||||||
urls := utils.Map2URLValues(params)
|
urls := utils.Map2URLValues(params)
|
||||||
sign := signParams(urls)
|
sign := signParams(urls)
|
||||||
params["sign"] = sign
|
params["sign"] = sign
|
||||||
|
globals.SugarLogger.Debugf("pushToGy", utils.Format4Output(msg, false))
|
||||||
request, err := http.NewRequest(http.MethodPost, "http://callback-jxgy.jxc4.com/mtps/status", strings.NewReader(utils.Map2URLValues(params).Encode()))
|
request, err := http.NewRequest(http.MethodPost, "http://callback-jxgy.jxc4.com/mtps/status", strings.NewReader(utils.Map2URLValues(params).Encode()))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -155,17 +155,21 @@ func (c *PurchaseHandler) onOrderInfoChangeMsg(vendorOrgCode string, msg *jdapi.
|
|||||||
|
|
||||||
func updateOrderBySettleMent(order *model.GoodsOrder, orderSettlement *jdapi.OrderSettlementInfo) {
|
func updateOrderBySettleMent(order *model.GoodsOrder, orderSettlement *jdapi.OrderSettlementInfo) {
|
||||||
if orderSettlement != nil {
|
if orderSettlement != nil {
|
||||||
// order.WaybillTipMoney = orderSettlement.VenderPaidTips
|
|
||||||
order.TotalShopMoney = orderSettlement.SettlementAmount
|
order.TotalShopMoney = orderSettlement.SettlementAmount
|
||||||
order.PmSubsidyMoney = orderSettlement.PlatOrderGoodsDiscountMoney + orderSettlement.PlatSkuGoodsDiscountMoney
|
order.PmSubsidyMoney = orderSettlement.PlatOrderGoodsDiscountMoney + orderSettlement.PlatSkuGoodsDiscountMoney
|
||||||
if order.TotalShopMoney > 0 {
|
if order.TotalShopMoney > 0 {
|
||||||
order2, err := partner.CurOrderManager.LoadOrder(order.VendorOrderID, order.VendorID)
|
if jxutils.GetSaleStoreIDFromOrder(order) != 0 {
|
||||||
if order2 != nil && err == nil {
|
storeDetail, err := partner.CurOrderManager.LoadStoreDetail(jxutils.GetSaleStoreIDFromOrder(order), order.VendorID)
|
||||||
storeDetail, err := partner.CurOrderManager.LoadStoreDetail(jxutils.GetSaleStoreIDFromOrder(order2), order.VendorID)
|
|
||||||
if storeDetail != nil && err == nil {
|
if storeDetail != nil && err == nil {
|
||||||
jxutils.RefreshOrderEarningPrice2(order, storeDetail.PayPercentage)
|
jxutils.RefreshOrderEarningPrice2(order, storeDetail.PayPercentage)
|
||||||
} else {
|
}
|
||||||
globals.SugarLogger.Warnf("updateOrderBySettleMent,%v,%v,%v", order.VendorOrderID, orderSettlement.SettlementAmount)
|
} else {
|
||||||
|
order2, err := partner.CurOrderManager.LoadOrder(order.VendorOrderID, order.VendorID)
|
||||||
|
if order2 != nil && err == nil {
|
||||||
|
storeDetail, err := partner.CurOrderManager.LoadStoreDetail(jxutils.GetSaleStoreIDFromOrder(order2), order.VendorID)
|
||||||
|
if storeDetail != nil && err == nil {
|
||||||
|
jxutils.RefreshOrderEarningPrice2(order, storeDetail.PayPercentage)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
package jdshop
|
package jdshop
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi/platformapi/jdshopapi"
|
"git.rosy.net.cn/baseapi/platformapi/jdshopapi"
|
||||||
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func OnCallbackMsg(msg *jdshopapi.CallBackResult) {
|
func OnCallbackMsg(msg *jdshopapi.GetOrderResult) {
|
||||||
// fmt.Println("testcallback", utils.Format4Output(msg, false))
|
fmt.Println("testcallback", utils.Format4Output(msg, false))
|
||||||
// if CurPurchaseHandler != nil {
|
// if CurPurchaseHandler != nil {
|
||||||
// if msg.Cmd == mtwmapi.MsgTypeStoreStatusChanged {
|
// if msg.Cmd == mtwmapi.MsgTypeStoreStatusChanged {
|
||||||
// response = CurPurchaseHandler.onStoreStatusChanged(msg)
|
// response = CurPurchaseHandler.onStoreStatusChanged(msg)
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package controllers
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
@@ -17,7 +16,6 @@ type JdsController struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *JdsController) Msg() {
|
func (c *JdsController) Msg() {
|
||||||
fmt.Println("testjdscll")
|
|
||||||
if c.Ctx.Input.Method() == http.MethodPost {
|
if c.Ctx.Input.Method() == http.MethodPost {
|
||||||
ctx := c.Ctx
|
ctx := c.Ctx
|
||||||
ctx.Request.Body = ioutil.NopCloser(bytes.NewReader(ctx.Input.RequestBody))
|
ctx.Request.Body = ioutil.NopCloser(bytes.NewReader(ctx.Input.RequestBody))
|
||||||
|
|||||||
Reference in New Issue
Block a user