aa
This commit is contained in:
@@ -8,6 +8,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/fnpsapi"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/auth2/authprovider/weixin"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/delivery"
|
||||
"github.com/360EntSecGroup-Skylar/excelize"
|
||||
@@ -1827,34 +1829,20 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
||||
// })
|
||||
// }
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
storeIDs []int
|
||||
db = dao.GetDB()
|
||||
)
|
||||
stores, _ := dao.GetStoreList(db, nil, nil, nil, nil, "")
|
||||
for _, v := range stores {
|
||||
if v.ID == 100766 || v.ID == 100002 || v.ID == 100015 {
|
||||
continue
|
||||
}
|
||||
if v.StoreLevel == "A" || v.StoreLevel == "B" || v.StoreLevel == "C" || v.StoreLevel == "D" {
|
||||
if v.Status == model.StoreStatusOpened || v.Status == model.StoreStatusHaveRest {
|
||||
list, err := dao.GetStoresMapList(db, []int{model.VendorIDEBAI, model.VendorIDMTWM, model.VendorIDJD, model.VendorIDJDShop}, []int{v.ID}, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "", "")
|
||||
if err == nil && len(list) > 0 {
|
||||
_, err = cms.UpdateOrCreateCourierStores(ctx, v.ID, false, false, false)
|
||||
if err != nil {
|
||||
storeIDs = append(storeIDs, v.ID)
|
||||
} else {
|
||||
csList, _ := dao.GetStoreCourierList(db, []int{v.ID}, []int{model.VendorIDFengNiao}, model.StoreStatusAll, model.StoreAuditStatusAll)
|
||||
if len(csList) > 0 {
|
||||
csList[0].Status = 0
|
||||
dao.UpdateEntity(db, csList[0], "Status")
|
||||
}
|
||||
}
|
||||
}
|
||||
csList, _ := dao.GetStoreCourierList(db, nil, []int{model.VendorIDFengNiao}, model.StoreStatusAll, model.StoreAuditStatusAll)
|
||||
for _, v := range csList {
|
||||
stores, _ := dao.GetStoreList(db, []int{v.ID}, nil, nil, nil, "")
|
||||
store := stores[0]
|
||||
if !strings.Contains(store.Name, "京西菜市-") {
|
||||
params := &fnpsapi.CreateStoreParam{
|
||||
ChainStoreCode: utils.Int2Str(v.StoreID),
|
||||
ChainStoreName: "京西菜市-" + store.Name,
|
||||
}
|
||||
api.FnAPI.UpdateStore(params)
|
||||
}
|
||||
|
||||
}
|
||||
fmt.Println("errrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr", storeIDs)
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
@@ -344,6 +344,10 @@ jdShopAccessToken = "de8157b447584885910f429011e49cb93yjq"
|
||||
jdShopAppKey = "E1D746D42474D5F1F1A10CECE75D99F6"
|
||||
jdShopAppSecret = "efa7e1d1a22640fa990e6cf164b28608"
|
||||
|
||||
fnAppID = "6a3e2073-1850-413b-9eb7-6c342ec36e1c"
|
||||
fnAppSecret = "a8248088-a742-4c33-a0db-03aeae00ca7d"
|
||||
fnCallbackURL = "http://callback-jxgy.jxc4.com/fn/msg"
|
||||
|
||||
storeName = "京西果园"
|
||||
|
||||
[test]
|
||||
|
||||
Reference in New Issue
Block a user