Beispiel #1
0
        protected override DTObject DynamicInvoke(dynamic arg)
        {
            var cmd     = new AccountSubsystem.Login(arg.Flag, arg.Password, arg.Ip);
            var account = cmd.Execute();

            if (account.IsEmpty())
            {
                return(Failed);
            }
            var user = UserCommon.FindById(account.Id, QueryLevel.None);

            var result = DTObject.CreateReusable("{id,displayName,photo:{storeKey},account:{email,roles:[{id,markedCode}]}}", user);

            result.Transform("email=account.email;roles=account.roles;!account");
            return(result);
        }
Beispiel #2
0
        protected override DTObject DynamicInvoke(dynamic arg)
        {
            var user = UserCommon.FindById(arg.Id, QueryLevel.None);

            return(DTObject.Create("{id,name,sex,photo:{id,name,createTime,size,storeKey,extension},account:{id,name,email,mobileNumber}}", user));
        }