2024-11-05 09:49:02 +08:00
|
|
|
package repo
|
|
|
|
|
|
|
|
import (
|
|
|
|
"yuleduiPay/service/po"
|
|
|
|
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Shop struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (t *Shop) GetShopById(shopId string) (*po.Shop, error) {
|
|
|
|
shop := &po.Shop{}
|
|
|
|
err := g.Model("shop").Where("shop_id = ?", shopId).Scan(shop)
|
|
|
|
return shop, err
|
|
|
|
}
|
2024-11-22 09:23:33 +08:00
|
|
|
|
|
|
|
func (t *Shop) GetShopAdminByShopId(shopId string) (*po.ShopAdmin, error) {
|
|
|
|
shopAdmin := &po.ShopAdmin{}
|
|
|
|
err := g.Model("shop_admin").Where("shop_id = ?", shopId).Scan(shopAdmin)
|
|
|
|
return shopAdmin, err
|
|
|
|
}
|