diff --git a/customer/service.go b/customer/service.go new file mode 100644 index 0000000..57cee5f --- /dev/null +++ b/customer/service.go @@ -0,0 +1,7 @@ +package customer + +type serviceId uint + +const ( + ServiceSupply serviceId = 1 // 供应链 +) diff --git a/customer/user.go b/customer/user.go index df74d3f..f0a79e5 100644 --- a/customer/user.go +++ b/customer/user.go @@ -102,8 +102,18 @@ func (u *user) Disable(ctx context.Context, userId uint) error { return client.GetClient(u).Call(ctx, "Disable", userId, &reply) } -// SecretByAppKey @Title 通过appKey获取Secret -func (u *user) SecretByAppKey(ctx context.Context, appKey string) (appSecret string, err error) { - err = client.GetClient(u).Call(ctx, "Disable", appKey, &appSecret) +type ArgsUserServiceInfo struct { + ServiceId uint // 服务id + AppKey string // 渠道appKey +} +type ReplyUserServiceInfo struct { + CustomerId uint `json:"customerId"` + AppSecret string `json:"appSecret"` + ExpirationAt int64 `json:"expirationAt"` +} + +// ServiceInfo @Title 获取服务信息 +func (u *user) ServiceInfo(ctx context.Context, args ArgsUserServiceInfo) (reply ReplyUserServiceInfo, err error) { + err = client.GetClient(u).Call(ctx, "ServiceInfo", args, &reply) return }