- up
This commit is contained in:
@@ -860,8 +860,9 @@ func LockPromotionSkus(ctx *jxcontext.Context, promotionID int, isLock int, skuI
|
|||||||
}
|
}
|
||||||
|
|
||||||
func OnStoreStockMsg(msg *jdapi.CallbackStoreStockMsg) (retVal *jdapi.CallbackResponse) {
|
func OnStoreStockMsg(msg *jdapi.CallbackStoreStockMsg) (retVal *jdapi.CallbackResponse) {
|
||||||
var err error
|
|
||||||
globals.SugarLogger.Debugf("OnStoreStockMsg msg:%s", utils.Format4Output(msg, false))
|
globals.SugarLogger.Debugf("OnStoreStockMsg msg:%s", utils.Format4Output(msg, false))
|
||||||
|
|
||||||
|
var err error
|
||||||
// globals.SugarLogger.Debugf("OnStoreStockMsg IsJdStoreSkuLocked:%t", storeskulock.IsJdStoreSkuLocked(msg.StationNo, msg.SkuId))
|
// globals.SugarLogger.Debugf("OnStoreStockMsg IsJdStoreSkuLocked:%t", storeskulock.IsJdStoreSkuLocked(msg.StationNo, msg.SkuId))
|
||||||
if (msg.Vendibility == 1 || !msg.Have) && storeskulock.IsJdStoreSkuLocked(msg.StationNo, msg.SkuId) {
|
if (msg.Vendibility == 1 || !msg.Have) && storeskulock.IsJdStoreSkuLocked(msg.StationNo, msg.SkuId) {
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi/platformapi/jdapi"
|
"git.rosy.net.cn/baseapi/platformapi/jdapi"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
|
||||||
"git.rosy.net.cn/jx-callback/business/jxstore/promotion"
|
"git.rosy.net.cn/jx-callback/business/jxstore/promotion"
|
||||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/jd"
|
"git.rosy.net.cn/jx-callback/business/partner/purchase/jd"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
@@ -105,7 +104,7 @@ func (c *DjswController) StockIsHave() {
|
|||||||
if c.Ctx.Input.Method() == http.MethodPost {
|
if c.Ctx.Input.Method() == http.MethodPost {
|
||||||
obj, callbackResponse := api.JdAPI.GetStoreStockCallbackMsg(c.Ctx.Input.RequestBody)
|
obj, callbackResponse := api.JdAPI.GetStoreStockCallbackMsg(c.Ctx.Input.RequestBody)
|
||||||
if callbackResponse == nil {
|
if callbackResponse == nil {
|
||||||
globals.SugarLogger.Debugf("StockIsHave, obj:%s", utils.Format4Output(obj, false))
|
// globals.SugarLogger.Debugf("StockIsHave, obj:%s", utils.Format4Output(obj, false))
|
||||||
callbackResponse = promotion.OnStoreStockMsg(obj)
|
callbackResponse = promotion.OnStoreStockMsg(obj)
|
||||||
}
|
}
|
||||||
c.Data["json"] = callbackResponse
|
c.Data["json"] = callbackResponse
|
||||||
|
|||||||
Reference in New Issue
Block a user