- try to fix index out of range bug in AddStoreVendorMap.

This commit is contained in:
gazebo
2019-01-25 14:16:02 +08:00
parent 547447caad
commit 0af50522a1
2 changed files with 2 additions and 1 deletions

View File

@@ -463,7 +463,7 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendorID
if err == nil && vendorID == model.VendorIDJD {
db := dao.GetDB()
storeDetailList, err2 := dao.GetMissingDadaStores(db, storeID)
if err = err2; err == nil {
if err = err2; err == nil && len(storeDetailList) > 0 {
storeDetail := storeDetailList[0]
if _, err = api.DadaAPI.ShopAdd(utils.Int2Str(storeID), storeDetail.Name, dadaapi.BusinessTypeConvStore, storeDetail.CityName,
storeDetail.DistrictName, storeDetail.Address, jxutils.IntCoordinate2Standard(storeDetail.Lng), jxutils.IntCoordinate2Standard(storeDetail.Lat),

View File

@@ -49,6 +49,7 @@ var (
OrderStatusUnknown: "一般事件",
OrderStatusWait4Pay: "待付款",
OrderStatusNew: "新订单",
OrderStatusAdjust: "调整单",
OrderStatusAccepted: "已接单",