1
This commit is contained in:
@@ -1486,7 +1486,6 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, vendorID int, vend
|
||||
userName := ctx.GetUserName()
|
||||
storeMap.StoreID = storeID
|
||||
storeMap.VendorID = vendorID
|
||||
globals.SugarLogger.Debugf("vendorID1111111111111111===============%d", vendorID)
|
||||
storeMap.VendorOrgCode = vendorOrgCode
|
||||
storeMap.Status = model.StoreStatusOpened
|
||||
storeMap.DeliveryType = model.StoreDeliveryTypeByStore
|
||||
|
||||
@@ -1724,7 +1724,6 @@ func UpdateStoresSkus(ctx *jxcontext.Context, causeFlag int, storeIDs []int, sku
|
||||
}
|
||||
} else {
|
||||
flag, _ := doStoreSkuAudit(ctx, storeIDs, skuBindInfos)
|
||||
globals.SugarLogger.Debugf("===================flag %v", flag)
|
||||
if !flag {
|
||||
var num int64
|
||||
db := dao.GetDB()
|
||||
@@ -1734,7 +1733,6 @@ func UpdateStoresSkus(ctx *jxcontext.Context, causeFlag int, storeIDs []int, sku
|
||||
}
|
||||
isAsync = asyncStoreSkuOpFilter(ctx, isAsync)
|
||||
num = int64(len(skuIDs))
|
||||
globals.SugarLogger.Debugf("===================num %d", num)
|
||||
if num > 0 {
|
||||
hint, err = CurVendorSync.SyncStoresSkus(ctx, nil, causeFlag, db, nil, storeIDs, skuIDs, false, isAsync, isContinueWhenError)
|
||||
}
|
||||
|
||||
@@ -309,7 +309,6 @@ func (v *VendorSync) SyncStore2(ctx *jxcontext.Context, db *dao.DaoDB, vendorIDs
|
||||
failedList = putils.GetErrMsg2FailedSingleList(nil, err, storeMap.StoreID, model.VendorChineseNames[storeMap.VendorID], "删除门店")
|
||||
}
|
||||
} else {
|
||||
globals.SugarLogger.Debugf("进入UpdateStore,storeMap.StoreID====%d, userName=========%s", storeMap.StoreID, userName)
|
||||
if err = handler.UpdateStore(db, storeMap.StoreID, userName); err == nil {
|
||||
resultList = append(resultList, 1)
|
||||
} else {
|
||||
|
||||
@@ -699,7 +699,6 @@ func ScheduleTimerFunc(name string, handler func(), timeList []string) {
|
||||
nextTime := jxutils.GetNextTimeFromList(now, timeList)
|
||||
duration := nextTime.Sub(now) + 1*time.Second
|
||||
utils.AfterFuncWithRecover(duration, func() {
|
||||
globals.SugarLogger.Debugf("循环时间序列=====%s", duration)
|
||||
handler()
|
||||
ScheduleTimerFunc(name, handler, timeList)
|
||||
})
|
||||
|
||||
@@ -60,7 +60,6 @@ var (
|
||||
)
|
||||
|
||||
func (c *PurchaseHandler) OnOrderMsg(a *jdapi.API, msg *jdapi.CallbackOrderMsg) (retVal *jdapi.CallbackResponse) {
|
||||
globals.SugarLogger.Debug("===================京东订单 := %s", utils.Format4Output(msg, false))
|
||||
primaryID := msg.BillID
|
||||
primaryID += utils.Int64ToStr(time.Now().Unix())
|
||||
jxutils.CallMsgHandler(func() {
|
||||
@@ -204,10 +203,8 @@ func (c *PurchaseHandler) getOrder(a *jdapi.API, orderID string) (order *model.G
|
||||
switch taskIndex {
|
||||
case 0:
|
||||
orderMap, err = a.QuerySingleOrder(orderID)
|
||||
globals.SugarLogger.Debugf("===========================new order order Mao%s", utils.Format4Output(orderMap, false))
|
||||
if err == nil {
|
||||
order = c.Map2Order(orderMap)
|
||||
globals.SugarLogger.Debugf("===========================new really order Mao%s", utils.Format4Output(order, false))
|
||||
if configs, err := dao.QueryConfigs(dao.GetDB(), "jdStorePageCookie", model.ConfigTypeCookie, ""); err == nil {
|
||||
//a.SetJdCookie(configs[0].Value)
|
||||
a.SetCookieWithStr(configs[0].Value)
|
||||
|
||||
@@ -71,7 +71,6 @@ func (p *PurchaseHandler) getStatusFromVendorStatus(vendorStatus int64) int {
|
||||
}
|
||||
|
||||
func (c *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *model.GoodsOrder) {
|
||||
globals.SugarLogger.Debugf("Map2Order=====:%s", utils.Format4Output(orderData, false))
|
||||
order, _, _ = c.getOrder(orderData["VendorOrgCode"].(string), orderData["vendorOrderID"].(string), "")
|
||||
return order
|
||||
}
|
||||
|
||||
@@ -460,7 +460,6 @@ func CreateFreightTemplate(storeCode int) (int64, error) {
|
||||
param.Columns = nil
|
||||
param.Template.TemplateName += "固定运费模板"
|
||||
}
|
||||
globals.SugarLogger.Debugf("param.Template.TemplateName===============%s", param.Template.TemplateName)
|
||||
resp, err := getAPI(storeDetail.VendorOrgCode, storeCode, storeDetail.VendorStoreID).FreightTemplateCreate(param)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
@@ -507,10 +506,8 @@ func UpdateFreightTemplate(storeCode int) error {
|
||||
param.Columns = nil
|
||||
param.Template.TemplateName += "固定运费模板"
|
||||
}
|
||||
globals.SugarLogger.Debugf("param.Template.TemplateName=============%s", param.Template.TemplateName)
|
||||
_, err = getAPI(storeDetail.VendorOrgCode, storeCode, storeDetail.VendorStoreID).FreightTemplateUpdate(param)
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf("err==================%v", err)
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,12 +93,10 @@ func BindStoreWarehouse(VendorOrgCode, outWarehouseID string, storeIDs int64) er
|
||||
|
||||
// /warehouse/getWarehouseByStore 门店id获取绑定仓库详情包括电子围栏
|
||||
func GetWarehouseByStore(appOrgCode string, storeID int64) (map[int64][]warehouse_getWarehouseByStore_response.WarehouseInfoMapItem, error) {
|
||||
globals.SugarLogger.Debugf("appOrgCode====%s,storeID=====%d", appOrgCode, storeID)
|
||||
info, err := getAPI(appOrgCode, 0, "").GetWarehouseByStore(storeID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
globals.SugarLogger.Debugf("err===================== %v", err)
|
||||
return info, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package controllers
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/tiktok_store"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
"strings"
|
||||
@@ -22,7 +21,6 @@ func (t *TiktokController) CallbackTiktokOrderMsg() {
|
||||
t.ServeJSON()
|
||||
return
|
||||
}
|
||||
globals.SugarLogger.Debugf("订单消息-------------------%s", string(byteList))
|
||||
if strings.Contains(string(byteList), "\"msg_id\":\"0\"") {
|
||||
t.Data["json"] = tiktok_api.CallbackResponse{Code: tiktok_api.CallbackSuccessCode, Msg: tiktok_api.CallbackSuccess}
|
||||
t.ServeJSON()
|
||||
|
||||
Reference in New Issue
Block a user