调整接口
This commit is contained in:
@ -263,3 +263,16 @@ func (s *sStore) DeleteIP(ctx context.Context, in *model.IPDeleteIn) (*model.IPD
|
||||
Success: true,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (s *sStore) Detail(ctx context.Context, in *model.StoreDetailIn) (out *model.StoreDetailOut, err error) {
|
||||
one, err := dao.Stores.Ctx(ctx).Where(do.Stores{NetbarAccount: in.NetbarAccount}).One()
|
||||
if err != nil {
|
||||
return nil, ecode.Fail.Sub("查询门店出现异常")
|
||||
}
|
||||
if one.IsEmpty() {
|
||||
return nil, ecode.Params.Sub("门店不存在")
|
||||
}
|
||||
return &model.StoreDetailOut{
|
||||
Id: one[dao.Stores.Columns().Id].Int64(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user