- 整理partner.ReadStore
This commit is contained in:
@@ -25,10 +25,8 @@ type StoreDetail struct {
|
||||
DeliveryCompetition int8 `orm:"default(1)" json:"deliveryCompetition"` // 是否支持配送竞争
|
||||
IsSync int8 `orm:"default(1)" json:"isSync"` // 是否同步
|
||||
|
||||
model.Place // district info
|
||||
DistrictName string `json:"-"`
|
||||
|
||||
CityName string
|
||||
DistrictName string `json:"districtName"`
|
||||
CityName string `json:"cityName"`
|
||||
}
|
||||
|
||||
type StoreDetail2 struct {
|
||||
@@ -48,8 +46,7 @@ func getStoreDetail(db *DaoDB, storeID, vendorID int, vendorStoreID string) (sto
|
||||
SELECT t1.*,
|
||||
t2.vendor_store_id, t2.status vendor_status, t2.delivery_fee, t2.sync_status,
|
||||
t2.price_percentage, t3.value price_percentage_pack_str, t2.auto_pickup, t2.delivery_type, t2.delivery_competition, t2.is_sync,
|
||||
district.code, district.name district_name, district.parent_code, district.level, district.tel_code,
|
||||
district.jd_code, district.ebai_code, district.enabled, district.mtps_price,
|
||||
district.name district_name,
|
||||
city.name city_name
|
||||
FROM store t1
|
||||
JOIN store_map t2 ON t1.id = t2.store_id AND t2.vendor_id = ? AND t2.deleted_at = ?
|
||||
@@ -75,7 +72,6 @@ func getStoreDetail(db *DaoDB, storeID, vendorID int, vendorStoreID string) (sto
|
||||
}
|
||||
storeDetail = &StoreDetail{}
|
||||
if err = GetRow(db, storeDetail, sql, sqlParams...); err == nil {
|
||||
storeDetail.Place.Name = storeDetail.DistrictName
|
||||
storeDetail.PricePercentagePackObj = PricePercentagePack2Obj(storeDetail.PricePercentagePackStr)
|
||||
return storeDetail, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user