| 
					
				 | 
			
			
				@@ -1,4 +1,5 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using AutoMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+using MySqlX.XDevAPI.Common; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using OASystem.Domain; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using OASystem.Domain.Dtos.Groups; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using OASystem.Domain.Dtos.Resource; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -9,6 +10,7 @@ using System.Collections.Generic; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using System.Linq; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using System.Text; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 using System.Threading.Tasks; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+using Result = OASystem.Domain.Result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 namespace OASystem.Infrastructure.Repositories.Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -19,6 +21,44 @@ namespace OASystem.Infrastructure.Repositories.Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _mapper= mapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        public async Task<Result> _Info(int portType, int id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (id< 1) return new Result() { Code = -1, Msg = "请传入Status参数,1添加 2修改!" }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            string sql = string.Format(@"SELECT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  Id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  City, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  [Name], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  [Level], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  [Address], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  Tel, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  Fax, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  Contact, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  ContactPhone, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  OtherInformation, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  Remark 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  Res_HotelData 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+WHERE 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  IsDel = 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  AND Id = {0}", id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (portType == 1 || portType == 2 || portType == 3) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                var info = await _sqlSugar.SqlQueryable<HotelDataInfoView>(sql).FirstAsync(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (info != null) return new Result() { Code = 0, Msg = "操作成功!",Data = info }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                return new Result() { Code = -1, Msg = "暂无数据!" }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+             
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return new Result() { Code = -1, Msg = "请传入Status参数,1添加 2修改!" }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         public async Task<Result> OperationHotelData(OperationHotelDto dto) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Result result = new Result() { Code = -2, Msg = "未知错误" }; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -72,5 +112,7 @@ namespace OASystem.Infrastructure.Repositories.Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |