1
This commit is contained in:
@@ -158,18 +158,8 @@ func (P *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
||||
if db == nil {
|
||||
db = dao.GetDB()
|
||||
}
|
||||
sqlStr := ` SELECT
|
||||
t1.*,
|
||||
t2.status, t2.vendor_store_id, t2.vendor_org_code,
|
||||
IF(t1.updated_at > t2.updated_at, t1.last_operator, t2.last_operator) real_last_operator, t2.sync_status, t2.vendor_store_name
|
||||
FROM store t1
|
||||
LEFT 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`
|
||||
err = dao.GetRow(db, &storeInfo, sqlStr, model.VendorIDDD, utils.DefaultTimeValue, utils.Int2Str(storeID))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
storeInfo, err = dao.GetStoreDetail(db, storeID, model.VendorIDDD, "")
|
||||
|
||||
errList := errlist.New()
|
||||
timeStr := ""
|
||||
m := make(map[int64]string)
|
||||
|
||||
Reference in New Issue
Block a user