Przeglądaj źródła

Merge branch 'master' of http://110.188.24.182:10023/Fengwo/hotline

xf 1 rok temu
rodzic
commit
735f0e5abd
1 zmienionych plików z 18 dodań i 6 usunięć
  1. 18 6
      src/Hotline.Api/Controllers/OrderController.cs

+ 18 - 6
src/Hotline.Api/Controllers/OrderController.cs

@@ -666,6 +666,10 @@ public class OrderController : BaseController
         model.State = 0;
         var id = await _orderSuperviseRepository.AddAsync(model, HttpContext.RequestAborted);
         if (dto.Files.Any()) await _fileRepository.AddFileAsync(dto.Files, id, HttpContext.RequestAborted);
+        if (dto.AcceptSms)
+        {
+	        //TODO 发送短信
+        }
         return id;
     }
 
@@ -721,7 +725,9 @@ public class OrderController : BaseController
     {
         return await _orderSuperviseRepository.Queryable()
             .Includes(x => x.Order)
-            .FirstAsync(x => x.Id == id);
+            .Includes(x => x.CrUser)
+            .Includes(x => x.ReUser)
+			.FirstAsync(x => x.Id == id);
     }
 
     #endregion
@@ -768,10 +774,14 @@ public class OrderController : BaseController
         var model = _mapper.Map<OrderUrge>(dto);
         model.CreatorOrgName = _sessionContext.OrgName;
         model.State = 0;
-        var id = await _orderUrgeRepository.AddAsync(model, HttpContext.RequestAborted);
-        if (dto.Files.Any()) await _fileRepository.AddFileAsync(dto.Files, id, HttpContext.RequestAborted);
-        return id;
-    }
+		var id = await _orderUrgeRepository.AddAsync(model, HttpContext.RequestAborted);
+		if (dto.Files.Any()) await _fileRepository.AddFileAsync(dto.Files, id, HttpContext.RequestAborted);
+		if (dto.AcceptSms)
+		{
+			//TODO 发送短信
+		}
+		return id;
+	}
 
     /// <summary>
     /// 回复催办
@@ -826,7 +836,9 @@ public class OrderController : BaseController
     {
         return await _orderUrgeRepository.Queryable()
             .Includes(x => x.Order)
-            .FirstAsync(x => x.Id == id);
+            .Includes(x => x.CrUser)
+            .Includes(x => x.ReUser)
+			.FirstAsync(x => x.Id == id);
     }
 
     #endregion