LEIYI 4 days ago
parent
commit
22242fbf74

+ 18 - 0
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -19848,6 +19848,24 @@ ORDER BY
             return Ok(await _restaurantRep.ItemAsync(portType,groupId));
         }
 
+        /// <summary>
+        /// 团组相关餐厅信息
+        /// List
+        /// </summary>
+        /// <param name="dto"></param>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> RestaurantList(RestaurantItemDto dto)
+        {
+            int portType = dto.PortType,
+                groupId = dto.GroupId;
+            if (!SharingStaticData.PortTypes.Contains(portType)) return Ok(JsonView(false, MsgTips.Port));
+            if (groupId < 1) return Ok(JsonView(false, MsgTips.DiId));
+
+            return Ok(await _restaurantRep.ItemAsync(portType, groupId));
+        }
+
         /// <summary>
         /// 团组相关餐厅信息
         /// Info

+ 2 - 0
OASystem/OASystem.Infrastructure/Repositories/Groups/RestaurantRepository.cs

@@ -101,6 +101,8 @@ FROM
 WHERE
   ri.IsDel = 0
   AND ri.GroupId = {0}
+ORDER BY
+  ri.Date ASC
 ", groupId);
 
             var infos = await _sqlSugar.SqlQueryable<RestaurantItemView>(sql).ToListAsync();