- 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 != "" {
|
if keyword != "" {
|
||||||
keywordLike := "%" + 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 ?"
|
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)
|
sqlWhereParams = append(sqlWhereParams, keywordLike, keywordLike, keywordLike, keywordLike, keywordLike, keywordLike, keywordLike, keywordLike)
|
||||||
|
|
||||||
if keywordInt64, err2 := strconv.ParseInt(keyword, 10, 64); err2 == nil {
|
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 = ?"
|
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,
|
"stationAddress": store.Address,
|
||||||
"serviceTimeStart1": JxOperationTime2JdOperationTime(store.OpenTime1),
|
"serviceTimeStart1": JxOperationTime2JdOperationTime(store.OpenTime1),
|
||||||
"serviceTimeEnd1": JxOperationTime2JdOperationTime(store.CloseTime1),
|
"serviceTimeEnd1": JxOperationTime2JdOperationTime(store.CloseTime1),
|
||||||
"deliveryRangeType": store.DeliveryRangeType,
|
// "deliveryRangeType": store.DeliveryRangeType,
|
||||||
"coordinateType": 3, // 一直用高德
|
"coordinateType": 3, // 一直用高德
|
||||||
"lng": jxutils.IntCoordinate2Standard(store.Lng),
|
"lng": jxutils.IntCoordinate2Standard(store.Lng),
|
||||||
"lat": jxutils.IntCoordinate2Standard(store.Lat),
|
"lat": jxutils.IntCoordinate2Standard(store.Lat),
|
||||||
"city": store.JdCityCode,
|
"city": store.JdCityCode,
|
||||||
"county": store.JdDistrictCode,
|
"county": store.JdDistrictCode,
|
||||||
"phone": store.Tel1,
|
"phone": store.Tel1,
|
||||||
"mobile": store.Tel2,
|
"mobile": store.Tel2,
|
||||||
}
|
}
|
||||||
// if store.DeliveryRangeType == model.DeliveryRangeTypePolygon {
|
// if store.DeliveryRangeType == model.DeliveryRangeTypePolygon {
|
||||||
// params["coordinatePoints"] = store.DeliveryRange
|
// params["coordinatePoints"] = store.DeliveryRange
|
||||||
|
|||||||
Reference in New Issue
Block a user