Merge branch 'jdshop' of https://e.coding.net/rosydev/jx-callback into jdshop
This commit is contained in:
@@ -126,7 +126,6 @@ func AutoSettingFakeDelivery() {
|
||||
} else {
|
||||
place, err := dao.GetParentCodeByCode(db, storeDetail.CityCode)
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf("根据门店的城市code获取省份code错误: %s", err)
|
||||
return
|
||||
}
|
||||
if strings.Contains(place.Name, "省") {
|
||||
|
||||
@@ -2687,7 +2687,6 @@ func UpdateTiktokShopTotalMoney(storeId int64, startTime, endTime time.Time) err
|
||||
}
|
||||
|
||||
for _, v := range goodsOrders {
|
||||
globals.SugarLogger.Debugf("=============测试打印: %s", v.VendorOrderID)
|
||||
orderDetail, err := tiktok_store.GetOrderDetail(v.VendorOrgCode, v.VendorOrderID)
|
||||
if err != nil {
|
||||
errList = append(errList, fmt.Sprintf("详情错误orderID[%s],%v", v.VendorOrderID, err))
|
||||
|
||||
@@ -1140,7 +1140,6 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
|
||||
kv[model.FieldStatus] = status
|
||||
//}
|
||||
}
|
||||
globals.SugarLogger.Debugf("data := %s,%d", utils.Format4Output(kv, false), store.ID)
|
||||
_, err2 := dao.UpdateEntityLogicallyAndUpdateSyncStatus(db, dummy, kv, userName, map[string]interface{}{
|
||||
model.FieldStoreID: store.ID,
|
||||
}, model.FieldSyncStatus, syncStatus)
|
||||
@@ -1171,9 +1170,7 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
|
||||
} else {
|
||||
globals.SugarLogger.Debugf("UpdateStore track:%s, store:%s", ctx.GetTrackInfo(), utils.Format4Output(store, true))
|
||||
}
|
||||
if status == -2 {
|
||||
|
||||
}
|
||||
return num, err
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ func init() {
|
||||
}
|
||||
|
||||
func (s *StoreManager) OnStoreStatusChanged(vendorStoreID string, vendorID int, storeStatus int) (err error) {
|
||||
//return err
|
||||
db := dao.GetDB()
|
||||
storeDetail, err := dao.GetStoreDetailByVendorStoreID(db, vendorStoreID, vendorID, "")
|
||||
if err == nil {
|
||||
@@ -35,10 +34,6 @@ func (s *StoreManager) OnStoreStatusChanged(vendorStoreID string, vendorID int,
|
||||
storeKV = map[string]interface{}{
|
||||
"Status": model.StoreStatusOpened,
|
||||
}
|
||||
//content := "您的门店 [" + storeDetail.Name + "],ID:[" + utils.Int2Str(storeDetail.ID) + "],在[" + model.VendorChineseNames[vendorID] + "] 平台上营业状态和京西不一致!平台状态:【营业】,京西状态:【非营业】"
|
||||
//if user, err := dao.GetUserByID(db, "mobile", storeDetail.MarketManPhone); err == nil {
|
||||
// ddmsg.SendUserMessage(dingdingapi.MsgTyeText, user.UserID, "平台门店状态变化", content)
|
||||
//}
|
||||
}
|
||||
if storeDetail.VendorStatus != model.StoreStatusOpened {
|
||||
storeMapKV = map[string]interface{}{
|
||||
@@ -52,14 +47,10 @@ func (s *StoreManager) OnStoreStatusChanged(vendorStoreID string, vendorID int,
|
||||
"Status": storeStatus,
|
||||
}
|
||||
}
|
||||
//content := "您的门店 [" + storeDetail.Name + "],ID:[" + utils.Int2Str(storeDetail.ID) + "],在[" + model.VendorChineseNames[vendorID] + "] 平台上营业状态和京西不一致!平台状态:【非营业】,京西状态:【营业】"
|
||||
//if user, err := dao.GetUserByID(db, "mobile", storeDetail.MarketManPhone); err == nil {
|
||||
// ddmsg.SendUserMessage(dingdingapi.MsgTyeText, user.UserID, "平台门店状态变化", content)
|
||||
//}
|
||||
} else if storeDetail.Status <= storeStatus {
|
||||
if storeDetail.VendorStatus != model.StoreStatusOpened {
|
||||
if storeDetail.VendorStatus != storeStatus {
|
||||
storeMapKV = map[string]interface{}{
|
||||
"Status": model.StoreStatusOpened,
|
||||
"Status": storeStatus,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,10 +142,7 @@ func UpdateEntityLogicallyAndUpdateSyncStatus(db *DaoDB, item interface{}, kvs m
|
||||
if userName != "" {
|
||||
params[model.FieldLastOperator] = userName
|
||||
}
|
||||
globals.SugarLogger.Debugf("=========MergeMaps := %s", utils.Format4Output(utils.MergeMaps(kvs, params), false))
|
||||
num2, err2 := UpdateEntityByKV(db, value.Interface(), utils.MergeMaps(kvs, params), nil)
|
||||
globals.SugarLogger.Debugf("=========num := %d", num2)
|
||||
globals.SugarLogger.Debugf("=========err := %v", err2)
|
||||
if err = err2; err == nil {
|
||||
num += num2
|
||||
} else {
|
||||
|
||||
@@ -331,7 +331,6 @@ func (c *DeliveryHandler) CreateWaybill(order *model.GoodsOrder, maxDeliveryFee
|
||||
return nil, fmt.Errorf("此平台配送已被系统关闭,暂不发配送 [%v]", vendorOrgCode[0].Comment)
|
||||
}
|
||||
|
||||
globals.SugarLogger.Debugf("===================maxDeliveryFee := %d", maxDeliveryFee)
|
||||
if maxDeliveryFee == model.NO {
|
||||
fee, err := c.GetWaybillFee(order)
|
||||
if err != nil {
|
||||
|
||||
@@ -280,16 +280,16 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
||||
if err = p.UpdateStoreStatus(jxcontext.AdminCtx, store.VendorOrgCode, storeID, store.VendorStoreID, mergeStatus); err != nil {
|
||||
return err
|
||||
}
|
||||
store := fmt.Sprintf("门店id:%d,门店名称:%s,第三方门店状态:%d,本地修改前门店状态%d,本地门店修改后状态:%d,第三方平台Id(ebai):%d", storeID, store.Name, store2.Status, store.Status, mergeStatus, store.VendorOrgCode)
|
||||
event.AddOperateEvent(jxcontext.AdminCtx, jxcontext.AdminCtx.GetTrackInfo(), store, "", "", 10, "UpdateStore")
|
||||
updateStoreInfo := fmt.Sprintf("门店id:%d,门店名称:%s,第三方门店状态:%d,本地修改前门店状态%d,本地门店修改后状态:%d,第三方平台Id(ebai):%d", storeID, store.Name, store2.Status, store.Status, mergeStatus, store.VendorOrgCode)
|
||||
event.AddOperateEvent(jxcontext.AdminCtx, jxcontext.AdminCtx.GetTrackInfo(), updateStoreInfo, "", "", 10, "UpdateStore")
|
||||
}
|
||||
params := genStoreMapFromStore(store)
|
||||
if err = api.EbaiAPI.ShopUpdate(params); err == nil {
|
||||
if store.PromoteInfo != "" {
|
||||
err = api.EbaiAPI.ShopAnnouncementSet("", utils.Str2Int64(store.VendorStoreID), store.PromoteInfo)
|
||||
}
|
||||
store := fmt.Sprintf("门店id:%d,门店名称:%s,第三方门店状态:%d,本地修改前门店状态%d,本地门店修改后状态:%d,第三方平台Id(ebai):%d", storeID, store.Name, store2.Status, store.Status, 100, store.VendorOrgCode)
|
||||
event.AddOperateEvent(jxcontext.AdminCtx, jxcontext.AdminCtx.GetTrackInfo(), store, "", "", 10, "UpdateStore")
|
||||
updateStoreInfo := fmt.Sprintf("门店id:%d,门店名称:%s,第三方门店状态:%d,本地修改前门店状态%d,本地门店修改后状态:%d,第三方平台Id(ebai):%d", storeID, store.Name, store2.Status, store.Status, 100, store.VendorOrgCode)
|
||||
event.AddOperateEvent(jxcontext.AdminCtx, jxcontext.AdminCtx.GetTrackInfo(), updateStoreInfo, "", "", 10, "UpdateStore")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -628,7 +628,6 @@ func (c *PurchaseHandler) UpdateStoreStatus(ctx *jxcontext.Context, vendorOrgCod
|
||||
err = api.EbaiAPI.ShopClose("", utils.Str2Int64(vendorStoreID))
|
||||
} else if status == model.StoreStatusDisabled {
|
||||
err = api.EbaiAPI.ShopClose("", utils.Str2Int64(vendorStoreID))
|
||||
// err = api.EbaiAPI.ShopOffline("", utils.Str2Int64(vendorStoreID))
|
||||
}
|
||||
if err != nil {
|
||||
if remoteStatus, err2 := c.GetStoreStatus(ctx, vendorOrgCode, storeID, vendorStoreID); err2 == nil && remoteStatus == status {
|
||||
|
||||
@@ -230,7 +230,6 @@ func (p *PurchaseHandler) DeleteStore(db *dao.DaoDB, storeID int, userName strin
|
||||
}
|
||||
|
||||
func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName string) (err error) {
|
||||
globals.SugarLogger.Debugf("===========data : %s",utils.Format4Output(storeID,false))
|
||||
if db == nil {
|
||||
db = dao.GetDB()
|
||||
}
|
||||
@@ -281,7 +280,6 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
||||
}
|
||||
|
||||
if globals.EnableMtwmStoreWrite {
|
||||
globals.SugarLogger.Debugf("===========data : %s",utils.Format4Output(params,false))
|
||||
errList.AddErr(mtapi.PoiSave(storeDetail.VendorStoreID, params))
|
||||
}
|
||||
if storeDetail.SyncStatus&(model.SyncFlagNewMask|model.SyncFlagStoreStatus) != 0 {
|
||||
|
||||
Reference in New Issue
Block a user