This commit is contained in:
richboo111
2023-05-05 14:48:54 +08:00
parent 2b7bfe4e5e
commit 82cd796b5c
11 changed files with 343 additions and 188 deletions

View File

@@ -1653,9 +1653,9 @@ func GetStoreBaseByVendorStoreID(vendorStoreID string, vendorID int) (storeDetai
return nil, errors.New("vendorStoreID不能为空")
}
DefaultTimeValue := utils.Str2Time("1970-01-01 00:00:00")
sql := `SELECT t.* FROM store t WHERE t.id = (SELECT s.store_id FROM store_map s WHERE s.vendor_store_id= ? AND s.vendor_id= ? AND s.deleted_at= ? )`
if err := GetRow(GetDB(), &storeDetail, sql, []interface{}{vendorStoreID, vendorID, DefaultTimeValue}); err != nil {
//DefaultTimeValue := utils.Str2Time("1970-01-01 00:00:00")
sql := `SELECT t.* FROM store t WHERE t.id = (SELECT s.store_id FROM store_map s WHERE s.vendor_store_id= ? AND s.vendor_id= ? AND s.deleted_at= '1970-01-01 00:00:00' )`
if err := GetRow(GetDB(), &storeDetail, sql, []interface{}{vendorStoreID, vendorID}); err != nil {
return nil, err
}
return storeDetail, err