- 修复GetAndStoreCitiesShops中城市继续的bug(找不到城市的情况)

This commit is contained in:
gazebo
2019-09-12 18:24:12 +08:00
parent 9c135ed927
commit e0418ad25a

View File

@@ -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
}