Exemplo n.º 1
0
 public string PostChanceAndVoltage(string id, int chance, int voltage)
 {
     try
     {
         if (string.IsNullOrEmpty(id))
         {
             return(JsonExtensionsApi.JsonOtherStatus(ResponseStatus.请求参数不正确));
         }
         thisData.SetChanceAndVoltage(new ObjectId(id), chance, voltage);
         return(JsonExtensionsApi.JsonSuccessStatus);
     }
     catch (Exception)
     {
         return(JsonExtensionsApi.JsonErrorStatus);
     }
 }
Exemplo n.º 2
0
 public string Delete(string id)
 {
     try
     {
         if (string.IsNullOrEmpty(id))
         {
             return(JsonExtensionsApi.JsonOtherStatus(ResponseStatus.请求参数不正确));
         }
         thisData.ChangeAuthorize(id, false);
         return(JsonExtensionsApi.JsonSuccessStatus);
     }
     catch (Exception)
     {
         return(JsonExtensionsApi.JsonErrorStatus);
     }
 }
 public async Task <string> SendOutCoin(OutCoinMessageModel outCoinMessageModel)
 {
     try
     {
         outCoinMessageModel.MType     = MessageType.OutCoin;
         outCoinMessageModel.MessageID = ObjectId.GenerateNewId();
         return(JsonExtensionsApi.JsonOtherStatus(
                    await MessageManager.GetMessageManager()
                    .Send(outCoinMessageModel)));
     }
     catch (WebTools.WebExceptionModel em)
     {
         return(JsonExtensionsApi.JsonOtherStatus(em.ExceptionParam));
     }
     catch (Exception)
     {
         return(JsonExtensionsApi.JsonErrorStatus);
     }
 }