- 修复GetAndStoreCitiesShops中城市继续的bug(找不到城市的情况)
This commit is contained in:
@@ -152,8 +152,11 @@ func GetAndStoreCitiesShops(ctx *jxcontext.Context, vendorIDs []int, cityCodeLis
|
||||
if err2 := dao.GetRow(db, &lastShop, sql); err2 == nil {
|
||||
index := -1
|
||||
for k, v := range cityCodeList {
|
||||
if v == lastShop.CityCode {
|
||||
index = k + 1
|
||||
if v >= lastShop.CityCode {
|
||||
index = k
|
||||
if v == lastShop.CityCode {
|
||||
index++
|
||||
}
|
||||
if index >= len(cityCodeList) {
|
||||
index = -1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user