瀏覽代碼

优化日志相关接口代码

Li 3 年之前
父節點
當前提交
e7d01e7ce0
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      TEAMModelBI/Controllers/OperateRecord/OperateLogController.cs

+ 4 - 4
TEAMModelBI/Controllers/OperateRecord/OperateLogController.cs

@@ -47,7 +47,7 @@ namespace TEAMModelBI.Controllers.OperateRecord
                 jsonElement.TryGetProperty("startDate", out JsonElement startDate);
                 jsonElement.TryGetProperty("startDate", out JsonElement startDate);
                 jsonElement.TryGetProperty("endDate", out JsonElement endDate);
                 jsonElement.TryGetProperty("endDate", out JsonElement endDate);
                 jsonElement.TryGetProperty("platform", out JsonElement platform);
                 jsonElement.TryGetProperty("platform", out JsonElement platform);
-                jsonElement.TryGetProperty("reorder", out JsonElement orderby);
+                if(!jsonElement.TryGetProperty("reorder", out JsonElement orderby)) return BadRequest();
 
 
                 List<BIOptLog> operateLogs = new();
                 List<BIOptLog> operateLogs = new();
                 StringBuilder tableSql = new StringBuilder();
                 StringBuilder tableSql = new StringBuilder();
@@ -81,7 +81,7 @@ namespace TEAMModelBI.Controllers.OperateRecord
             }
             }
             catch (Exception ex)
             catch (Exception ex)
             {
             {
-                await _dingDing.SendBotMsg($"BI,{_option.Location}  \n  {ex.Message}{ex.StackTrace} /operatelog/get-record",GroupNames.成都开发測試群組);
+                await _dingDing.SendBotMsg($"BI,{_option.Location}  /operatelog/get-record \n  {ex.Message}{ex.StackTrace} ",GroupNames.成都开发測試群組);
                 return BadRequest();
                 return BadRequest();
             }
             }
         }
         }
@@ -130,7 +130,7 @@ namespace TEAMModelBI.Controllers.OperateRecord
             }
             }
             catch (Exception ex)
             catch (Exception ex)
             {
             {
-                await _dingDing.SendBotMsg($"BI, {_option.Location} /operatelog/del-record  {ex.Message}{ex.StackTrace}", GroupNames.成都开发測試群組);
+                await _dingDing.SendBotMsg($"BI, {_option.Location} /operatelog/del-record \n {ex.Message}{ex.StackTrace}", GroupNames.成都开发測試群組);
                 return BadRequest();
                 return BadRequest();
             }
             }
         }
         }
@@ -161,7 +161,7 @@ namespace TEAMModelBI.Controllers.OperateRecord
             }
             }
             catch (Exception ex)
             catch (Exception ex)
             {
             {
-                await _dingDing.SendBotMsg($"BI, {_option.Location} /operatelog/get-logtmdid  {ex.Message}{ex.StackTrace}", GroupNames.成都开发測試群組);
+                await _dingDing.SendBotMsg($"BI, {_option.Location} /operatelog/get-logtmdid  \n {ex.Message}{ex.StackTrace}", GroupNames.成都开发測試群組);
                 return BadRequest();
                 return BadRequest();
             }
             }
         }
         }