- updatestore
This commit is contained in:
@@ -148,7 +148,7 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
||||
SELECT t1.*, t2.status ebai_store_status, t2.vendor_store_id,
|
||||
IF(t1.updated_at > t2.updated_at, t1.last_operator, t2.last_operator) real_last_operator, t2.sync_status
|
||||
FROM store t1
|
||||
JOIN store_map t2 ON t1.id = t2.store_id AND t2.vendor_id = ? AND (t2.deleted_at = ? OR t2.sync_status <> 0)
|
||||
JOIN store_map t2 ON t1.id = t2.store_id AND t2.vendor_id = ? AND (t2.deleted_at = ?)
|
||||
WHERE t1.id = ?
|
||||
ORDER BY t2.updated_at
|
||||
`
|
||||
|
||||
@@ -98,7 +98,7 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
||||
SELECT t1.*, city.jd_code jd_city_code, district.jd_code jd_district_code, t2.status jd_store_status, t2.vendor_store_id,
|
||||
IF(t1.updated_at > t2.updated_at, t1.last_operator, t2.last_operator) real_last_operator, t2.sync_status
|
||||
FROM store t1
|
||||
JOIN store_map t2 ON t1.id = t2.store_id AND t2.vendor_id = ? AND (t2.deleted_at = ? OR t2.sync_status <> 0)
|
||||
JOIN store_map t2 ON t1.id = t2.store_id AND t2.vendor_id = ? AND (t2.deleted_at = ?)
|
||||
LEFT JOIN place city ON t1.city_code = city.code
|
||||
LEFT JOIN place district ON t1.district_code = district.code
|
||||
WHERE t1.id = ?
|
||||
@@ -141,7 +141,7 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
||||
params["serviceTimeEnd2"] = JxOperationTime2JdOperationTime(store.CloseTime2)
|
||||
}
|
||||
_, params["closeStatus"] = JxStoreStatus2JdStatus(jxutils.MergeStoreStatus(store.Status, store.JdStoreStatus))
|
||||
// globals.SugarLogger.Debug(utils.Format4Output(params, false))
|
||||
globals.SugarLogger.Debug(utils.Format4Output(params, false))
|
||||
if globals.EnableStoreWrite {
|
||||
if err = api.JdAPI.UpdateStoreInfo4Open(store.VendorStoreID, store.RealLastOperator, params); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user