首页推荐商家

This commit is contained in:
richboo111
2022-08-24 17:25:02 +08:00
parent 0219a7b02f
commit dd37849bf3
4 changed files with 154 additions and 45 deletions

View File

@@ -1537,3 +1537,22 @@ func GetBrandBill2(db *DaoDB, brandID int, vendorOrderID string, billType, feeTy
}
return data, err
}
type BrandInfos struct {
Name string
Logo string
}
//获取门店品牌信息
func GetStoreBrandInfos(storeID int) (date *BrandInfos, err error) {
var detail *BrandInfos
sqlParams := []interface{}{}
sql := "SELECT b.`name`,b.logo FROM store s LEFT JOIN brand b ON s.brand_id = b.id WHERE s.id= ? "
if storeID >= 0 {
sqlParams = append(sqlParams, storeID)
}
if err := GetRow(GetDB(), &detail, sql, sqlParams); err != nil {
return nil, err
}
return detail, err
}