- GetStores keyword support vendor_store_id.
This commit is contained in:
@@ -123,8 +123,8 @@ func GetStores(ctx *jxcontext.Context, keyword string, params map[string]interfa
|
||||
}
|
||||
if keyword != "" {
|
||||
keywordLike := "%" + keyword + "%"
|
||||
sqlWhere += " AND (t1.name LIKE ? OR t1.address LIKE ? OR t1.tel1 LIKE ? OR t1.tel2 LIKE ? OR t1.last_operator LIKE ? OR city.name LIKE ?"
|
||||
sqlWhereParams = append(sqlWhereParams, keywordLike, keywordLike, keywordLike, keywordLike, keywordLike, keywordLike)
|
||||
sqlWhere += " AND (t1.name LIKE ? OR t1.address LIKE ? OR t1.tel1 LIKE ? OR t1.tel2 LIKE ? OR t1.last_operator LIKE ? OR city.name LIKE ? OR m1.vendor_store_id LIKE ? OR m2.vendor_store_id LIKE ?"
|
||||
sqlWhereParams = append(sqlWhereParams, keywordLike, keywordLike, keywordLike, keywordLike, keywordLike, keywordLike, keywordLike, keywordLike)
|
||||
|
||||
if keywordInt64, err2 := strconv.ParseInt(keyword, 10, 64); err2 == nil {
|
||||
sqlWhere += " OR t1.id = ? OR t1.city_code = ? OR t1.district_code = ? OR t1.lng = ? OR t1.lat = ?"
|
||||
|
||||
@@ -109,14 +109,14 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
||||
"stationAddress": store.Address,
|
||||
"serviceTimeStart1": JxOperationTime2JdOperationTime(store.OpenTime1),
|
||||
"serviceTimeEnd1": JxOperationTime2JdOperationTime(store.CloseTime1),
|
||||
"deliveryRangeType": store.DeliveryRangeType,
|
||||
"coordinateType": 3, // 一直用高德
|
||||
"lng": jxutils.IntCoordinate2Standard(store.Lng),
|
||||
"lat": jxutils.IntCoordinate2Standard(store.Lat),
|
||||
"city": store.JdCityCode,
|
||||
"county": store.JdDistrictCode,
|
||||
"phone": store.Tel1,
|
||||
"mobile": store.Tel2,
|
||||
// "deliveryRangeType": store.DeliveryRangeType,
|
||||
"coordinateType": 3, // 一直用高德
|
||||
"lng": jxutils.IntCoordinate2Standard(store.Lng),
|
||||
"lat": jxutils.IntCoordinate2Standard(store.Lat),
|
||||
"city": store.JdCityCode,
|
||||
"county": store.JdDistrictCode,
|
||||
"phone": store.Tel1,
|
||||
"mobile": store.Tel2,
|
||||
}
|
||||
// if store.DeliveryRangeType == model.DeliveryRangeTypePolygon {
|
||||
// params["coordinatePoints"] = store.DeliveryRange
|
||||
|
||||
Reference in New Issue
Block a user