新增根据网关账号获取门店信息
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user