1
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
func GetStoreContract(db *DaoDB, storeId int, orderId string) (*model.LakalaContract, error) {
|
||||
func GetStoreContract(db *DaoDB, storeId int, orderId string, contractApplyId string) (*model.LakalaContract, error) {
|
||||
merchantObj := &model.LakalaContract{}
|
||||
param := []interface{}{}
|
||||
sql := ` SELECT * FROM lakala_contract WHERE 1=1`
|
||||
@@ -21,6 +21,12 @@ func GetStoreContract(db *DaoDB, storeId int, orderId string) (*model.LakalaCont
|
||||
sql += ` AND contract_id = ?`
|
||||
param = append(param, orderId)
|
||||
}
|
||||
|
||||
if contractApplyId != "" {
|
||||
sql += ` AND contract_apply_id = ?`
|
||||
param = append(param, contractApplyId)
|
||||
}
|
||||
|
||||
if err := GetRow(db, merchantObj, sql, param...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user