|
|
@@ -41,7 +41,7 @@ namespace HKLib.Interfaces |
|
|
|
var res = data.ToModel<JObject>()["data"]["isSuccess"].ToString().AsBool(); |
|
|
|
if (res) |
|
|
|
{ |
|
|
|
ServiceQueryPush.QueryPush.PushMQ(input, "TimeChanged", MQEnum.Push); |
|
|
|
ServiceQueryPush.QueryPush.PushMQAsync(input, "TimeChanged", MQEnum.Push); |
|
|
|
return res; |
|
|
|
} |
|
|
|
return false; |
|
|
@@ -99,12 +99,13 @@ namespace HKLib.Interfaces |
|
|
|
/// <param name="keyword"></param> |
|
|
|
public static List<UserListDto> GetUserList(string keyword) |
|
|
|
{ |
|
|
|
return IHttpMultiClient.HttpMulti.AddHeader(t => t.Headers = Header).AddNode(t => |
|
|
|
{ |
|
|
|
t.NodePath = $"{Configer.SaasRoute}api/one-card/staff-list"; |
|
|
|
t.ReqType = MultiType.POST; |
|
|
|
t.JsonParam = (new { realName = keyword }).ToJson(); |
|
|
|
}).Build().RunStringFirst().ToModel<JObject>()["data"]["data"].ToJson().ToModel<List<UserListDto>>(); |
|
|
|
var data = IHttpMultiClient.HttpMulti.AddHeader(t => t.Headers = Header).AddNode(t => |
|
|
|
{ |
|
|
|
t.NodePath = $"{Configer.SaasRoute}api/one-card/staff-list"; |
|
|
|
t.ReqType = MultiType.POST; |
|
|
|
t.JsonParam = (new { realName = keyword }).ToJson(); |
|
|
|
}).Build().RunStringFirst(); |
|
|
|
return data.ToModel<JObject>()["data"]["data"].ToJson().ToModel<List<UserListDto>>(); |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// 添加用户并绑卡 |
|
|
@@ -126,11 +127,12 @@ namespace HKLib.Interfaces |
|
|
|
/// <returns></returns> |
|
|
|
public static bool DisableUser(string userName) |
|
|
|
{ |
|
|
|
List<string> a = new List<string>() { userName }; |
|
|
|
return IHttpMultiClient.HttpMulti.AddHeader(t => t.Headers = Header).AddNode(t => |
|
|
|
{ |
|
|
|
t.NodePath = $"{Configer.SaasRoute}api/one-card/mmenber-card"; |
|
|
|
t.NodePath = $"{Configer.SaasRoute}api/one-card/del-staff"; |
|
|
|
t.ReqType = MultiType.POST; |
|
|
|
t.JsonParam = (new { realName = userName }).ToJson(); |
|
|
|
t.JsonParam = a.ToJson(); |
|
|
|
}).Build().RunStringFirst().ToModel<JObject>()["data"]["isSuccess"].ToString().AsBool(); |
|
|
|
} |
|
|
|
/// <summary> |
|
|
@@ -152,7 +154,7 @@ namespace HKLib.Interfaces |
|
|
|
/// <param name="input"></param> |
|
|
|
public static bool CardStutasChange(CardStutasDto input) |
|
|
|
{ |
|
|
|
input.CardNo = GetUserList(input.keywrod).FirstOrDefault(t => t.Name.Equals(input.keywrod)).Cards.FirstOrDefault(t => t.State == 1).CardNum; |
|
|
|
input.CardNo = GetUserList(input.keywrod).FirstOrDefault(t => t.Name.Equals(input.keywrod)).Cards.FirstOrDefault().CardNum; |
|
|
|
|
|
|
|
var x = IHttpMultiClient.HttpMulti.AddHeader(t => t.Headers = Header).AddNode(t => |
|
|
|
{ |
|
|
@@ -162,7 +164,7 @@ namespace HKLib.Interfaces |
|
|
|
}).Build().RunStringFirst().ToModel<JObject>()["data"]["isSuccess"].ToString().AsBool(); |
|
|
|
if (x) |
|
|
|
{ |
|
|
|
ServiceQueryPush.QueryPush.PushMQ(input, "CardStutasChanged", MQEnum.Top); |
|
|
|
ServiceQueryPush.QueryPush.PushMQAsync(input, "CardStutasChanged", MQEnum.Top); |
|
|
|
return x; |
|
|
|
} |
|
|
|
return false; |
|
|
|