- 绑定达达时,刷新门店信息
This commit is contained in:
@@ -25,6 +25,7 @@ type StoreDetail struct {
|
||||
type StoreDetail2 struct {
|
||||
model.Store
|
||||
VendorStoreID string `orm:"column(vendor_store_id)` // 这个在GetMissingDadaStores返回中指的是到家的vendorStoreID
|
||||
DadaStoreID string `orm:"column(dada_store_id)`
|
||||
DistrictName string
|
||||
CityName string
|
||||
}
|
||||
@@ -132,12 +133,13 @@ func GetMissingDadaStores(db *DaoDB, storeID int, isMustHaveJdStore bool) (store
|
||||
SELECT t1.*,
|
||||
t2.vendor_store_id vendor_store_id,
|
||||
city.name city_name, district.name district_name
|
||||
t3.vendor_store_id dada_store_id
|
||||
FROM store t1
|
||||
LEFT JOIN store_map t2 ON t1.id = t2.store_id AND t2.vendor_id = ? AND t2.deleted_at = ?
|
||||
JOIN place city ON city.code = t1.city_code
|
||||
JOIN place district ON district.code = t1.district_code
|
||||
LEFT JOIN store_courier_map t3 ON t3.store_id = t1.id AND t3.vendor_id = ? AND t3.deleted_at = ?
|
||||
WHERE t1.deleted_at = ? AND t3.id IS NULL
|
||||
WHERE t1.deleted_at = ?
|
||||
`
|
||||
sqlParams := []interface{}{
|
||||
model.VendorIDJD,
|
||||
|
||||
Reference in New Issue
Block a user