新增根据网关账号获取门店信息

This commit is contained in:
chy
2025-07-08 19:25:20 +08:00
parent afa6b8bcd1
commit e3ee281c7f
9 changed files with 57 additions and 1 deletions

View File

@ -374,3 +374,15 @@ func (s *sStore) SaveNetfeeSetting(ctx context.Context, in *model.SaveNetfeeSett
Success: true,
}, nil
}
// GetStoreInfoByNetbarAccount 根据网关账号获取门店信息
func (s *sStore) GetStoreInfoByNetbarAccount(ctx context.Context, in *model.StoreByNetbarAccountIn) (out *model.StoreByNetbarAccountOut, err error) {
var data model.Store
if err = dao.Stores.Ctx(ctx).Where(do.Stores{NetbarAccount: in.NetbarAccount}).Fields(dao.Stores.Columns().Id, dao.Stores.Columns().Name).Scan(&data); err != nil {
return nil, ecode.Fail.Sub("查询门店信息失败")
}
return &model.StoreByNetbarAccountOut{
Store: data,
}, nil
}