1
This commit is contained in:
@@ -155,7 +155,7 @@ func GetCheckVendorCookie(ctx *jxcontext.Context, vendorIDs []int, isAuto bool)
|
||||
resultMap, err := api.EbaiAPI.GetStoreOrderInfo(ebaiOrderID)
|
||||
if len(resultMap) < 1 && err != nil {
|
||||
if strings.Contains(err.Error(), ebaiErr) || strings.Contains(err.Error(), ebaiErr2) {
|
||||
errMsg += fmt.Sprintf(" 饿百账号:[%v]的Cookie无效了!")
|
||||
errMsg += fmt.Sprintf(" 饿百账号:[%v]的Cookie无效了!", v)
|
||||
flag = true
|
||||
}
|
||||
}
|
||||
@@ -163,7 +163,7 @@ func GetCheckVendorCookie(ctx *jxcontext.Context, vendorIDs []int, isAuto bool)
|
||||
_, err := api.MtwmAPI.PackagePriceGet(mtStoreID)
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), mtErr) {
|
||||
errMsg += fmt.Sprintf(" 美团账号:[%v]的Cookie无效了!")
|
||||
errMsg += fmt.Sprintf(" 美团账号:[%v]的Cookie无效了!", v)
|
||||
flag = true
|
||||
}
|
||||
}
|
||||
@@ -171,7 +171,7 @@ func GetCheckVendorCookie(ctx *jxcontext.Context, vendorIDs []int, isAuto bool)
|
||||
result, err := api.JdAPI.GetJdUpcCodeByName("", jdUpcCode, 1, 5)
|
||||
if len(result) < 1 && err != nil {
|
||||
if strings.Contains(err.Error(), jdErr) {
|
||||
errMsg += fmt.Sprintf(" 京东账号:[%v]的Cookie无效了!")
|
||||
errMsg += fmt.Sprintf(" 京东账号:[%v]的Cookie无效了!", v)
|
||||
flag = true
|
||||
}
|
||||
}
|
||||
@@ -179,7 +179,7 @@ func GetCheckVendorCookie(ctx *jxcontext.Context, vendorIDs []int, isAuto bool)
|
||||
_, err := api.JdShopAPI.OrderDetail("124350112427")
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), "登录") {
|
||||
errMsg += fmt.Sprintf("京东商城:[%v]的Cookie无效了!")
|
||||
errMsg += fmt.Sprintf("京东商城:[%v]的Cookie无效了!", v)
|
||||
flag = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +175,19 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
||||
storeParams.StationName = utils.LimitUTF8StringLen(storeParams.StationName, jdapi.MaxStoreNameLen)
|
||||
}
|
||||
if store.SyncStatus&(model.SyncFlagNewMask|model.SyncFlagStoreAddress) != 0 {
|
||||
storeParams.StationAddress = store.Address
|
||||
storeDetail, _ := dao.GetStoreDetail(db, storeID, model.VendorIDJD, "")
|
||||
address := ""
|
||||
if !strings.Contains(store.Address, "省") && model.ZXCityCodeMap[store.CityCode] != "" {
|
||||
address += storeDetail.ProvinceName
|
||||
}
|
||||
if !strings.Contains(storeDetail.Address, "市") {
|
||||
address += storeDetail.CityName
|
||||
}
|
||||
if !strings.Contains(storeDetail.Address, "县") || !strings.Contains(storeDetail.Address, "区") {
|
||||
address += storeDetail.DistrictName
|
||||
}
|
||||
storeParams.StationAddress = address + storeDetail.Address
|
||||
|
||||
storeParams.CoordinateType = jdapi.CoordinateTypeAutonavi // 一直用高德
|
||||
storeParams.Lng = jxutils.IntCoordinate2Standard(store.Lng)
|
||||
storeParams.Lat = jxutils.IntCoordinate2Standard(store.Lat)
|
||||
@@ -576,6 +588,18 @@ func (p *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName stri
|
||||
if createParams.County == 310045 {
|
||||
createParams.City = 49318
|
||||
}
|
||||
address := ""
|
||||
if !strings.Contains(storeDetail.Address, "省") && model.ZXCityCodeMap[storeDetail.CityCode] != "" {
|
||||
address += storeDetail.ProvinceName
|
||||
}
|
||||
if !strings.Contains(storeDetail.Address, "市") {
|
||||
address += storeDetail.CityName
|
||||
}
|
||||
if !strings.Contains(storeDetail.Address, "县") || !strings.Contains(storeDetail.Address, "区") {
|
||||
address += storeDetail.DistrictName
|
||||
}
|
||||
createParams.StationAddress = address + storeDetail.Address
|
||||
|
||||
result, err := getAPI(vendorOrgCode).CreateStore(createParams)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
Reference in New Issue
Block a user