dada门店名
This commit is contained in:
@@ -205,7 +205,7 @@ func GetStoreDetail2(db *DaoDB, storeID int, vendorStoreID string, vendorID int)
|
||||
return storeDetail, err
|
||||
}
|
||||
|
||||
func GetStoreCourierList(db *DaoDB, storeIDs []int, status, auditStatus int) (courierStoreList []*model.StoreCourierMap, err error) {
|
||||
func GetStoreCourierList(db *DaoDB, storeIDs, vendorIDs []int, status, auditStatus int) (courierStoreList []*model.StoreCourierMap, err error) {
|
||||
sql := `
|
||||
SELECT t1.*
|
||||
FROM store_courier_map t1
|
||||
@@ -218,6 +218,10 @@ func GetStoreCourierList(db *DaoDB, storeIDs []int, status, auditStatus int) (co
|
||||
sql += " AND t1.store_id IN (" + GenQuestionMarks(len(storeIDs)) + ")"
|
||||
sqlParams = append(sqlParams, storeIDs)
|
||||
}
|
||||
if len(vendorIDs) > 0 {
|
||||
sql += " AND t1.vendor_id IN (" + GenQuestionMarks(len(vendorIDs)) + ")"
|
||||
sqlParams = append(sqlParams, vendorIDs)
|
||||
}
|
||||
if status != model.StoreStatusAll {
|
||||
sql += " AND t1.status = ?"
|
||||
sqlParams = append(sqlParams, status)
|
||||
|
||||
@@ -17,7 +17,7 @@ func TestGetStoreDetail(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetStoreCourierList(t *testing.T) {
|
||||
storeCourierList, err := GetStoreCourierList(GetDB(), []int{100119}, model.StoreStatusOpened, model.StoreAuditStatusOnline)
|
||||
storeCourierList, err := GetStoreCourierList(GetDB(), []int{100119}, nil, model.StoreStatusOpened, model.StoreAuditStatusOnline)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user