diff --git a/EOM.TSHotelManager.Application/Business/Cash/CashService.cs b/EOM.TSHotelManager.Application/Business/Cash/CashService.cs
index 84ff68168f5a1cfef1201a82427d5b245d31a826..a6691bba0b585078759a429b7d42acbd5e1e645d 100644
--- a/EOM.TSHotelManager.Application/Business/Cash/CashService.cs
+++ b/EOM.TSHotelManager.Application/Business/Cash/CashService.cs
@@ -21,9 +21,6 @@
*SOFTWARE.
*
*/
-using System;
-using System.Collections.Generic;
-using System.Linq;
using EOM.TSHotelManager.Common.Core;
using EOM.TSHotelManager.EntityFramework;
@@ -32,7 +29,7 @@ namespace EOM.TSHotelManager.Application
///
/// 资产信息接口实现类
///
- public class CashService:ICashService
+ public class CashService : ICashService
{
///
/// 资产信息
@@ -89,7 +86,7 @@ namespace EOM.TSHotelManager.Application
cs.ForEach(source =>
{
var dept = depts.FirstOrDefault(a => a.dept_no.Equals(source.CashClub));
- source.DeptName = dept == null? "" : dept.dept_name;
+ source.DeptName = dept == null ? "" : dept.dept_name;
var worker = workers.FirstOrDefault(a => a.WorkerId.Equals(source.CashPerson));
source.PersonName = worker == null ? "" : worker.WorkerName;
diff --git a/EOM.TSHotelManager.Application/Business/Cash/ICashService.cs b/EOM.TSHotelManager.Application/Business/Cash/ICashService.cs
index 3106ddcb3214862fb58e90e0df39f90e8bdab81a..471806e00868d921fd787ae3f9378a9ce719f576 100644
--- a/EOM.TSHotelManager.Application/Business/Cash/ICashService.cs
+++ b/EOM.TSHotelManager.Application/Business/Cash/ICashService.cs
@@ -22,7 +22,6 @@
*
*/
using EOM.TSHotelManager.Common.Core;
-using System.Collections.Generic;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Business/Customer/CustoService.cs b/EOM.TSHotelManager.Application/Business/Customer/CustoService.cs
index df842c6e3d0814f7de012919cf166c63cfd88191..78658331850f5d3c35d537833f910fa87435ec45 100644
--- a/EOM.TSHotelManager.Application/Business/Customer/CustoService.cs
+++ b/EOM.TSHotelManager.Application/Business/Customer/CustoService.cs
@@ -21,15 +21,10 @@
*SOFTWARE.
*
*/
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Linq.Expressions;
using CK.Common;
using EOM.Encrypt;
using EOM.TSHotelManager.Common.Core;
using EOM.TSHotelManager.EntityFramework;
-using Npgsql;
using SqlSugar;
namespace EOM.TSHotelManager.Application
@@ -37,7 +32,7 @@ namespace EOM.TSHotelManager.Application
///
/// 客户信息接口实现类
///
- public class CustoService:ICustoService
+ public class CustoService : ICustoService
{
///
/// 客户信息
@@ -96,7 +91,7 @@ namespace EOM.TSHotelManager.Application
///
public bool InsertCustomerInfo(Custo custo)
{
- string NewID = encrypt.Encryption(custo.CustoID,EncryptionLevel.Enhanced);
+ string NewID = encrypt.Encryption(custo.CustoID, EncryptionLevel.Enhanced);
string NewTel = encrypt.Encryption(custo.CustoTel, EncryptionLevel.Enhanced);
custo.CustoID = NewID;
custo.CustoTel = NewTel;
@@ -117,7 +112,7 @@ namespace EOM.TSHotelManager.Application
custo.CustoTel = NewTel;
return custoRepository.Update(a => new Custo()
{
- CustoName = custo.CustoName,
+ CustoName = custo.CustoName,
CustoSex = custo.CustoSex,
CustoType = custo.CustoType,
CustoBirth = custo.CustoBirth,
@@ -126,7 +121,7 @@ namespace EOM.TSHotelManager.Application
CustoTel = custo.CustoTel,
PassportType = custo.PassportType,
datachg_usr = custo.datachg_usr
- },a => a.CustoNo == custo.CustoNo);
+ }, a => a.CustoNo == custo.CustoNo);
}
///
@@ -135,7 +130,7 @@ namespace EOM.TSHotelManager.Application
///
///
///
- public bool UpdCustomerTypeByCustoNo(string custoNo,int userType)
+ public bool UpdCustomerTypeByCustoNo(string custoNo, int userType)
{
return custoRepository.Update(a => new Custo()
{
@@ -166,7 +161,7 @@ namespace EOM.TSHotelManager.Application
});
}
});
-
+
custoSpends = custoSpends.OrderBy(a => a.Years).ToList();
return custoSpends;
}
@@ -175,7 +170,7 @@ namespace EOM.TSHotelManager.Application
/// 查询所有客户信息
///
///
- public OSelectCustoAllDto SelectCustoAll(int? pageIndex,int? pageSize)
+ public OSelectCustoAllDto SelectCustoAll(int? pageIndex, int? pageSize, bool onlyVip = false)
{
OSelectCustoAllDto oSelectCustoAllDto = new OSelectCustoAllDto();
@@ -196,6 +191,10 @@ namespace EOM.TSHotelManager.Application
if (pageIndex != 0 && pageSize != 0)
{
custos = custoRepository.AsQueryable().ToPageList((int)pageIndex, (int)pageSize, ref count);
+ if (onlyVip)
+ {
+ custos = custoRepository.AsQueryable().Where(a => a.CustoType != 0).ToPageList((int)pageIndex, (int)pageSize, ref count);
+ }
}
else
{
diff --git a/EOM.TSHotelManager.Application/Business/Customer/ICustoService.cs b/EOM.TSHotelManager.Application/Business/Customer/ICustoService.cs
index f6617b5196b8658f038f4722a0b152ea48ac80f7..cc83e3a0fa2a302c958de709e2291ca643e4bbf8 100644
--- a/EOM.TSHotelManager.Application/Business/Customer/ICustoService.cs
+++ b/EOM.TSHotelManager.Application/Business/Customer/ICustoService.cs
@@ -22,7 +22,6 @@
*
*/
using EOM.TSHotelManager.Common.Core;
-using System.Collections.Generic;
namespace EOM.TSHotelManager.Application
{
@@ -63,7 +62,7 @@ namespace EOM.TSHotelManager.Application
/// 查询所有客户信息
///
///
- OSelectCustoAllDto SelectCustoAll(int? pageIndex, int? pageSize);
+ OSelectCustoAllDto SelectCustoAll(int? pageIndex, int? pageSize, bool onlyVip = false);
///
/// 查询指定客户信息
diff --git a/EOM.TSHotelManager.Application/Business/Fonts/FontsService.cs b/EOM.TSHotelManager.Application/Business/Fonts/FontsService.cs
index baf5d614d16391c4c788c88fe2e577c55ceab51f..c4c6d8a9d997f8f27b896d1cb3cc431e9a676980 100644
--- a/EOM.TSHotelManager.Application/Business/Fonts/FontsService.cs
+++ b/EOM.TSHotelManager.Application/Business/Fonts/FontsService.cs
@@ -23,18 +23,13 @@
*/
using EOM.TSHotelManager.Common.Core;
using EOM.TSHotelManager.EntityFramework;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace EOM.TSHotelManager.Application
{
///
/// 酒店宣传联动内容接口实现类
///
- public class FontsService:IFontsService
+ public class FontsService : IFontsService
{
///
/// 跑马灯
diff --git a/EOM.TSHotelManager.Application/Business/Fonts/IFontsService.cs b/EOM.TSHotelManager.Application/Business/Fonts/IFontsService.cs
index 0dd43ac657a5f144497d3b2b27b909168cba71c9..623ea3472255dfd8b50c9b60a44ae12504f2cc26 100644
--- a/EOM.TSHotelManager.Application/Business/Fonts/IFontsService.cs
+++ b/EOM.TSHotelManager.Application/Business/Fonts/IFontsService.cs
@@ -22,7 +22,6 @@
*
*/
using EOM.TSHotelManager.Common.Core;
-using System.Collections.Generic;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Business/Reser/IReserService.cs b/EOM.TSHotelManager.Application/Business/Reser/IReserService.cs
index e089667bc8b31b27dab509895e6a0beb58b5cd52..b3345a25338b0346f562689d4b9c1a057262acdc 100644
--- a/EOM.TSHotelManager.Application/Business/Reser/IReserService.cs
+++ b/EOM.TSHotelManager.Application/Business/Reser/IReserService.cs
@@ -22,7 +22,6 @@
*
*/
using EOM.TSHotelManager.Common.Core;
-using System.Collections.Generic;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Business/Reser/ReserService.cs b/EOM.TSHotelManager.Application/Business/Reser/ReserService.cs
index 951ccc8b77f7c8a3431cd57d983ff1278a418e69..5dcf8034d4c3f129726634568a5a60a512128c0f 100644
--- a/EOM.TSHotelManager.Application/Business/Reser/ReserService.cs
+++ b/EOM.TSHotelManager.Application/Business/Reser/ReserService.cs
@@ -24,15 +24,13 @@
using EOM.Encrypt;
using EOM.TSHotelManager.Common.Core;
using EOM.TSHotelManager.EntityFramework;
-using System;
-using System.Collections.Generic;
namespace EOM.TSHotelManager.Application
{
///
/// 预约信息接口实现类
///
- public class ReserService:IReserService
+ public class ReserService : IReserService
{
///
/// 预约信息
@@ -98,7 +96,7 @@ namespace EOM.TSHotelManager.Application
{
delete_mk = 1,
datachg_usr = string.Empty
- },a => a.ReserId == reser.ReserId);
+ }, a => a.ReserId == reser.ReserId);
}
diff --git a/EOM.TSHotelManager.Application/Business/Room/IRoomService.cs b/EOM.TSHotelManager.Application/Business/Room/IRoomService.cs
index 30df5c9c4175ed8e1dbe8cc4966d51c1154120ba..c23b6579088cf1a1ac5ae7a17f07e3cb0156941b 100644
--- a/EOM.TSHotelManager.Application/Business/Room/IRoomService.cs
+++ b/EOM.TSHotelManager.Application/Business/Room/IRoomService.cs
@@ -22,7 +22,6 @@
*
*/
using EOM.TSHotelManager.Common.Core;
-using System.Collections.Generic;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Business/Room/IRoomTypeService.cs b/EOM.TSHotelManager.Application/Business/Room/IRoomTypeService.cs
index dfef4b7342b024c4fe854a959740b9a0b7069aad..a68444c65f77261a15056b66def3bf556518789d 100644
--- a/EOM.TSHotelManager.Application/Business/Room/IRoomTypeService.cs
+++ b/EOM.TSHotelManager.Application/Business/Room/IRoomTypeService.cs
@@ -22,7 +22,6 @@
*
*/
using EOM.TSHotelManager.Common.Core;
-using System.Collections.Generic;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Business/Room/RoomService.cs b/EOM.TSHotelManager.Application/Business/Room/RoomService.cs
index aaf42d7d1d3bd622409da8b7542632cfd6aacfe0..6dc7d3d4aa5ba5cd08688d9139e38b19a66e8307 100644
--- a/EOM.TSHotelManager.Application/Business/Room/RoomService.cs
+++ b/EOM.TSHotelManager.Application/Business/Room/RoomService.cs
@@ -24,16 +24,13 @@
using CK.Common;
using EOM.TSHotelManager.Common.Core;
using EOM.TSHotelManager.EntityFramework;
-using System;
-using System.Collections.Generic;
-using System.Linq;
namespace EOM.TSHotelManager.Application
{
///
/// 客房信息接口实现类
///
- public class RoomService:IRoomService
+ public class RoomService : IRoomService
{
///
/// 客房信息
@@ -146,7 +143,7 @@ namespace EOM.TSHotelManager.Application
source.CustoName = custo.IsNullOrEmpty() ? "" : custo.CustoName;
//把入住时间格式化
- source.CheckTimeFormat = string.IsNullOrEmpty(source.CheckTime + "") ? ""
+ source.CheckTimeFormat = string.IsNullOrEmpty(source.CheckTime + "") ? ""
: Convert.ToDateTime(source.CheckTime).ToString("yyyy-MM-dd HH:mm");
});
@@ -220,7 +217,7 @@ namespace EOM.TSHotelManager.Application
CheckTime = null,
CheckOutTime = DateTime.Now,
RoomStateId = 3
- },a => a.RoomNo == room);
+ }, a => a.RoomNo == room);
}
#endregion
@@ -249,7 +246,7 @@ namespace EOM.TSHotelManager.Application
CheckTime = r.CheckTime,
RoomStateId = r.RoomStateId,
CustoNo = r.CustoNo
- },a => a.RoomNo == r.RoomNo);
+ }, a => a.RoomNo == r.RoomNo);
}
#endregion
@@ -347,7 +344,7 @@ namespace EOM.TSHotelManager.Application
return roomRepository.Update(a => new Room()
{
RoomStateId = stateid
- },a => a.RoomNo == roomno);
+ }, a => a.RoomNo == roomno);
}
#endregion
diff --git a/EOM.TSHotelManager.Application/Business/Room/RoomTypeService.cs b/EOM.TSHotelManager.Application/Business/Room/RoomTypeService.cs
index 92ed01aa22ce6b280b36ad4435ce1d6029ea38e0..5a5520893a2d7687553c1a13fe840e1f0a2b66f2 100644
--- a/EOM.TSHotelManager.Application/Business/Room/RoomTypeService.cs
+++ b/EOM.TSHotelManager.Application/Business/Room/RoomTypeService.cs
@@ -23,14 +23,13 @@
*/
using EOM.TSHotelManager.Common.Core;
using EOM.TSHotelManager.EntityFramework;
-using System.Collections.Generic;
namespace EOM.TSHotelManager.Application
{
///
/// 房间类型接口实现类
///
- public class RoomTypeService:IRoomTypeService
+ public class RoomTypeService : IRoomTypeService
{
///
/// 客房类型
diff --git a/EOM.TSHotelManager.Application/Business/Sellthing/ISellService.cs b/EOM.TSHotelManager.Application/Business/Sellthing/ISellService.cs
index 83fd849e96dcb0a91024385d29879604d4f1f271..c691d807cb17a2c4de32aa3d236128ad1fa5e2fd 100644
--- a/EOM.TSHotelManager.Application/Business/Sellthing/ISellService.cs
+++ b/EOM.TSHotelManager.Application/Business/Sellthing/ISellService.cs
@@ -22,8 +22,6 @@
*
*/
using EOM.TSHotelManager.Common.Core;
-using System;
-using System.Collections.Generic;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Business/Sellthing/SellService.cs b/EOM.TSHotelManager.Application/Business/Sellthing/SellService.cs
index 5673aa462e450dd51bb9d0f3c456674dcc37dc18..ab62a991afbfe85468ac560dc7a9df4aa146f1d5 100644
--- a/EOM.TSHotelManager.Application/Business/Sellthing/SellService.cs
+++ b/EOM.TSHotelManager.Application/Business/Sellthing/SellService.cs
@@ -21,8 +21,6 @@
*SOFTWARE.
*
*/
-using System;
-using System.Collections.Generic;
using CK.Common;
using EOM.TSHotelManager.Common.Core;
using EOM.TSHotelManager.EntityFramework;
@@ -33,7 +31,7 @@ namespace EOM.TSHotelManager.Application
///
/// 商品信息接口实现类
///
- public class SellService:ISellService
+ public class SellService : ISellService
{
///
/// 商品信息
@@ -101,10 +99,10 @@ namespace EOM.TSHotelManager.Application
///
public bool UpdateSellThing(string stock, string sellNo)
{
- return sellThingRepository.Update(a => new SellThing()
+ return sellThingRepository.Update(a => new SellThing()
{
Stock = Convert.ToInt32(stock),
- },a => a.SellNo == sellNo);
+ }, a => a.SellNo == sellNo);
}
///
@@ -120,7 +118,7 @@ namespace EOM.TSHotelManager.Application
SellPrice = sellThing.SellPrice,
Stock = sellThing.Stock,
format = sellThing.format,
- },a => a.SellNo == sellThing.SellNo);
+ }, a => a.SellNo == sellThing.SellNo);
}
///
@@ -135,7 +133,7 @@ namespace EOM.TSHotelManager.Application
return spendRepository.Update(a => new Spend()
{
delete_mk = 1,
- },a => a.MoneyState.Equals(SpendConsts.UnSettle) && a.RoomNo == roomNo && a.CustoNo == custoNo
+ }, a => a.MoneyState.Equals(SpendConsts.UnSettle) && a.RoomNo == roomNo && a.CustoNo == custoNo
&& a.SpendName == sellName);
}
@@ -159,7 +157,7 @@ namespace EOM.TSHotelManager.Application
///
///
///
- public SellThing SelectSellThingByNameAndPrice(string name,string price)
+ public SellThing SelectSellThingByNameAndPrice(string name, string price)
{
SellThing sellThing = null;
sellThing = sellThingRepository.GetSingle(a => a.SellName == name && a.SellPrice == Convert.ToDecimal(price));
diff --git a/EOM.TSHotelManager.Application/Business/Spend/ISpendService.cs b/EOM.TSHotelManager.Application/Business/Spend/ISpendService.cs
index 962a3a957f850f701f6bbb153c0a9e2e09d8040e..5f8ffccae02083cfc3ba2a4473edf99798defe40 100644
--- a/EOM.TSHotelManager.Application/Business/Spend/ISpendService.cs
+++ b/EOM.TSHotelManager.Application/Business/Spend/ISpendService.cs
@@ -22,8 +22,6 @@
*
*/
using EOM.TSHotelManager.Common.Core;
-using System;
-using System.Collections.Generic;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Business/Spend/SpendService.cs b/EOM.TSHotelManager.Application/Business/Spend/SpendService.cs
index 34e1f0dbeaa409602f99ac1dc02d7ec5304f215b..6c77c20ad67bbd741dbe51c2cd1b71a507ede0ea 100644
--- a/EOM.TSHotelManager.Application/Business/Spend/SpendService.cs
+++ b/EOM.TSHotelManager.Application/Business/Spend/SpendService.cs
@@ -21,9 +21,6 @@
*SOFTWARE.
*
*/
-using System;
-using System.Collections.Generic;
-using System.Linq;
using EOM.TSHotelManager.Common.Core;
using EOM.TSHotelManager.EntityFramework;
@@ -32,7 +29,7 @@ namespace EOM.TSHotelManager.Application
///
/// 商品消费接口实现类
///
- public class SpendService:ISpendService
+ public class SpendService : ISpendService
{
///
/// 商品消费
@@ -190,7 +187,7 @@ namespace EOM.TSHotelManager.Application
///
///
///
- public object SelectMoneyByRoomNoAndTime(string roomno,string custono)
+ public object SelectMoneyByRoomNoAndTime(string roomno, string custono)
{
return spendRepository.GetList(a => a.RoomNo == roomno && a.CustoNo == custono && a.MoneyState.Equals(SpendConsts.UnSettle)).Sum(a => a.SpendMoney);
}
@@ -208,7 +205,7 @@ namespace EOM.TSHotelManager.Application
return spendRepository.Update(a => new Spend()
{
MoneyState = SpendConsts.Settled
- },a => a.RoomNo == roomno && a.SpendTime >= Convert.ToDateTime(checktime) && a.SpendTime <= DateTime.Now);
+ }, a => a.RoomNo == roomno && a.SpendTime >= Convert.ToDateTime(checktime) && a.SpendTime <= DateTime.Now);
}
#endregion
@@ -223,12 +220,12 @@ namespace EOM.TSHotelManager.Application
//查询当前用户未结算的数据
var listSpendId = spendRepository.GetList(a => a.CustoNo.Equals(spend.CustoNo) && a.MoneyState.Equals(SpendConsts.UnSettle))
.Select(a => a.SpendName).ToList(); /*spends.Select(a => a.SpendName).Distinct().ToList();*/
-
+
return spendRepository.Update(a => new Spend()
{
RoomNo = spend.RoomNo,
datachg_usr = spend.datachg_usr
- }, a => listSpendId.Contains(a.SpendName) && a.CustoNo.Equals(spend.CustoNo) && a.SpendTime >= DateTime.Now
+ }, a => listSpendId.Contains(a.SpendName) && a.CustoNo.Equals(spend.CustoNo) && a.SpendTime >= DateTime.Now
&& a.SpendTime <= DateTime.Now);
@@ -247,7 +244,7 @@ namespace EOM.TSHotelManager.Application
SpendAmount = spend.SpendAmount,
SpendMoney = spend.SpendMoney,
- }, a => a.MoneyState.Equals(SpendConsts.UnSettle)
+ }, a => a.MoneyState.Equals(SpendConsts.UnSettle)
&& a.RoomNo.Equals(spend.RoomNo)
&& a.CustoNo.Equals(spend.CustoNo)
&& a.SpendName.Equals(spend.SpendName));
diff --git a/EOM.TSHotelManager.Application/Business/Wti/IWtiService.cs b/EOM.TSHotelManager.Application/Business/Wti/IWtiService.cs
index 4b2d1e04630a9661159bd086fde1731b31175474..90633cd08b45d6c40a8b5992915688682a26eae5 100644
--- a/EOM.TSHotelManager.Application/Business/Wti/IWtiService.cs
+++ b/EOM.TSHotelManager.Application/Business/Wti/IWtiService.cs
@@ -22,7 +22,6 @@
*
*/
using EOM.TSHotelManager.Common.Core;
-using System.Collections.Generic;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Business/Wti/WtiService.cs b/EOM.TSHotelManager.Application/Business/Wti/WtiService.cs
index 5926026b77c561a85a6bf88ae50d3ee1c8f3e5fc..b2398936ec36bec2b1ebfd69b774aca486624121 100644
--- a/EOM.TSHotelManager.Application/Business/Wti/WtiService.cs
+++ b/EOM.TSHotelManager.Application/Business/Wti/WtiService.cs
@@ -21,8 +21,6 @@
*SOFTWARE.
*
*/
-using System;
-using System.Collections.Generic;
using EOM.TSHotelManager.Common.Core;
using EOM.TSHotelManager.EntityFramework;
@@ -31,7 +29,7 @@ namespace EOM.TSHotelManager.Application
///
/// 水电信息接口实现类
///
- public class WtiService:IWtiService
+ public class WtiService : IWtiService
{
///
/// 水电信息
@@ -133,7 +131,7 @@ namespace EOM.TSHotelManager.Application
CustoNo = w.CustoNo,
datachg_usr = w.datachg_usr,
RoomNo = w.RoomNo
- },a => a.WtiNo == w.WtiNo);
+ }, a => a.WtiNo == w.WtiNo);
}
#endregion
@@ -151,7 +149,7 @@ namespace EOM.TSHotelManager.Application
WaterUse = w.WaterUse,
PowerUse = w.PowerUse,
datachg_usr = w.datachg_usr
- },a => a.RoomNo == w.RoomNo && a.UseDate >= w.UseDate && a.EndDate >= w.EndDate);
+ }, a => a.RoomNo == w.RoomNo && a.UseDate >= w.UseDate && a.EndDate >= w.EndDate);
}
#endregion
@@ -187,7 +185,7 @@ namespace EOM.TSHotelManager.Application
return wtiRepository.Update(a => new Wti()
{
delete_mk = 1
- },a => a.RoomNo == roomno && a.UseDate >= Convert.ToDateTime(usedate) && a.EndDate >= Convert.ToDateTime(enddate));
+ }, a => a.RoomNo == roomno && a.UseDate >= Convert.ToDateTime(usedate) && a.EndDate >= Convert.ToDateTime(enddate));
}
#endregion
}
diff --git a/EOM.TSHotelManager.Application/Sys/NavBar/NavBarService.cs b/EOM.TSHotelManager.Application/Sys/NavBar/NavBarService.cs
index 803911bbe945ab728f46b40fc62e098ee08256f1..199ef2fab2e597a0432a9b347ea19db74e23794b 100644
--- a/EOM.TSHotelManager.Application/Sys/NavBar/NavBarService.cs
+++ b/EOM.TSHotelManager.Application/Sys/NavBar/NavBarService.cs
@@ -1,17 +1,12 @@
using EOM.TSHotelManager.Common.Core;
using EOM.TSHotelManager.EntityFramework;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace EOM.TSHotelManager.Application
{
///
/// 导航控件模块
///
- public class NavBarService:INavBarService
+ public class NavBarService : INavBarService
{
///
/// 导航控件
diff --git a/EOM.TSHotelManager.Application/Util/IUtilService.cs b/EOM.TSHotelManager.Application/Util/IUtilService.cs
index 1bd6f50b5e96b9782c368ebc5e32330bbd26c2cb..ad793a712d039bb77961984ae97acbb6425ef74f 100644
--- a/EOM.TSHotelManager.Application/Util/IUtilService.cs
+++ b/EOM.TSHotelManager.Application/Util/IUtilService.cs
@@ -1,9 +1,4 @@
using EOM.TSHotelManager.Common.Core;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Util/UtilService.cs b/EOM.TSHotelManager.Application/Util/UtilService.cs
index 4db67c6be639d66768c976d14245e577191566aa..ff4a6afd16969cad05e5997944686435cbd39b5c 100644
--- a/EOM.TSHotelManager.Application/Util/UtilService.cs
+++ b/EOM.TSHotelManager.Application/Util/UtilService.cs
@@ -1,17 +1,12 @@
using EOM.TSHotelManager.Common.Core;
using EOM.TSHotelManager.EntityFramework;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace EOM.TSHotelManager.Application
{
///
/// 工具接口实现类
///
- public class UtilService: IUtilService
+ public class UtilService : IUtilService
{
///
/// 卡片代码
diff --git a/EOM.TSHotelManager.Application/Worker/Check/IWorkerCheckService.cs b/EOM.TSHotelManager.Application/Worker/Check/IWorkerCheckService.cs
index 166dc5773560c1eeed32f045d5691f2a4ed620c0..280462ded8c060ab2aefd678b78b9019ec4df1c9 100644
--- a/EOM.TSHotelManager.Application/Worker/Check/IWorkerCheckService.cs
+++ b/EOM.TSHotelManager.Application/Worker/Check/IWorkerCheckService.cs
@@ -22,7 +22,6 @@
*
*/
using EOM.TSHotelManager.Common.Core;
-using System.Collections.Generic;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Worker/Check/WorkerCheckService.cs b/EOM.TSHotelManager.Application/Worker/Check/WorkerCheckService.cs
index 8c7984264fccd3fdf75ca89cec545103a8aae6da..6d4eda1612c1de76a6f9a971576bdc046bd327d3 100644
--- a/EOM.TSHotelManager.Application/Worker/Check/WorkerCheckService.cs
+++ b/EOM.TSHotelManager.Application/Worker/Check/WorkerCheckService.cs
@@ -23,16 +23,13 @@
*/
using EOM.TSHotelManager.Common.Core;
using EOM.TSHotelManager.EntityFramework;
-using System;
-using System.Collections.Generic;
-using System.Linq;
namespace EOM.TSHotelManager.Application
{
///
/// 员工打卡接口实现类
///
- public class WorkerCheckService:IWorkerCheckService
+ public class WorkerCheckService : IWorkerCheckService
{
///
/// 员工打卡
diff --git a/EOM.TSHotelManager.Application/Worker/GoodBad/IWorkerGoodBadService.cs b/EOM.TSHotelManager.Application/Worker/GoodBad/IWorkerGoodBadService.cs
index 3a84b23b5c1740e93c6a11eb37b52e336dfcb12a..ab11c0208d7599969b71325888fef957fe6d1605 100644
--- a/EOM.TSHotelManager.Application/Worker/GoodBad/IWorkerGoodBadService.cs
+++ b/EOM.TSHotelManager.Application/Worker/GoodBad/IWorkerGoodBadService.cs
@@ -22,7 +22,6 @@
*
*/
using EOM.TSHotelManager.Common.Core;
-using System.Collections.Generic;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Worker/GoodBad/WorkerGoodBadService.cs b/EOM.TSHotelManager.Application/Worker/GoodBad/WorkerGoodBadService.cs
index c9982e733cca14934a5fcc0f1a432143fb25346e..ae2d2130428f2a16e93368eea547f49ff99afb80 100644
--- a/EOM.TSHotelManager.Application/Worker/GoodBad/WorkerGoodBadService.cs
+++ b/EOM.TSHotelManager.Application/Worker/GoodBad/WorkerGoodBadService.cs
@@ -23,18 +23,13 @@
*/
using EOM.TSHotelManager.Common.Core;
using EOM.TSHotelManager.EntityFramework;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace EOM.TSHotelManager.Application
{
///
/// 员工奖惩记录接口实现类
///
- public class WorkerGoodBadService:IWorkerGoodBadService
+ public class WorkerGoodBadService : IWorkerGoodBadService
{
///
/// 员工奖惩记录
diff --git a/EOM.TSHotelManager.Application/Worker/History/IWorkerHistoryService.cs b/EOM.TSHotelManager.Application/Worker/History/IWorkerHistoryService.cs
index 5be139c41bf4aa9ad35d3ec463d7d0c81c2d52b0..f465f2fcfe5b9aa04ad335af461958a5fd7a9f81 100644
--- a/EOM.TSHotelManager.Application/Worker/History/IWorkerHistoryService.cs
+++ b/EOM.TSHotelManager.Application/Worker/History/IWorkerHistoryService.cs
@@ -22,7 +22,6 @@
*
*/
using EOM.TSHotelManager.Common.Core;
-using System.Collections.Generic;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Worker/History/WorkerHistoryService.cs b/EOM.TSHotelManager.Application/Worker/History/WorkerHistoryService.cs
index e3006d061672881645e897542763a2df3eb70bb6..8790cbe0db75106302957af1ab8ef75b6055fdc1 100644
--- a/EOM.TSHotelManager.Application/Worker/History/WorkerHistoryService.cs
+++ b/EOM.TSHotelManager.Application/Worker/History/WorkerHistoryService.cs
@@ -23,8 +23,6 @@
*/
using EOM.TSHotelManager.Common.Core;
using EOM.TSHotelManager.EntityFramework;
-using System;
-using System.Collections.Generic;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Worker/IWorkerService.cs b/EOM.TSHotelManager.Application/Worker/IWorkerService.cs
index a3d4465f84f1d73e4e1613091279239a3d072fd3..8c61bc1c3c0c5a622ab8dab124afb9c5c6fb4943 100644
--- a/EOM.TSHotelManager.Application/Worker/IWorkerService.cs
+++ b/EOM.TSHotelManager.Application/Worker/IWorkerService.cs
@@ -22,7 +22,6 @@
*
*/
using EOM.TSHotelManager.Common.Core;
-using System.Collections.Generic;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Worker/Picture/IWorkerPicService.cs b/EOM.TSHotelManager.Application/Worker/Picture/IWorkerPicService.cs
index 02d46ce46afdb0031178706e201a78642ee42792..4ef5587b7211515c793ae94c71cdc055dcd00730 100644
--- a/EOM.TSHotelManager.Application/Worker/Picture/IWorkerPicService.cs
+++ b/EOM.TSHotelManager.Application/Worker/Picture/IWorkerPicService.cs
@@ -1,9 +1,4 @@
using EOM.TSHotelManager.Common.Core;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Worker/Picture/WorkerPicService.cs b/EOM.TSHotelManager.Application/Worker/Picture/WorkerPicService.cs
index b6bb16802d27b53f182f4242d0423c4b0c143457..fbef80b1605342f9ff0d3226a8a83fc3d3521f0f 100644
--- a/EOM.TSHotelManager.Application/Worker/Picture/WorkerPicService.cs
+++ b/EOM.TSHotelManager.Application/Worker/Picture/WorkerPicService.cs
@@ -1,13 +1,5 @@
-using CK.Common;
-using EOM.Encrypt;
-using EOM.TSHotelManager.Common.Core;
+using EOM.TSHotelManager.Common.Core;
using EOM.TSHotelManager.EntityFramework;
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace EOM.TSHotelManager.Application
{
@@ -49,7 +41,7 @@ namespace EOM.TSHotelManager.Application
workerPicSource = workerPicRepository.GetSingle(a => a.WorkerId.Equals(workerPic.WorkerId));
//workerPicSource.Pic = workerPicSource == null || string.IsNullOrEmpty(workerPicSource.Pic) "" : workerPicSource.Pic;
-
+
return workerPicSource;
}
///
diff --git a/EOM.TSHotelManager.Application/Worker/WorkerService.cs b/EOM.TSHotelManager.Application/Worker/WorkerService.cs
index c5b9de5204f26ebefb975db0eea9993e25860298..4720319ef07dd45ccd92447d2d01d3ad47c8f914 100644
--- a/EOM.TSHotelManager.Application/Worker/WorkerService.cs
+++ b/EOM.TSHotelManager.Application/Worker/WorkerService.cs
@@ -21,22 +21,22 @@
*SOFTWARE.
*
*/
-using CK.Common;
using EOM.Encrypt;
using EOM.TSHotelManager.Common.Core;
using EOM.TSHotelManager.EntityFramework;
+using Microsoft.Extensions.Configuration;
+using Microsoft.IdentityModel.Tokens;
using SqlSugar;
-using SqlSugar.DistributedSystem.Snowflake;
-using System;
-using System.Collections.Generic;
-using System.Linq;
+using System.IdentityModel.Tokens.Jwt;
+using System.Security.Claims;
+using System.Text;
namespace EOM.TSHotelManager.Application
{
///
/// 员工信息接口实现类
///
- public class WorkerService:IWorkerService
+ public class WorkerService : IWorkerService
{
///
/// 员工信息
@@ -74,7 +74,12 @@ namespace EOM.TSHotelManager.Application
private readonly EOM.Encrypt.Encrypt encrypt;
///
- ///
+ /// 配置
+ ///
+ private readonly IConfiguration configuration;
+
+ ///
+ /// 构造函数
///
///
///
@@ -83,7 +88,8 @@ namespace EOM.TSHotelManager.Application
///
///
///
- public WorkerService(PgRepository workerRepository, PgRepository sexTypeRepository, PgRepository educationRepository, PgRepository nationRepository, PgRepository deptRepository, PgRepository positionRepository, EOM.Encrypt.Encrypt encrypt)
+ ///
+ public WorkerService(PgRepository workerRepository, PgRepository sexTypeRepository, PgRepository educationRepository, PgRepository nationRepository, PgRepository deptRepository, PgRepository positionRepository, Encrypt.Encrypt encrypt, IConfiguration configuration)
{
this.workerRepository = workerRepository;
this.sexTypeRepository = sexTypeRepository;
@@ -92,6 +98,7 @@ namespace EOM.TSHotelManager.Application
this.deptRepository = deptRepository;
this.positionRepository = positionRepository;
this.encrypt = encrypt;
+ this.configuration = configuration;
}
#region 修改员工信息
@@ -106,7 +113,7 @@ namespace EOM.TSHotelManager.Application
var sourceTelStr = string.Empty;
if (!string.IsNullOrEmpty(worker.WorkerTel))
{
- sourceTelStr = encrypt.Encryption(worker.WorkerTel,EncryptionLevel.Enhanced);
+ sourceTelStr = encrypt.Encryption(worker.WorkerTel, EncryptionLevel.Enhanced);
}
//加密身份证
var sourceIdStr = string.Empty;
@@ -124,11 +131,11 @@ namespace EOM.TSHotelManager.Application
WorkerFace = worker.WorkerFace,
WorkerEducation = worker.WorkerEducation,
WorkerNation = worker.WorkerNation,
- CardId= worker.CardId,
- WorkerSex = worker.WorkerSex,
+ CardId = worker.CardId,
+ WorkerSex = worker.WorkerSex,
WorkerBirthday = worker.WorkerBirthday,
datachg_usr = worker.datachg_usr
- },a => a.WorkerId.Equals(worker.WorkerId));
+ }, a => a.WorkerId.Equals(worker.WorkerId));
}
#endregion
@@ -232,7 +239,7 @@ namespace EOM.TSHotelManager.Application
var position = positions.FirstOrDefault(a => a.position_no == source.WorkerPosition);
source.PositionName = string.IsNullOrEmpty(position.position_name) ? "" : position.position_name;
});
-
+
return workers;
}
@@ -241,9 +248,9 @@ namespace EOM.TSHotelManager.Application
///
///
///
- public bool CheckWorkerBydepartment(string deptNo)
+ public bool CheckWorkerBydepartment(string deptNo)
{
- var workers = workerRepository.Count(a=> a.WorkerClub.Equals(deptNo));
+ var workers = workerRepository.Count(a => a.WorkerClub.Equals(deptNo));
return workers > 0 ? true : false;
}
@@ -324,6 +331,25 @@ namespace EOM.TSHotelManager.Application
//职位
var position = positionRepository.GetSingle(a => a.position_no == w.WorkerPosition);
w.PositionName = string.IsNullOrEmpty(position.position_name) ? "" : position.position_name;
+
+ //附带Token
+ var tokenHandler = new JwtSecurityTokenHandler();
+ var key = Encoding.UTF8.GetBytes(configuration["Jwt:Key"]);
+ var tokenDescriptor = new SecurityTokenDescriptor
+ {
+ Subject = new ClaimsIdentity(new Claim[]
+ {
+ new Claim(ClaimTypes.Name, w.WorkerId)
+ }),
+ Expires = DateTime.Now.AddMinutes(20), // 设置Token过期时间
+ SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature),
+ Audience = configuration["Jwt:Audience"],
+ Issuer = configuration["Jwt:Issuer"]
+ };
+
+ var token = tokenHandler.CreateToken(tokenDescriptor);
+ w.user_token = tokenHandler.WriteToken(token);
+
return w;
}
#endregion
@@ -340,7 +366,7 @@ namespace EOM.TSHotelManager.Application
{
WorkerPwd = NewPwd,
datachg_usr = worker.datachg_usr
- },a => a.WorkerId == worker.WorkerId);
+ }, a => a.WorkerId == worker.WorkerId);
}
}
diff --git a/EOM.TSHotelManager.Application/Zero/Admin/AdminService.cs b/EOM.TSHotelManager.Application/Zero/Admin/AdminService.cs
index 4b3d259e3027e380fbb8bb16655a340c8bbee47d..0f686b9f1bb7b8ab7adc13c42d99ace1448ee61b 100644
--- a/EOM.TSHotelManager.Application/Zero/Admin/AdminService.cs
+++ b/EOM.TSHotelManager.Application/Zero/Admin/AdminService.cs
@@ -25,10 +25,11 @@ using CK.Common;
using EOM.Encrypt;
using EOM.TSHotelManager.Common.Core;
using EOM.TSHotelManager.EntityFramework;
-using SqlSugar.DistributedSystem.Snowflake;
-using System;
-using System.Collections.Generic;
-using System.Linq;
+using Microsoft.Extensions.Configuration;
+using Microsoft.IdentityModel.Tokens;
+using System.IdentityModel.Tokens.Jwt;
+using System.Security.Claims;
+using System.Text;
namespace EOM.TSHotelManager.Application
{
@@ -53,16 +54,23 @@ namespace EOM.TSHotelManager.Application
private readonly EOM.Encrypt.Encrypt encrypt;
///
- ///
+ /// 配置
+ ///
+ private readonly IConfiguration configuration;
+
+ ///
+ /// 构造函数
///
///
///
///
- public AdminService(PgRepository adminRepository, PgRepository adminTypeRepository, EOM.Encrypt.Encrypt encrypt)
+ ///
+ public AdminService(PgRepository adminRepository, PgRepository adminTypeRepository, Encrypt.Encrypt encrypt, IConfiguration configuration)
{
this.adminRepository = adminRepository;
this.adminTypeRepository = adminTypeRepository;
this.encrypt = encrypt;
+ this.configuration = configuration;
}
#region 根据超管密码查询员工类型和权限
@@ -75,7 +83,7 @@ namespace EOM.TSHotelManager.Application
{
Admin admins = new Admin();
- //admin.AdminPassword = encrypt.Encryption(admin.AdminPassword);
+ //admin.AdminPassword = encrypt.Decryption(admin.AdminPassword);
admins = adminRepository.GetSingle(a => a.AdminAccount == admin.AdminAccount);
@@ -85,16 +93,32 @@ namespace EOM.TSHotelManager.Application
return admins;
}
- var frontEncryed = encrypt.Encryption(admins.AdminPassword, EncryptionLevel.Enhanced);
- var backEncryed = encrypt.Encryption(admin.AdminPassword, EncryptionLevel.Enhanced);
+ var backEncryed = encrypt.Encryption(admins.AdminPassword, EncryptionLevel.Enhanced);
- if (!encrypt.Compare(frontEncryed, backEncryed))
+ if (!encrypt.Compare(admin.AdminPassword, backEncryed))
{
admins = null;
return admins;
}
admins.AdminPassword = "";
+ //附带Token
+ var tokenHandler = new JwtSecurityTokenHandler();
+ var key = Encoding.UTF8.GetBytes(configuration["Jwt:Key"]);
+ var tokenDescriptor = new SecurityTokenDescriptor
+ {
+ Subject = new ClaimsIdentity(new Claim[]
+ {
+ new Claim(ClaimTypes.Name, admins.AdminAccount)
+ }),
+ Expires = DateTime.Now.AddMinutes(20), // 设置Token过期时间
+ SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature),
+ Audience = configuration["Jwt:Audience"],
+ Issuer = configuration["Jwt:Issuer"]
+ };
+
+ var token = tokenHandler.CreateToken(tokenDescriptor);
+ admins.user_token = tokenHandler.WriteToken(token);
return admins;
}
#endregion
diff --git a/EOM.TSHotelManager.Application/Zero/Admin/IAdminService.cs b/EOM.TSHotelManager.Application/Zero/Admin/IAdminService.cs
index 4452685cdae160f69b5802e38e80f01f2f1afbdd..93ff8fd9248f10d7feed11e997ff0b12b8246cef 100644
--- a/EOM.TSHotelManager.Application/Zero/Admin/IAdminService.cs
+++ b/EOM.TSHotelManager.Application/Zero/Admin/IAdminService.cs
@@ -22,7 +22,6 @@
*
*/
using EOM.TSHotelManager.Common.Core;
-using System.Collections.Generic;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Zero/Base/BaseService.cs b/EOM.TSHotelManager.Application/Zero/Base/BaseService.cs
index f41b8c2667dfb1895656752c12176f10dda019de..352bcaf29af1abfbdc79f91819fa7d3020ee770d 100644
--- a/EOM.TSHotelManager.Application/Zero/Base/BaseService.cs
+++ b/EOM.TSHotelManager.Application/Zero/Base/BaseService.cs
@@ -25,19 +25,13 @@ using CK.Common;
using EOM.TSHotelManager.Common.Core;
using EOM.TSHotelManager.EntityFramework;
using SqlSugar;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Linq.Expressions;
-using System.Text;
-using System.Threading.Tasks;
namespace EOM.TSHotelManager.Application
{
///
/// 基础信息接口实现类
///
- public class BaseService:IBaseService
+ public class BaseService : IBaseService
{
///
/// 员工信息
@@ -399,7 +393,7 @@ namespace EOM.TSHotelManager.Application
return educationRepository.Update(a => new Education()
{
education_name = education.education_name,
- datachg_usr =education.datachg_usr
+ datachg_usr = education.datachg_usr
}, a => a.education_no == education.education_no);
}
@@ -419,10 +413,16 @@ namespace EOM.TSHotelManager.Application
depts = deptRepository.GetList(a => a.delete_mk != 1);
depts.ForEach(source =>
{
- var dept = depts.FirstOrDefault(a => a.dept_no == source.dept_parent);
- source.parent_name = dept == null || string.IsNullOrEmpty(dept.dept_name) ? "无" : dept.dept_name;
- var leader = workers.FirstOrDefault(a => source.dept_leader != null && a.WorkerId == source.dept_leader);
- source.leader_name = leader == null || string.IsNullOrEmpty(leader.WorkerName) ? "无" : leader.WorkerName;
+ if (!source.dept_parent.IsNullOrEmpty())
+ {
+ var dept = depts.FirstOrDefault(a => a.dept_no == source.dept_parent);
+ source.parent_name = dept == null || string.IsNullOrEmpty(dept.dept_name) ? "无" : dept.dept_name;
+ }
+ if (!source.dept_leader.IsNullOrEmpty())
+ {
+ var leader = workers.FirstOrDefault(a => a.WorkerId == source.dept_leader);
+ source.leader_name = leader == null || string.IsNullOrEmpty(leader.WorkerName) ? "无" : leader.WorkerName;
+ }
});
return depts;
diff --git a/EOM.TSHotelManager.Application/Zero/Base/IBaseService.cs b/EOM.TSHotelManager.Application/Zero/Base/IBaseService.cs
index f5d522148cff7cd532d46b235594aff6ea53454a..7f388e35b5106b43bb09f06b67246e1b4d8b4b5e 100644
--- a/EOM.TSHotelManager.Application/Zero/Base/IBaseService.cs
+++ b/EOM.TSHotelManager.Application/Zero/Base/IBaseService.cs
@@ -22,11 +22,6 @@
*
*/
using EOM.TSHotelManager.Common.Core;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Zero/CheckInfo/CheckInfoService.cs b/EOM.TSHotelManager.Application/Zero/CheckInfo/CheckInfoService.cs
index fa6ab1241b35cbe9bb631c8583e530636ad54fc9..e5f9385a78f6bb4d9eb56607ecf0ae616e38da1a 100644
--- a/EOM.TSHotelManager.Application/Zero/CheckInfo/CheckInfoService.cs
+++ b/EOM.TSHotelManager.Application/Zero/CheckInfo/CheckInfoService.cs
@@ -23,9 +23,6 @@
*/
using EOM.TSHotelManager.Common.Core;
using EOM.TSHotelManager.EntityFramework;
-using System;
-using System.Collections.Generic;
-using System.Data.SqlClient;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Zero/CheckInfo/ICheckInfoService.cs b/EOM.TSHotelManager.Application/Zero/CheckInfo/ICheckInfoService.cs
index 38af52d089fbf00462af35035b2e68e1e5a90e4c..874c478972386554da079609c0336c45366c763c 100644
--- a/EOM.TSHotelManager.Application/Zero/CheckInfo/ICheckInfoService.cs
+++ b/EOM.TSHotelManager.Application/Zero/CheckInfo/ICheckInfoService.cs
@@ -22,7 +22,6 @@
*
*/
using EOM.TSHotelManager.Common.Core;
-using System.Collections.Generic;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Zero/Module/AdminModuleZeroService.cs b/EOM.TSHotelManager.Application/Zero/Module/AdminModuleZeroService.cs
index 08d6d22d89d5e9064f37bea7d0f3b617cc625a09..41af4475fc49ebf0da3dbfdc22e040b9fa7270ea 100644
--- a/EOM.TSHotelManager.Application/Zero/Module/AdminModuleZeroService.cs
+++ b/EOM.TSHotelManager.Application/Zero/Module/AdminModuleZeroService.cs
@@ -1,10 +1,5 @@
using EOM.TSHotelManager.Common.Core;
using EOM.TSHotelManager.EntityFramework;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Zero/Module/IAdminModuleZeroService.cs b/EOM.TSHotelManager.Application/Zero/Module/IAdminModuleZeroService.cs
index afcbfaee1b0e8356b049928eb8bf5b15e01364d1..38d2f2d67492e384b7233d897c1fc736a2788bed 100644
--- a/EOM.TSHotelManager.Application/Zero/Module/IAdminModuleZeroService.cs
+++ b/EOM.TSHotelManager.Application/Zero/Module/IAdminModuleZeroService.cs
@@ -1,9 +1,4 @@
using EOM.TSHotelManager.Common.Core;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Zero/Notice/INoticeService.cs b/EOM.TSHotelManager.Application/Zero/Notice/INoticeService.cs
index 15954c2c957711fb1a6dd2065bb77d0e6f5bc868..b90cd7108d4a8fb4adee672812f87ac559fe936e 100644
--- a/EOM.TSHotelManager.Application/Zero/Notice/INoticeService.cs
+++ b/EOM.TSHotelManager.Application/Zero/Notice/INoticeService.cs
@@ -22,7 +22,6 @@
*
*/
using EOM.TSHotelManager.Common.Core;
-using System.Collections.Generic;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Zero/Notice/NoticeService.cs b/EOM.TSHotelManager.Application/Zero/Notice/NoticeService.cs
index f0167bc56d01c7465081cf9de6e53c1f5be63677..83ab41155758c4418880c6c22a2560c54aea5117 100644
--- a/EOM.TSHotelManager.Application/Zero/Notice/NoticeService.cs
+++ b/EOM.TSHotelManager.Application/Zero/Notice/NoticeService.cs
@@ -23,15 +23,13 @@
*/
using EOM.TSHotelManager.Common.Core;
using EOM.TSHotelManager.EntityFramework;
-using System;
-using System.Collections.Generic;
namespace EOM.TSHotelManager.Application
{
///
/// 公告信息接口实现类
///
- public class NoticeService:INoticeService
+ public class NoticeService : INoticeService
{
///
/// 公告
diff --git a/EOM.TSHotelManager.Application/Zero/VipRule/IVipRuleAppService.cs b/EOM.TSHotelManager.Application/Zero/VipRule/IVipRuleAppService.cs
index a168e0f7e31261d1fece72c169748aa6b546ccf4..6fe660a41699752fa5c5f54b9fa66f153662dabe 100644
--- a/EOM.TSHotelManager.Application/Zero/VipRule/IVipRuleAppService.cs
+++ b/EOM.TSHotelManager.Application/Zero/VipRule/IVipRuleAppService.cs
@@ -23,11 +23,6 @@
*模块说明:会员等级规则功能模块接口
*/
using EOM.TSHotelManager.Common.Core;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace EOM.TSHotelManager.Application
{
diff --git a/EOM.TSHotelManager.Application/Zero/VipRule/VipRuleAppService.cs b/EOM.TSHotelManager.Application/Zero/VipRule/VipRuleAppService.cs
index 49b4fd43e6bd53cf79d7bb7825bcd8f70616e22f..04b9a3329b7274154f8cb8d20cb22be650341638 100644
--- a/EOM.TSHotelManager.Application/Zero/VipRule/VipRuleAppService.cs
+++ b/EOM.TSHotelManager.Application/Zero/VipRule/VipRuleAppService.cs
@@ -23,18 +23,13 @@
*/
using EOM.TSHotelManager.Common.Core;
using EOM.TSHotelManager.EntityFramework;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace EOM.TSHotelManager.Application
{
///
/// 会员等级规则功能模块接口实现类
///
- public class VipRuleAppService:IVipRuleAppService
+ public class VipRuleAppService : IVipRuleAppService
{
///
/// 会员等级规则
@@ -106,7 +101,7 @@ namespace EOM.TSHotelManager.Application
///
public bool AddVipRule(VipRule vipRule)
{
- return vipRuleRepository.Insert(new VipRule()
+ return vipRuleRepository.Insert(new VipRule()
{
rule_id = vipRule.rule_id,
rule_name = vipRule.rule_name,
@@ -128,7 +123,7 @@ namespace EOM.TSHotelManager.Application
{
delete_mk = 1,
datachg_usr = vipRule.datachg_usr,
- },a => a.rule_id == vipRule.rule_id);
+ }, a => a.rule_id == vipRule.rule_id);
}
///
diff --git a/EOM.TSHotelManager.Common.Core/BaseDTO.cs b/EOM.TSHotelManager.Common.Core/BaseDTO.cs
index b10f82d0f46f843a9750cc3ecddcb2ab7591dbd5..b9692b7c82debfb4752ee3ae71c4bb8426f433fa 100644
--- a/EOM.TSHotelManager.Common.Core/BaseDTO.cs
+++ b/EOM.TSHotelManager.Common.Core/BaseDTO.cs
@@ -1,8 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace EOM.TSHotelManager.Common.Core
{
@@ -16,8 +12,8 @@ namespace EOM.TSHotelManager.Common.Core
///
/// 资料创建时间
///
- [SqlSugar.SugarColumn(/*InsertServerTime = true,*/ IsOnlyIgnoreUpdate = true)]
- public DateTime? datains_date { get; set; }
+ [SqlSugar.SugarColumn(IsOnlyIgnoreUpdate = true)]
+ public DateTime? datains_date { get; set; } = DateTime.Now;
///
/// 资料更新人
///
@@ -26,8 +22,12 @@ namespace EOM.TSHotelManager.Common.Core
///
/// 资料更新时间
///
- [SqlSugar.SugarColumn(/*UpdateServerTime = true,*/IsOnlyIgnoreInsert = true)]
- public DateTime? datachg_date { get; set; }
-
+ [SqlSugar.SugarColumn(IsOnlyIgnoreInsert = true)]
+ public DateTime? datachg_date { get; set; } = DateTime.Now;
+ ///
+ /// Token
+ ///
+ [SqlSugar.SugarColumn(IsIgnore = true)]
+ public string user_token { get; set; }
}
}
diff --git a/EOM.TSHotelManager.Common.Core/Business/Customer/CustoType.cs b/EOM.TSHotelManager.Common.Core/Business/Customer/CustoType.cs
index a566445fb480faf544945e9fa3fa9fe2232d222c..c0cc2aae1f9ff73e37016d9a06710c67a9a80ed4 100644
--- a/EOM.TSHotelManager.Common.Core/Business/Customer/CustoType.cs
+++ b/EOM.TSHotelManager.Common.Core/Business/Customer/CustoType.cs
@@ -22,8 +22,6 @@
*
*模块说明:客户类型类
*/
-using System;
-
namespace EOM.TSHotelManager.Common.Core
{
///
diff --git a/EOM.TSHotelManager.Common.Core/Business/Customer/PassPortType.cs b/EOM.TSHotelManager.Common.Core/Business/Customer/PassPortType.cs
index 7d0a5caaadbe8d9e3987c24517f7587c6c8c9b5c..7ac1ff07c9d088228d2ce73f08a3ddb1aa27535c 100644
--- a/EOM.TSHotelManager.Common.Core/Business/Customer/PassPortType.cs
+++ b/EOM.TSHotelManager.Common.Core/Business/Customer/PassPortType.cs
@@ -22,12 +22,6 @@
*
*模块说明:证件类型类
*/
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
namespace EOM.TSHotelManager.Common.Core
{
///
diff --git a/EOM.TSHotelManager.Common.Core/Business/Customer/SexType.cs b/EOM.TSHotelManager.Common.Core/Business/Customer/SexType.cs
index e78a48d445396240c5023fe10d393d91d0d04e0a..f34d86a34c3e355ccdbd59340ec23b17aeb3a5da 100644
--- a/EOM.TSHotelManager.Common.Core/Business/Customer/SexType.cs
+++ b/EOM.TSHotelManager.Common.Core/Business/Customer/SexType.cs
@@ -22,12 +22,6 @@
*
*模块说明:性别类
*/
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
namespace EOM.TSHotelManager.Common.Core
{
///
diff --git a/EOM.TSHotelManager.Common.Core/Business/Room/RoomState.cs b/EOM.TSHotelManager.Common.Core/Business/Room/RoomState.cs
index 2ad589fff4a1d3d6ffde3d3db08cb0c12e542028..4f6710338122c62e63f032444698735b101b3829 100644
--- a/EOM.TSHotelManager.Common.Core/Business/Room/RoomState.cs
+++ b/EOM.TSHotelManager.Common.Core/Business/Room/RoomState.cs
@@ -22,8 +22,6 @@
*
*模块说明:房间状态类
*/
-using System;
-
namespace EOM.TSHotelManager.Common.Core
{
///
diff --git a/EOM.TSHotelManager.Common.Core/Business/Room/RoomType.cs b/EOM.TSHotelManager.Common.Core/Business/Room/RoomType.cs
index 40a17593a34008a054820a12fc1d0274d9a37808..171a6b095452cd041b1db90eb5e814401086802a 100644
--- a/EOM.TSHotelManager.Common.Core/Business/Room/RoomType.cs
+++ b/EOM.TSHotelManager.Common.Core/Business/Room/RoomType.cs
@@ -22,15 +22,13 @@
*
*模块说明:房间类型类
*/
-using System;
-
namespace EOM.TSHotelManager.Common.Core
{
///
/// 房间类型
///
[SqlSugar.SugarTable("roomtype")]
- public class RoomType: BaseDTO
+ public class RoomType : BaseDTO
{
///
/// 类型编号
@@ -45,7 +43,7 @@ namespace EOM.TSHotelManager.Common.Core
///
/// 房间租金
///
- [SqlSugar.SugarColumn(ColumnName = "room_rent",ColumnDataType = "decimal")]
+ [SqlSugar.SugarColumn(ColumnName = "room_rent", ColumnDataType = "decimal")]
public decimal RoomRent { get; set; }
///
diff --git a/EOM.TSHotelManager.Common.Core/Business/Sellthing/SellThing.cs b/EOM.TSHotelManager.Common.Core/Business/Sellthing/SellThing.cs
index 7bb7b96ddc1083059c14bda65e0dcd677b97a786..5651c1114cb4751ec76e675c2ece0bdfba2f4cf7 100644
--- a/EOM.TSHotelManager.Common.Core/Business/Sellthing/SellThing.cs
+++ b/EOM.TSHotelManager.Common.Core/Business/Sellthing/SellThing.cs
@@ -22,7 +22,6 @@
*
*模块说明:商品信息类
*/
-using System;
//using System.ComponentModel.DataAnnotations.Schema;
namespace EOM.TSHotelManager.Common.Core
diff --git a/EOM.TSHotelManager.Common.Core/Business/Spend/SpendConsts.cs b/EOM.TSHotelManager.Common.Core/Business/Spend/SpendConsts.cs
index b92d5140d5df8c9fd9aa09d30b8213d3f7af5a55..4e920c89b1392141f7a7b35cc55865438196bd0d 100644
--- a/EOM.TSHotelManager.Common.Core/Business/Spend/SpendConsts.cs
+++ b/EOM.TSHotelManager.Common.Core/Business/Spend/SpendConsts.cs
@@ -22,12 +22,6 @@
*
*模块说明:结算状态常量
*/
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
namespace EOM.TSHotelManager.Common.Core
{
///
diff --git a/EOM.TSHotelManager.Common.Core/Business/Wti/Wti.cs b/EOM.TSHotelManager.Common.Core/Business/Wti/Wti.cs
index 0175d98f53d098624bb08fe7735ba32e8145065e..b9608cdefca4c99f393a3ba1429d629728a68b3c 100644
--- a/EOM.TSHotelManager.Common.Core/Business/Wti/Wti.cs
+++ b/EOM.TSHotelManager.Common.Core/Business/Wti/Wti.cs
@@ -35,7 +35,7 @@ namespace EOM.TSHotelManager.Common.Core
///
/// 信息编号
///
- [SqlSugar.SugarColumn(ColumnName = "WtiNo",IsIdentity =true,IsPrimaryKey =true)]
+ [SqlSugar.SugarColumn(ColumnName = "WtiNo", IsIdentity = true, IsPrimaryKey = true)]
public int WtiNo { get; set; }
///
/// 房间编号
@@ -65,7 +65,7 @@ namespace EOM.TSHotelManager.Common.Core
///
/// 记录员
///
- [SqlSugar.SugarColumn(ColumnName = "Record",DefaultValue = "Admin")]
+ [SqlSugar.SugarColumn(ColumnName = "Record", DefaultValue = "Admin")]
public string Record { get; set; }
///
/// 客户编号
diff --git a/EOM.TSHotelManager.Common.Core/Sys/NavBar/NavBar.cs b/EOM.TSHotelManager.Common.Core/Sys/NavBar/NavBar.cs
index 7211388f426e88a88fbec25de6ca5f5527d5c94f..969fd7ac67d64489cd220bda21321a8702a737cc 100644
--- a/EOM.TSHotelManager.Common.Core/Sys/NavBar/NavBar.cs
+++ b/EOM.TSHotelManager.Common.Core/Sys/NavBar/NavBar.cs
@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace EOM.TSHotelManager.Common.Core
+namespace EOM.TSHotelManager.Common.Core
{
///
/// 导航控件实体类
@@ -15,7 +9,7 @@ namespace EOM.TSHotelManager.Common.Core
///
/// 导航控件ID
///
- [SqlSugar.SugarColumn(IsIdentity =true)]
+ [SqlSugar.SugarColumn(IsIdentity = true)]
public int nav_id { get; set; }
///
/// 导航控件名称
diff --git a/EOM.TSHotelManager.Common.Core/Util/ApplicationVersion.cs b/EOM.TSHotelManager.Common.Core/Util/ApplicationVersion.cs
index 9953177229229dc434f4a7470421afdb9dffa068..adb0fccf039b26b0cf951b73d8b9fcabfaa0a1f5 100644
--- a/EOM.TSHotelManager.Common.Core/Util/ApplicationVersion.cs
+++ b/EOM.TSHotelManager.Common.Core/Util/ApplicationVersion.cs
@@ -1,9 +1,4 @@
using SqlSugar;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace EOM.TSHotelManager.Common.Core
{
diff --git a/EOM.TSHotelManager.Common.Core/Util/Cardcodes.cs b/EOM.TSHotelManager.Common.Core/Util/Cardcodes.cs
index 96dec2245736402b7b5216fe6a8b6ef6d1e9a69d..09016458edd5d7fc6e430356ebfddc64a59b0c33 100644
--- a/EOM.TSHotelManager.Common.Core/Util/Cardcodes.cs
+++ b/EOM.TSHotelManager.Common.Core/Util/Cardcodes.cs
@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace EOM.TSHotelManager.Common.Core
+namespace EOM.TSHotelManager.Common.Core
{
///
/// 卡片代码
diff --git a/EOM.TSHotelManager.Common.Core/Util/OperationLog.cs b/EOM.TSHotelManager.Common.Core/Util/OperationLog.cs
index c18385950c481d9a0b8e7f58afdf69664aae1e23..a0ec77e90c1f94739a15fb800c695c33597e6434 100644
--- a/EOM.TSHotelManager.Common.Core/Util/OperationLog.cs
+++ b/EOM.TSHotelManager.Common.Core/Util/OperationLog.cs
@@ -23,8 +23,6 @@
*模块说明:操作日志类
*/
using System;
-using System.Linq;
-using System.Net;
namespace EOM.TSHotelManager.Common.Core
{
diff --git a/EOM.TSHotelManager.Common.Core/Worker/GBType.cs b/EOM.TSHotelManager.Common.Core/Worker/GBType.cs
index f9985d08bdc3d06203f1815294e70e895850a3c1..22220d689f0e99907bcf3c84fd7fd520f67adb8e 100644
--- a/EOM.TSHotelManager.Common.Core/Worker/GBType.cs
+++ b/EOM.TSHotelManager.Common.Core/Worker/GBType.cs
@@ -23,8 +23,6 @@
*模块说明:奖惩类型类
*/
//using EOM.TSHotelManager.Common.Core;
-using System;
-
namespace EOM.TSHotelManager.Common.Core
{
///
diff --git a/EOM.TSHotelManager.Common.Core/Worker/WorkerGoodBad.cs b/EOM.TSHotelManager.Common.Core/Worker/WorkerGoodBad.cs
index cfef27c97472580bf45a5f392dd41c8a7a790ec6..7dff223b93cc7791a46653384370792c2a7410d9 100644
--- a/EOM.TSHotelManager.Common.Core/Worker/WorkerGoodBad.cs
+++ b/EOM.TSHotelManager.Common.Core/Worker/WorkerGoodBad.cs
@@ -23,10 +23,6 @@
*模块说明:员工奖惩类
*/
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace EOM.TSHotelManager.Common.Core
{
diff --git a/EOM.TSHotelManager.Common.Core/Worker/WorkerHistory.cs b/EOM.TSHotelManager.Common.Core/Worker/WorkerHistory.cs
index 18e4caa3b1cdea039cbaf05bcef1ac9540320f70..23b7fbc50e647f9afb30ab1d03546bdabf760bcf 100644
--- a/EOM.TSHotelManager.Common.Core/Worker/WorkerHistory.cs
+++ b/EOM.TSHotelManager.Common.Core/Worker/WorkerHistory.cs
@@ -35,7 +35,7 @@ namespace EOM.TSHotelManager.Common.Core
///
/// 编号
///
- [SqlSugar.SugarColumn(IsOnlyIgnoreInsert = true,IsOnlyIgnoreUpdate = true)]
+ [SqlSugar.SugarColumn(IsOnlyIgnoreInsert = true, IsOnlyIgnoreUpdate = true)]
public int Id { get; set; }
///
/// 工号
diff --git a/EOM.TSHotelManager.Common.Core/Worker/WorkerPic.cs b/EOM.TSHotelManager.Common.Core/Worker/WorkerPic.cs
index f49b91612ee2265a4c020a69bf84531172fbd93f..381a15261819cd970e3fec13d1342b69da174f94 100644
--- a/EOM.TSHotelManager.Common.Core/Worker/WorkerPic.cs
+++ b/EOM.TSHotelManager.Common.Core/Worker/WorkerPic.cs
@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-//using System.ComponentModel.DataAnnotations.Schema;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
+//using System.ComponentModel.DataAnnotations.Schema;
namespace EOM.TSHotelManager.Common.Core
{
///
@@ -16,7 +10,7 @@ namespace EOM.TSHotelManager.Common.Core
///
/// 自增长流水号
///
- [SqlSugar.SugarColumn(IsIdentity = true,ColumnName = "Id",IsPrimaryKey = true)]
+ [SqlSugar.SugarColumn(IsIdentity = true, ColumnName = "Id", IsPrimaryKey = true)]
public int Id { get; set; }
///
/// 工号
diff --git a/EOM.TSHotelManager.Common.Core/Zero/Admin.cs b/EOM.TSHotelManager.Common.Core/Zero/Admin.cs
index da92a8cf1878904a97cbca7ad955b3fa63ddb716..4b1b7ae935fb7bf60f15b59c8418b1baf62af2a4 100644
--- a/EOM.TSHotelManager.Common.Core/Zero/Admin.cs
+++ b/EOM.TSHotelManager.Common.Core/Zero/Admin.cs
@@ -96,6 +96,6 @@ namespace EOM.TSHotelManager.Common.Core
///
[SqlSugar.SugarColumn(IsIgnore = true)]
public string DeleteNm { get; set; }
-
+
}
}
diff --git a/EOM.TSHotelManager.Common.Core/Zero/AdminType.cs b/EOM.TSHotelManager.Common.Core/Zero/AdminType.cs
index 09a3944b30abd95d46d65a1e123ff666775a89f5..ae072d5f3daa1c4b9bddfa928537ff71212216c5 100644
--- a/EOM.TSHotelManager.Common.Core/Zero/AdminType.cs
+++ b/EOM.TSHotelManager.Common.Core/Zero/AdminType.cs
@@ -22,12 +22,6 @@
*
*模块说明:管理员类型
*/
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
namespace EOM.TSHotelManager.Common.Core
{
///
diff --git a/EOM.TSHotelManager.Common.Core/Zero/Base.cs b/EOM.TSHotelManager.Common.Core/Zero/Base.cs
index 1b14386f64f4f5b622a1db4ec1a94f1abdb2eb83..6154936e2cda6b085dfd2b0cee9d12d9d09d4dd2 100644
--- a/EOM.TSHotelManager.Common.Core/Zero/Base.cs
+++ b/EOM.TSHotelManager.Common.Core/Zero/Base.cs
@@ -22,12 +22,6 @@
*
*模块说明:系统信息静态类
*/
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
namespace EOM.TSHotelManager.Common.Core
{
///
diff --git a/EOM.TSHotelManager.Common.Core/Zero/CheckInfo.cs b/EOM.TSHotelManager.Common.Core/Zero/CheckInfo.cs
index 259fbeb6ef8f0555081a46a9bd5b438652d7c1f2..06366e64873b0c5aa7662e65b41034a84cbffadf 100644
--- a/EOM.TSHotelManager.Common.Core/Zero/CheckInfo.cs
+++ b/EOM.TSHotelManager.Common.Core/Zero/CheckInfo.cs
@@ -22,8 +22,6 @@
*
*模块说明:监管统计类
*/
-using System;
-
namespace EOM.TSHotelManager.Common.Core
{
///
diff --git a/EOM.TSHotelManager.Common.Core/Zero/Dept.cs b/EOM.TSHotelManager.Common.Core/Zero/Dept.cs
index f3bd3b30ce2fea989036e8697c61b75b540b023b..025219765b1460891b514c0939dfdb5be1ad665c 100644
--- a/EOM.TSHotelManager.Common.Core/Zero/Dept.cs
+++ b/EOM.TSHotelManager.Common.Core/Zero/Dept.cs
@@ -23,10 +23,6 @@
*模块说明:部门实体类
*/
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace EOM.TSHotelManager.Common.Core
{
diff --git a/EOM.TSHotelManager.Common.Core/Zero/Education.cs b/EOM.TSHotelManager.Common.Core/Zero/Education.cs
index d679a0f51e540c184704cebee2afb4ae39b664b0..c562be954f518eae436eb366ecc38dad815e1bc2 100644
--- a/EOM.TSHotelManager.Common.Core/Zero/Education.cs
+++ b/EOM.TSHotelManager.Common.Core/Zero/Education.cs
@@ -22,12 +22,6 @@
*
*模块说明:学历类
*/
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
namespace EOM.TSHotelManager.Common.Core
{
///
diff --git a/EOM.TSHotelManager.Common.Core/Zero/Module.cs b/EOM.TSHotelManager.Common.Core/Zero/Module.cs
index ecf7ade8449ce715b0343b74f138346a4cedb4b7..cc1460b5718cc0a04bff55cad7b27ad6a4c9f499 100644
--- a/EOM.TSHotelManager.Common.Core/Zero/Module.cs
+++ b/EOM.TSHotelManager.Common.Core/Zero/Module.cs
@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace EOM.TSHotelManager.Common.Core
+namespace EOM.TSHotelManager.Common.Core
{
///
/// 模块实体
diff --git a/EOM.TSHotelManager.Common.Core/Zero/ModuleConsts.cs b/EOM.TSHotelManager.Common.Core/Zero/ModuleConsts.cs
index 31327389e99cc581b49fa1d8995bef2a12d2b55c..61d188517d7d740477b4419e6d9576f2e9d82a0c 100644
--- a/EOM.TSHotelManager.Common.Core/Zero/ModuleConsts.cs
+++ b/EOM.TSHotelManager.Common.Core/Zero/ModuleConsts.cs
@@ -22,12 +22,6 @@
*
*模块说明:系统模块常量类
*/
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
namespace EOM.TSHotelManager.Common.Core
{
///
diff --git a/EOM.TSHotelManager.Common.Core/Zero/ModuleZero.cs b/EOM.TSHotelManager.Common.Core/Zero/ModuleZero.cs
index d7103c5ffe3e4f54c8c0f2a53689cd291bbc2cf7..39399d0b6614c9ca1f07f36e950e3f451f4de017 100644
--- a/EOM.TSHotelManager.Common.Core/Zero/ModuleZero.cs
+++ b/EOM.TSHotelManager.Common.Core/Zero/ModuleZero.cs
@@ -1,10 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace EOM.TSHotelManager.Common.Core
+namespace EOM.TSHotelManager.Common.Core
{
///
@@ -16,7 +10,7 @@ namespace EOM.TSHotelManager.Common.Core
///
/// 模块ID
///
- [SqlSugar.SugarColumn(IsIdentity = true,ColumnName = "module_id")]
+ [SqlSugar.SugarColumn(IsIdentity = true, ColumnName = "module_id")]
public int module_id { get; set; }
///
/// 管理员账号
diff --git a/EOM.TSHotelManager.Common.Core/Zero/Nation.cs b/EOM.TSHotelManager.Common.Core/Zero/Nation.cs
index 41ba761fd17212bcb7c4180e6bfad0bb5d03548e..fdc8e3344f449326d50798fd9e449998896810bd 100644
--- a/EOM.TSHotelManager.Common.Core/Zero/Nation.cs
+++ b/EOM.TSHotelManager.Common.Core/Zero/Nation.cs
@@ -22,12 +22,6 @@
*
*模块说明:民族类
*/
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
namespace EOM.TSHotelManager.Common.Core
{
///
diff --git a/EOM.TSHotelManager.Common.Core/Zero/VipRule.cs b/EOM.TSHotelManager.Common.Core/Zero/VipRule.cs
index b4903b2cd8340c5dcaca90ae39af6a7b1f89de73..2a905c122ca999c20590178b7f18387d88ae3b4b 100644
--- a/EOM.TSHotelManager.Common.Core/Zero/VipRule.cs
+++ b/EOM.TSHotelManager.Common.Core/Zero/VipRule.cs
@@ -22,12 +22,6 @@
*
*模块说明:会员等级规则类
*/
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
namespace EOM.TSHotelManager.Common.Core
{
///
diff --git a/EOM.TSHotelManager.Common.Core/Zero/position.cs b/EOM.TSHotelManager.Common.Core/Zero/position.cs
index 66cb5041c6e1ae8590a7d394eb6875b08692f128..2758355479c3ca77e6bc255ab18df5e977d5deeb 100644
--- a/EOM.TSHotelManager.Common.Core/Zero/position.cs
+++ b/EOM.TSHotelManager.Common.Core/Zero/position.cs
@@ -22,12 +22,6 @@
*
*模块说明:职务类
*/
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
namespace EOM.TSHotelManager.Common.Core
{
///
diff --git a/EOM.TSHotelManager.EntityFramework/AppSettingsJson.cs b/EOM.TSHotelManager.EntityFramework/AppSettingsJson.cs
index 77f118fae41cccf81ff30a06d4021bb17e00b0ec..cd3a0ec2eee2ae53f404e365634c4b7105cb682d 100644
--- a/EOM.TSHotelManager.EntityFramework/AppSettingsJson.cs
+++ b/EOM.TSHotelManager.EntityFramework/AppSettingsJson.cs
@@ -1,10 +1,4 @@
using Microsoft.Extensions.Configuration;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace EOM.TSHotelManager.EntityFramework
{
diff --git a/EOM.TSHotelManager.EntityFramework/Repository/PgRepository.cs b/EOM.TSHotelManager.EntityFramework/Repository/PgRepository.cs
index 42774851d5c2d7fb26c0099ddab97a3fb35c2396..d35d4a8622d5b0c6f387a14ff4fa540928f92e3c 100644
--- a/EOM.TSHotelManager.EntityFramework/Repository/PgRepository.cs
+++ b/EOM.TSHotelManager.EntityFramework/Repository/PgRepository.cs
@@ -1,10 +1,5 @@
-using SqlSugar;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.Configuration;
+using SqlSugar;
namespace EOM.TSHotelManager.EntityFramework
{
@@ -22,9 +17,10 @@ namespace EOM.TSHotelManager.EntityFramework
MoreSettings = new ConnMoreSettings()
{
PgSqlIsAutoToLower = false, //数据库存在大写字段的
- //,需要把这个设为false ,并且实体和字段名称要一样
- //如果数据库里的数据表本身就为小写,则改成true
- //详细可以参考官网https://www.donet5.com/Home/Doc
+ //,需要把这个设为false ,并且实体和字段名称要一样
+ //如果数据库里的数据表本身就为小写,则改成true
+ //详细可以参考官网https://www.donet5.com/Home/Doc
+ DisableMillisecond = true,
},
ConnectionString = AppSettingsJson.GetAppSettings().GetConnectionString("PgSqlConnectStr")
});
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Business/Cash/CashController.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/Cash/CashController.cs
index 1852b2419789ad7637db9bd50affce51c10d48e4..388523c23d1aeaa808ee2a033c15de2ddad2f693 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Business/Cash/CashController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Business/Cash/CashController.cs
@@ -1,6 +1,5 @@
using EOM.TSHotelManager.Application;
using EOM.TSHotelManager.Common.Core;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
@@ -31,7 +30,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool AddCashInfo([FromBody]Cash cash)
+ public bool AddCashInfo([FromBody] Cash cash)
{
return cashService.AddCashInfo(cash);
}
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Business/Customer/CustoController.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/Customer/CustoController.cs
index 676e1e7cb49a5c9e8f4efad4a22f5a10e4e9cc42..6310c7dc8375a75726aafa09fee87cca01685594 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Business/Customer/CustoController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Business/Customer/CustoController.cs
@@ -1,6 +1,5 @@
using EOM.TSHotelManager.Application;
using EOM.TSHotelManager.Common.Core;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
@@ -31,7 +30,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool InsertCustomerInfo([FromBody]Custo custo)
+ public bool InsertCustomerInfo([FromBody] Custo custo)
{
return customerService.InsertCustomerInfo(custo);
}
@@ -42,7 +41,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool UpdCustomerInfoByCustoNo([FromBody]Custo custo)
+ public bool UpdCustomerInfoByCustoNo([FromBody] Custo custo)
{
return customerService.UpdCustomerInfoByCustoNo(custo);
}
@@ -54,7 +53,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public bool UpdCustomerTypeByCustoNo([FromQuery]string custoNo,int userType)
+ public bool UpdCustomerTypeByCustoNo([FromQuery] string custoNo, int userType)
{
return customerService.UpdCustomerTypeByCustoNo(custoNo, userType);
}
@@ -74,9 +73,9 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public OSelectCustoAllDto SelectCustoAll([FromQuery] int pageIndex, int pageSize)
+ public OSelectCustoAllDto SelectCustoAll([FromQuery] int pageIndex, int pageSize, bool onlyVip = false)
{
- return customerService.SelectCustoAll(pageIndex,pageSize);
+ return customerService.SelectCustoAll(pageIndex, pageSize, onlyVip);
}
///
@@ -84,7 +83,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public List SelectCustoByInfo([FromBody]Custo custo)
+ public List SelectCustoByInfo([FromBody] Custo custo)
{
return customerService.SelectCustoByInfo(custo);
}
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Business/Fonts/FontsController.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/Fonts/FontsController.cs
index 053fd7db778fb949fde7e9c0df466d999ff45fbb..d7adc6f4ef7f3f59b50d35ba963e312bfc9268c4 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Business/Fonts/FontsController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Business/Fonts/FontsController.cs
@@ -1,6 +1,5 @@
using EOM.TSHotelManager.Application;
using EOM.TSHotelManager.Common.Core;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Business/Reser/ReserController.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/Reser/ReserController.cs
index 37ce05ef645e64d4a6f09d6a79c8dd8203e2002e..2a9055cb0e14f1570522382ff952f315ed7fa0cd 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Business/Reser/ReserController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Business/Reser/ReserController.cs
@@ -1,9 +1,7 @@
using EOM.TSHotelManager.Application;
using EOM.TSHotelManager.Common.Core;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
-using System.Security.Cryptography;
namespace EOM.TSHotelManager.WebApi.Controllers
{
@@ -42,7 +40,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public Reser SelectReserInfoByRoomNo([FromQuery]string no)
+ public Reser SelectReserInfoByRoomNo([FromQuery] string no)
{
return reserService.SelectReserInfoByRoomNo(no);
}
@@ -53,7 +51,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool DeleteReserInfo([FromBody]Reser reser)
+ public bool DeleteReserInfo([FromBody] Reser reser)
{
return reserService.DeleteReserInfo(reser);
}
@@ -64,7 +62,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool InserReserInfo([FromBody]Reser r)
+ public bool InserReserInfo([FromBody] Reser r)
{
return reserService.InserReserInfo(r);
}
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Business/Room/RoomController.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/Room/RoomController.cs
index b6656ad7182c0649c384d2b59ce6a3f22465e33e..edc935eba12df9d1ae6007c818cfc292ed7f50e0 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Business/Room/RoomController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Business/Room/RoomController.cs
@@ -1,6 +1,5 @@
using EOM.TSHotelManager.Application;
using EOM.TSHotelManager.Common.Core;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
@@ -31,7 +30,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public List SelectRoomByRoomState([FromQuery]int stateid)
+ public List SelectRoomByRoomState([FromQuery] int stateid)
{
return roomService.SelectRoomByRoomState(stateid);
}
@@ -105,7 +104,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool UpdateRoomInfo([FromBody]Room r)
+ public bool UpdateRoomInfo([FromBody] Room r)
{
return roomService.UpdateRoomInfo(r);
}
@@ -146,7 +145,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public object SelectRoomByRoomPrice([FromQuery]string r)
+ public object SelectRoomByRoomPrice([FromQuery] string r)
{
return roomService.SelectRoomByRoomPrice(r);
}
@@ -188,9 +187,9 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public bool UpdateRoomStateByRoomNo([FromQuery]string roomno, int stateid)
+ public bool UpdateRoomStateByRoomNo([FromQuery] string roomno, int stateid)
{
- return roomService.UpdateRoomStateByRoomNo(roomno,stateid);
+ return roomService.UpdateRoomStateByRoomNo(roomno, stateid);
}
///
@@ -199,7 +198,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool InsertRoom([FromBody]Room rn)
+ public bool InsertRoom([FromBody] Room rn)
{
return roomService.InsertRoom(rn);
}
@@ -230,7 +229,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public object SelectRoomStateIdByRoomNo([FromQuery]string roomno)
+ public object SelectRoomStateIdByRoomNo([FromQuery] string roomno)
{
return roomService.SelectRoomStateIdByRoomNo(roomno);
}
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Business/Room/RoomTypeController.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/Room/RoomTypeController.cs
index 173edabfa40d2952e0bbb75e31b84fb1a9eae5ed..d9d5fac1490d5c3902d87b067f6daaa1fb7b1c6b 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Business/Room/RoomTypeController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Business/Room/RoomTypeController.cs
@@ -1,6 +1,5 @@
using EOM.TSHotelManager.Application;
using EOM.TSHotelManager.Common.Core;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
@@ -41,7 +40,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public RoomType SelectRoomTypeByRoomNo([FromQuery]string no)
+ public RoomType SelectRoomTypeByRoomNo([FromQuery] string no)
{
return roomTypeService.SelectRoomTypeByRoomNo(no);
}
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Business/Sellthing/SellthingController.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/Sellthing/SellthingController.cs
index 0cf486fa63042d9a285f8d577bda2aa6dbada395..e6f491e9baf9617fde7345cc0111d8ce7bc4e92e 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Business/Sellthing/SellthingController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Business/Sellthing/SellthingController.cs
@@ -1,10 +1,7 @@
using EOM.TSHotelManager.Application;
using EOM.TSHotelManager.Common.Core;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
-using System.Collections;
using System.Collections.Generic;
-using System.Xml.Linq;
namespace EOM.TSHotelManager.WebApi.Controllers
{
@@ -32,7 +29,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public List SelectSellThingAll([FromQuery]SellThing sellThing = null)
+ public List SelectSellThingAll([FromQuery] SellThing sellThing = null)
{
return sellService.SelectSellThingAll(sellThing);
}
@@ -44,7 +41,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool UpdateSellThing([FromBody]string stock, string sellNo)
+ public bool UpdateSellThing([FromBody] string stock, string sellNo)
{
return sellService.UpdateSellThing(stock, sellNo);
}
@@ -79,7 +76,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public bool DeleteSellThingBySellNo([FromQuery]string sellNo)
+ public bool DeleteSellThingBySellNo([FromQuery] string sellNo)
{
return sellService.DeleteSellThingBySellNo(sellNo);
}
@@ -91,7 +88,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public SellThing SelectSellThingByNameAndPrice([FromQuery]string name, string price)
+ public SellThing SelectSellThingByNameAndPrice([FromQuery] string name, string price)
{
return sellService.SelectSellThingByNameAndPrice(name, price);
}
@@ -103,7 +100,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public SellThing SelectSellInfoBySellNo([FromQuery]string SellNo)
+ public SellThing SelectSellInfoBySellNo([FromQuery] string SellNo)
{
return sellService.SelectSellInfoBySellNo(SellNo);
}
@@ -114,7 +111,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool InsertSellThing([FromBody]SellThing st)
+ public bool InsertSellThing([FromBody] SellThing st)
{
return sellService.InsertSellThing(st);
}
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Business/Spend/SpendController.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/Spend/SpendController.cs
index cd619cd9b9614a3967668747c77bc63cdef5385c..afae9b64781972bb9e3f3fc0aa63dd8419bc9465 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Business/Spend/SpendController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Business/Spend/SpendController.cs
@@ -1,8 +1,6 @@
using EOM.TSHotelManager.Application;
using EOM.TSHotelManager.Common.Core;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
-using System;
using System.Collections.Generic;
namespace EOM.TSHotelManager.WebApi.Controllers
@@ -32,7 +30,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool InsertSpendInfo([FromBody]Spend s)
+ public bool InsertSpendInfo([FromBody] Spend s)
{
return spendService.InsertSpendInfo(s);
}
@@ -43,7 +41,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public List SelectSpendByCustoNo([FromQuery]string No)
+ public List SelectSpendByCustoNo([FromQuery] string No)
{
return spendService.SelectSpendByCustoNo(No);
}
@@ -54,7 +52,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public List SelectSpendByRoomNo([FromQuery]string No)
+ public List SelectSpendByRoomNo([FromQuery] string No)
{
return spendService.SelectSpendByRoomNo(No);
}
@@ -65,7 +63,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public List SeletHistorySpendInfoAll([FromQuery]string custoNo)
+ public List SeletHistorySpendInfoAll([FromQuery] string custoNo)
{
return spendService.SeletHistorySpendInfoAll(custoNo);
}
@@ -85,7 +83,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public List SelectSpendInfoRoomNo([FromQuery]string RoomNo)
+ public List SelectSpendInfoRoomNo([FromQuery] string RoomNo)
{
return spendService.SelectSpendInfoRoomNo(RoomNo);
}
@@ -97,7 +95,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public object SelectMoneyByRoomNoAndTime([FromQuery]string roomno, string custono)
+ public object SelectMoneyByRoomNoAndTime([FromQuery] string roomno, string custono)
{
return spendService.SelectMoneyByRoomNoAndTime(roomno, custono);
}
@@ -131,7 +129,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool UpdSpenInfo([FromBody]Spend spend)
+ public bool UpdSpenInfo([FromBody] Spend spend)
{
return spendService.UpdSpenInfo(spend);
}
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Business/Wti/WtiController.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/Wti/WtiController.cs
index 097996f5785dc4afa4a6cbe9ba14d5fbfaa1c97b..d83cc81c909d8e451dcc5fab79ebdcaf87c53fea 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Business/Wti/WtiController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Business/Wti/WtiController.cs
@@ -1,6 +1,5 @@
using EOM.TSHotelManager.Application;
using EOM.TSHotelManager.Common.Core;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
@@ -31,7 +30,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public Wti SelectWtiInfoByRoomNo([FromQuery]string roomNo)
+ public Wti SelectWtiInfoByRoomNo([FromQuery] string roomNo)
{
return this.wtiService.SelectWtiInfoByRoomNo(roomNo);
}
@@ -44,7 +43,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public Wti SelectWtiInfoByRoomNoAndTime([FromQuery]string roomno, string usedate, string enddate)
+ public Wti SelectWtiInfoByRoomNoAndTime([FromQuery] string roomno, string usedate, string enddate)
{
return this.wtiService.SelectWtiInfoByRoomNoAndTime(roomno, usedate, enddate);
}
@@ -65,7 +64,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool InsertWtiInfo([FromBody]Wti w)
+ public bool InsertWtiInfo([FromBody] Wti w)
{
return this.wtiService.InsertWtiInfo(w);
}
@@ -76,7 +75,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool UpdateWtiInfo([FromBody]Wti w)
+ public bool UpdateWtiInfo([FromBody] Wti w)
{
return this.wtiService.UpdateWtiInfo(w);
}
@@ -87,7 +86,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool UpdateWtiInfoByRoomNoAndDateTime([FromBody]Wti w)
+ public bool UpdateWtiInfoByRoomNoAndDateTime([FromBody] Wti w)
{
return this.wtiService.UpdateWtiInfoByRoomNoAndDateTime(w);
}
@@ -107,7 +106,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool DeleteWtiInfoByRoomNoAndDateTime([FromBody]string roomno, string usedate, string enddate)
+ public bool DeleteWtiInfoByRoomNoAndDateTime([FromBody] string roomno, string usedate, string enddate)
{
return this.wtiService.DeleteWtiInfoByRoomNoAndDateTime(roomno, usedate, enddate);
}
@@ -117,7 +116,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public List ListWtiInfoByRoomNo([FromQuery]string roomno)
+ public List ListWtiInfoByRoomNo([FromQuery] string roomno)
{
return this.wtiService.ListWtiInfoByRoomNo(roomno);
}
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Sys/NavBar/NavBarController.cs b/EOM.TSHotelManager.WebApi/Controllers/Sys/NavBar/NavBarController.cs
index cd228e014b242f30513e5dda2e12445c39b1d1d8..4e7d3dceed1aa3f5c5401f549e285c7ee553878a 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Sys/NavBar/NavBarController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Sys/NavBar/NavBarController.cs
@@ -1,6 +1,5 @@
using EOM.TSHotelManager.Application;
using EOM.TSHotelManager.Common.Core;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Util/AppController.cs b/EOM.TSHotelManager.WebApi/Controllers/Util/AppController.cs
index a57b70f9b19f669587763949f987a1e8b2f52fe4..9dc8a97c0f8bf5b03b7b25579a1faf251285f9ff 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Util/AppController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Util/AppController.cs
@@ -1,6 +1,6 @@
using EOM.TSHotelManager.Application;
using EOM.TSHotelManager.Common.Core;
-using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
@@ -31,7 +31,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public string SelectCardCode([FromQuery]string identityCard)
+ public string SelectCardCode([FromQuery] string identityCard)
{
return utilService.SelectCardCode(identityCard);
}
@@ -41,6 +41,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
+ [AllowAnonymous]
public Applicationversion CheckBaseVersion()
{
return utilService.CheckBaseVersion();
@@ -52,7 +53,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool AddLog([FromBody]OperationLog opr)
+ public bool AddLog([FromBody] OperationLog opr)
{
return utilService.AddLog(opr);
}
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Worker/Check/WorkerCheckController.cs b/EOM.TSHotelManager.WebApi/Controllers/Worker/Check/WorkerCheckController.cs
index 7029c7987ae98f89b8fd0aee38fb27d4d23a259a..aaf78ca4b21a90c8282d03b9b7734ba3a7217bdb 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Worker/Check/WorkerCheckController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Worker/Check/WorkerCheckController.cs
@@ -1,6 +1,5 @@
using EOM.TSHotelManager.Application;
using EOM.TSHotelManager.Common.Core;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
@@ -31,7 +30,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public List SelectCheckInfoByWorkerNo([FromQuery]string wid)
+ public List SelectCheckInfoByWorkerNo([FromQuery] string wid)
{
return workerCheckService.SelectCheckInfoByWorkerNo(wid);
}
@@ -42,7 +41,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public object SelectWorkerCheckDaySumByWorkerNo([FromQuery]string wkn)
+ public object SelectWorkerCheckDaySumByWorkerNo([FromQuery] string wkn)
{
return workerCheckService.SelectWorkerCheckDaySumByWorkerNo(wkn);
}
@@ -64,7 +63,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool AddCheckInfo([FromBody]WorkerCheck workerCheck)
+ public bool AddCheckInfo([FromBody] WorkerCheck workerCheck)
{
return workerCheckService.AddCheckInfo(workerCheck);
}
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Worker/GoodBad/WorkerGoodBadController.cs b/EOM.TSHotelManager.WebApi/Controllers/Worker/GoodBad/WorkerGoodBadController.cs
index 4444af33e31533f9b45e9171b1dea201a8ea6474..0170449f8e60b4f95aaa5079ccdb689e61a8665a 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Worker/GoodBad/WorkerGoodBadController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Worker/GoodBad/WorkerGoodBadController.cs
@@ -1,6 +1,5 @@
using EOM.TSHotelManager.Application;
using EOM.TSHotelManager.Common.Core;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
@@ -31,7 +30,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool AddGoodBad([FromBody]WorkerGoodBad goodBad)
+ public bool AddGoodBad([FromBody] WorkerGoodBad goodBad)
{
return workerGoodBadService.AddGoodBad(goodBad);
}
@@ -42,7 +41,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public List SelectAllGoodBadByWorkNo([FromQuery]string wn)
+ public List SelectAllGoodBadByWorkNo([FromQuery] string wn)
{
return workerGoodBadService.SelectAllGoodBadByWorkNo(wn);
}
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Worker/History/WorkerHistoryController.cs b/EOM.TSHotelManager.WebApi/Controllers/Worker/History/WorkerHistoryController.cs
index 1a800e4f2731e6480703962fd9cc88196cf82d45..b0da49af2ad5523801abb504f372de4b76d0abfb 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Worker/History/WorkerHistoryController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Worker/History/WorkerHistoryController.cs
@@ -1,6 +1,5 @@
using EOM.TSHotelManager.Application;
using EOM.TSHotelManager.Common.Core;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
@@ -31,7 +30,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool AddHistoryByWorkerId([FromBody]WorkerHistory workerHistory)
+ public bool AddHistoryByWorkerId([FromBody] WorkerHistory workerHistory)
{
return workerHistoryService.AddHistoryByWorkerId(workerHistory);
}
@@ -42,7 +41,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public List SelectHistoryByWorkerId([FromQuery]string wid)
+ public List SelectHistoryByWorkerId([FromQuery] string wid)
{
return workerHistoryService.SelectHistoryByWorkerId(wid);
}
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Worker/Picture/WorkerPictureController.cs b/EOM.TSHotelManager.WebApi/Controllers/Worker/Picture/WorkerPictureController.cs
index 51e9445375b2315c0dbab2f756cc196cc999bb2b..f93739391567b5c85b8a2fd8abc12393a1cc0f0a 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Worker/Picture/WorkerPictureController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Worker/Picture/WorkerPictureController.cs
@@ -1,6 +1,5 @@
using EOM.TSHotelManager.Application;
using EOM.TSHotelManager.Common.Core;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace EOM.TSHotelManager.WebApi.Controllers
@@ -30,7 +29,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public WorkerPic WorkerPic([FromQuery]WorkerPic workerPic)
+ public WorkerPic WorkerPic([FromQuery] WorkerPic workerPic)
{
return workerPicService.WorkerPic(workerPic);
}
@@ -41,7 +40,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool InsertWorkerPic([FromBody]WorkerPic workerPic)
+ public bool InsertWorkerPic([FromBody] WorkerPic workerPic)
{
return workerPicService.InsertWorkerPic(workerPic);
}
@@ -52,7 +51,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool DeleteWorkerPic([FromBody]WorkerPic workerPic)
+ public bool DeleteWorkerPic([FromBody] WorkerPic workerPic)
{
return workerPicService.DeleteWorkerPic(workerPic);
}
@@ -63,9 +62,9 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool UpdateWorkerPic([FromBody]WorkerPic workerPic)
+ public bool UpdateWorkerPic([FromBody] WorkerPic workerPic)
{
- return workerPicService.UpdateWorkerPic(workerPic);
+ return workerPicService.UpdateWorkerPic(workerPic);
}
}
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Worker/WorkerController.cs b/EOM.TSHotelManager.WebApi/Controllers/Worker/WorkerController.cs
index 4623d212e6d536fb65e9565db66e2594929f6911..b74c7ac44b60e01df3c9d182b282d15436f5a7a7 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Worker/WorkerController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Worker/WorkerController.cs
@@ -1,6 +1,6 @@
using EOM.TSHotelManager.Application;
using EOM.TSHotelManager.Common.Core;
-using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
@@ -31,7 +31,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool UpdateWorker([FromBody]Worker worker)
+ public bool UpdateWorker([FromBody] Worker worker)
{
return workerService.UpdateWorker(worker);
}
@@ -42,7 +42,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool ManagerWorkerAccount([FromBody]Worker worker)
+ public bool ManagerWorkerAccount([FromBody] Worker worker)
{
return workerService.ManagerWorkerAccount(worker);
}
@@ -54,7 +54,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
[HttpPost]
- public bool UpdateWorkerPositionAndClub([FromBody]Worker worker)
+ public bool UpdateWorkerPositionAndClub([FromBody] Worker worker)
{
return workerService.UpdateWorkerPositionAndClub(worker);
}
@@ -65,7 +65,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool AddWorker([FromBody]Worker worker)
+ public bool AddWorker([FromBody] Worker worker)
{
return workerService.AddWorker(worker);
}
@@ -97,7 +97,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public Worker SelectWorkerInfoByWorkerId([FromQuery]string workerId)
+ public Worker SelectWorkerInfoByWorkerId([FromQuery] string workerId)
{
return workerService.SelectWorkerInfoByWorkerId(workerId);
}
@@ -108,7 +108,8 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public Worker SelectWorkerInfoByWorkerIdAndWorkerPwd([FromBody]Worker worker)
+ [AllowAnonymous]
+ public Worker SelectWorkerInfoByWorkerIdAndWorkerPwd([FromBody] Worker worker)
{
return workerService.SelectWorkerInfoByWorkerIdAndWorkerPwd(worker);
}
@@ -119,7 +120,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool UpdWorkerPwdByWorkNo([FromBody]Worker worker)
+ public bool UpdWorkerPwdByWorkNo([FromBody] Worker worker)
{
return workerService.UpdWorkerPwdByWorkNo(worker);
}
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Zero/Admin/AdminController.cs b/EOM.TSHotelManager.WebApi/Controllers/Zero/Admin/AdminController.cs
index d8908b73ffca8f2469964500709fd050813b22d9..843b8e1affb5a7d792630c5515d0084b63bdb1ca 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Zero/Admin/AdminController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Zero/Admin/AdminController.cs
@@ -1,8 +1,6 @@
using EOM.TSHotelManager.Application;
using EOM.TSHotelManager.Common.Core;
-using EOM.TSHotelManager.WebApi.Filter;
using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
@@ -33,7 +31,8 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public Admin SelectMangerByPass([FromBody]Admin admin)
+ [AllowAnonymous]
+ public Admin SelectMangerByPass([FromBody] Admin admin)
{
return adminService.SelectMangerByPass(admin);
}
@@ -44,7 +43,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public Admin SelectAdminPwdByAccount([FromQuery]string account)
+ public Admin SelectAdminPwdByAccount([FromQuery] string account)
{
return adminService.SelectAdminPwdByAccount(account);
}
@@ -65,7 +64,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool UpdateNewPwdByOldPwd([FromBody]Admin admin)
+ public bool UpdateNewPwdByOldPwd([FromBody] Admin admin)
{
return adminService.UpdateNewPwdByOldPwd(admin);
}
@@ -86,7 +85,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool AddAdmin([FromBody]Admin admin)
+ public bool AddAdmin([FromBody] Admin admin)
{
return adminService.AddAdmin(admin);
}
@@ -97,7 +96,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public Admin GetAdminInfoByAdminAccount([FromQuery]Admin admin)
+ public Admin GetAdminInfoByAdminAccount([FromQuery] Admin admin)
{
return adminService.GetAdminInfoByAdminAccount(admin);
}
@@ -118,7 +117,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool UpdAccount([FromBody]Admin admins)
+ public bool UpdAccount([FromBody] Admin admins)
{
return adminService.UpdAccount(admins);
}
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Zero/Base/BaseController.cs b/EOM.TSHotelManager.WebApi/Controllers/Zero/Base/BaseController.cs
index 91030b9394e035a5fd7b5d992cef045523cd19b3..e7eec774bad3d1350c328e1e48689993c5f16d5a 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Zero/Base/BaseController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Zero/Base/BaseController.cs
@@ -1,6 +1,5 @@
using EOM.TSHotelManager.Application;
using EOM.TSHotelManager.Common.Core;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
@@ -32,7 +31,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public List SelectSexTypeAll([FromQuery]SexType sexType = null)
+ public List SelectSexTypeAll([FromQuery] SexType sexType = null)
{
return baseService.SelectSexTypeAll(sexType);
}
@@ -42,7 +41,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public SexType SelectSexType([FromQuery]SexType sexType)
+ public SexType SelectSexType([FromQuery] SexType sexType)
{
return baseService.SelectSexType(sexType);
}
@@ -53,7 +52,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool AddSexType([FromBody]SexType sexType)
+ public bool AddSexType([FromBody] SexType sexType)
{
return baseService.AddSexType(sexType);
}
@@ -64,7 +63,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool DelSexType([FromBody]SexType sexType)
+ public bool DelSexType([FromBody] SexType sexType)
{
return baseService.DelSexType(sexType);
}
@@ -75,7 +74,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool UpdSexType([FromBody]SexType sexType)
+ public bool UpdSexType([FromBody] SexType sexType)
{
return baseService.UpdSexType(sexType);
}
@@ -89,7 +88,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public List SelectPositionAll([FromQuery]Position position = null)
+ public List SelectPositionAll([FromQuery] Position position = null)
{
return baseService.SelectPositionAll(position);
}
@@ -99,7 +98,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public Position SelectPosition([FromQuery]Position position)
+ public Position SelectPosition([FromQuery] Position position)
{
return baseService.SelectPosition(position);
}
@@ -110,7 +109,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool AddPosition([FromBody]Position position)
+ public bool AddPosition([FromBody] Position position)
{
return baseService.AddPosition(position);
}
@@ -121,7 +120,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool DelPosition([FromBody]Position position)
+ public bool DelPosition([FromBody] Position position)
{
return baseService.DelPosition(position);
}
@@ -132,7 +131,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool UpdPosition([FromBody]Position position)
+ public bool UpdPosition([FromBody] Position position)
{
return baseService.UpdPosition(position);
}
@@ -146,7 +145,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public List SelectNationAll([FromQuery]Nation nation = null)
+ public List SelectNationAll([FromQuery] Nation nation = null)
{
return baseService.SelectNationAll(nation);
}
@@ -156,7 +155,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public Nation SelectNation([FromQuery]Nation nation)
+ public Nation SelectNation([FromQuery] Nation nation)
{
return baseService.SelectNation(nation);
}
@@ -167,7 +166,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool AddNation([FromBody]Nation nation)
+ public bool AddNation([FromBody] Nation nation)
{
return baseService.AddNation(nation);
}
@@ -178,7 +177,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool DelNation([FromBody]Nation nation)
+ public bool DelNation([FromBody] Nation nation)
{
return baseService.DelNation(nation);
}
@@ -189,7 +188,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool UpdNation([FromBody]Nation nation)
+ public bool UpdNation([FromBody] Nation nation)
{
return baseService.UpdNation(nation);
}
@@ -203,7 +202,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public List SelectEducationAll([FromQuery]Education education = null)
+ public List SelectEducationAll([FromQuery] Education education = null)
{
return baseService.SelectEducationAll(education);
}
@@ -213,7 +212,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public Education SelectEducation([FromQuery]Education education)
+ public Education SelectEducation([FromQuery] Education education)
{
return baseService.SelectEducation(education);
}
@@ -224,7 +223,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool AddEducation([FromBody]Education education)
+ public bool AddEducation([FromBody] Education education)
{
return baseService.AddEducation(education);
}
@@ -235,7 +234,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool DelEducation([FromBody]Education education)
+ public bool DelEducation([FromBody] Education education)
{
return baseService.DelEducation(education);
}
@@ -246,7 +245,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool UpdEducation([FromBody]Education education)
+ public bool UpdEducation([FromBody] Education education)
{
return baseService.UpdEducation(education);
}
@@ -280,7 +279,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public Dept SelectDept([FromQuery]Dept dept)
+ public Dept SelectDept([FromQuery] Dept dept)
{
return baseService.SelectDept(dept);
}
@@ -291,7 +290,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool AddDept([FromBody]Dept dept)
+ public bool AddDept([FromBody] Dept dept)
{
return baseService.AddDept(dept);
}
@@ -302,7 +301,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool DelDept([FromBody]Dept dept)
+ public bool DelDept([FromBody] Dept dept)
{
return baseService.DelDept(dept);
}
@@ -313,7 +312,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool UpdDept([FromBody]Dept dept)
+ public bool UpdDept([FromBody] Dept dept)
{
return baseService.UpdDept(dept);
}
@@ -348,7 +347,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public CustoType SelectCustoTypeByTypeId([FromQuery]CustoType custoType)
+ public CustoType SelectCustoTypeByTypeId([FromQuery] CustoType custoType)
{
return baseService.SelectCustoTypeByTypeId(custoType);
}
@@ -359,7 +358,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool InsertCustoType([FromBody]CustoType custoType)
+ public bool InsertCustoType([FromBody] CustoType custoType)
{
return baseService.InsertCustoType(custoType);
}
@@ -370,7 +369,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool DeleteCustoType([FromBody]CustoType custoType)
+ public bool DeleteCustoType([FromBody] CustoType custoType)
{
return baseService.DeleteCustoType(custoType);
}
@@ -381,7 +380,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool UpdateCustoType([FromBody]CustoType custoType)
+ public bool UpdateCustoType([FromBody] CustoType custoType)
{
return baseService.UpdateCustoType(custoType);
}
@@ -416,7 +415,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public PassPortType SelectPassPortTypeByTypeId([FromQuery]PassPortType passPortType)
+ public PassPortType SelectPassPortTypeByTypeId([FromQuery] PassPortType passPortType)
{
return baseService.SelectPassPortTypeByTypeId(passPortType);
}
@@ -427,7 +426,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool InsertPassPortType([FromBody]PassPortType passPortType)
+ public bool InsertPassPortType([FromBody] PassPortType passPortType)
{
return baseService.InsertPassPortType(passPortType);
}
@@ -438,7 +437,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool DeletePassPortType([FromBody]PassPortType portType)
+ public bool DeletePassPortType([FromBody] PassPortType portType)
{
return baseService.DeletePassPortType(portType);
}
@@ -449,7 +448,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool UpdatePassPortType([FromBody]PassPortType portType)
+ public bool UpdatePassPortType([FromBody] PassPortType portType)
{
return baseService.UpdatePassPortType(portType);
}
@@ -484,7 +483,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public GBType SelectGBTypeByTypeId([FromQuery]GBType gBType)
+ public GBType SelectGBTypeByTypeId([FromQuery] GBType gBType)
{
return baseService.SelectGBTypeByTypeId(gBType);
}
@@ -495,7 +494,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool InsertGBType([FromBody]GBType gBType)
+ public bool InsertGBType([FromBody] GBType gBType)
{
return baseService.InsertGBType(gBType);
}
@@ -506,7 +505,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool DeleteGBType([FromBody]GBType gBType)
+ public bool DeleteGBType([FromBody] GBType gBType)
{
return baseService.DeleteGBType(gBType);
}
@@ -517,7 +516,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool UpdateGBType([FromBody]GBType gBType)
+ public bool UpdateGBType([FromBody] GBType gBType)
{
return baseService.UpdateGBType(gBType);
}
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Zero/CheckInfo/CheckInfoController.cs b/EOM.TSHotelManager.WebApi/Controllers/Zero/CheckInfo/CheckInfoController.cs
index 3d3b32818aa5aa9edea36037e48597aced0350f8..2b30e05a4958066fa3f7eb793c67efd83e30d201 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Zero/CheckInfo/CheckInfoController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Zero/CheckInfo/CheckInfoController.cs
@@ -1,6 +1,5 @@
using EOM.TSHotelManager.Application;
using EOM.TSHotelManager.Common.Core;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Zero/Module/ModuleController.cs b/EOM.TSHotelManager.WebApi/Controllers/Zero/Module/ModuleController.cs
index ca46647a43724025041830d47efa5ec4d546420a..51fbe3d8758098979483a1535dee8e3b06d93bba 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Zero/Module/ModuleController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Zero/Module/ModuleController.cs
@@ -1,6 +1,5 @@
using EOM.TSHotelManager.Application;
using EOM.TSHotelManager.Common.Core;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
@@ -41,7 +40,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public List GetAllModuleByAdmin([FromBody]Admin admin)
+ public List GetAllModuleByAdmin([FromBody] Admin admin)
{
return adminModuleZeroService.GetAllModuleByAdmin(admin);
}
@@ -52,7 +51,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool AddModuleZeroList([FromBody]List moduleZeros)
+ public bool AddModuleZeroList([FromBody] List moduleZeros)
{
return adminModuleZeroService.AddModuleZeroList(moduleZeros);
}
@@ -63,7 +62,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool DelModuleZeroList([FromBody]ModuleZero moduleZero)
+ public bool DelModuleZeroList([FromBody] ModuleZero moduleZero)
{
return adminModuleZeroService.DelModuleZeroList(moduleZero);
}
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Zero/Notice/NoticeController.cs b/EOM.TSHotelManager.WebApi/Controllers/Zero/Notice/NoticeController.cs
index 83f5a92f357119c9adea7d3bbdad9b6a38ca4346..b30c7ab0ab97b0bdbef6b7796315640ac7cf4dcd 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Zero/Notice/NoticeController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Zero/Notice/NoticeController.cs
@@ -1,6 +1,5 @@
using EOM.TSHotelManager.Application;
using EOM.TSHotelManager.Common.Core;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
@@ -43,7 +42,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public Notice SelectNoticeByNoticeNo([FromQuery]string noticeId)
+ public Notice SelectNoticeByNoticeNo([FromQuery] string noticeId)
{
return noticeService.SelectNoticeByNoticeNo(noticeId);
}
@@ -55,7 +54,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool InsertNotice([FromBody]Notice notice)
+ public bool InsertNotice([FromBody] Notice notice)
{
return noticeService.InsertNotice(notice);
}
diff --git a/EOM.TSHotelManager.WebApi/Controllers/Zero/VipRule/VipRuleController.cs b/EOM.TSHotelManager.WebApi/Controllers/Zero/VipRule/VipRuleController.cs
index add0c91be999bdc8fae64ebccd5142fcac2a5094..096da0c84068cf68ca9ab4d3a4defe2ddfdf5ec8 100644
--- a/EOM.TSHotelManager.WebApi/Controllers/Zero/VipRule/VipRuleController.cs
+++ b/EOM.TSHotelManager.WebApi/Controllers/Zero/VipRule/VipRuleController.cs
@@ -1,6 +1,5 @@
using EOM.TSHotelManager.Application;
using EOM.TSHotelManager.Common.Core;
-using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
@@ -41,7 +40,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpGet]
- public VipRule SelectVipRule([FromQuery]VipRule vipRule)
+ public VipRule SelectVipRule([FromQuery] VipRule vipRule)
{
return vipRuleAppService.SelectVipRule(vipRule);
}
@@ -52,7 +51,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool AddVipRule([FromBody]VipRule vipRule)
+ public bool AddVipRule([FromBody] VipRule vipRule)
{
return vipRuleAppService.AddVipRule(vipRule);
}
@@ -63,7 +62,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool DelVipRule([FromBody]VipRule vipRule)
+ public bool DelVipRule([FromBody] VipRule vipRule)
{
return vipRuleAppService.DelVipRule(vipRule);
}
@@ -74,7 +73,7 @@ namespace EOM.TSHotelManager.WebApi.Controllers
///
///
[HttpPost]
- public bool UpdVipRule([FromBody]VipRule vipRule)
+ public bool UpdVipRule([FromBody] VipRule vipRule)
{
return vipRuleAppService.UpdVipRule(vipRule);
}
diff --git a/EOM.TSHotelManager.WebApi/CustomAttribute/SkipCustomActionFilterAttribute.cs b/EOM.TSHotelManager.WebApi/CustomAttribute/SkipCustomActionFilterAttribute.cs
new file mode 100644
index 0000000000000000000000000000000000000000..8d634c7d8dbde545bb61c76d446242643cfc38f6
--- /dev/null
+++ b/EOM.TSHotelManager.WebApi/CustomAttribute/SkipCustomActionFilterAttribute.cs
@@ -0,0 +1,6 @@
+using System;
+
+[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
+public class SkipCustomActionFilterAttribute : Attribute
+{
+}
diff --git a/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.csproj b/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.csproj
index 11d58756212aaa20236b2037c08a66ff201caa26..5ab2620e3d7478c9d45882b76188dd412127d199 100644
--- a/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.csproj
+++ b/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.csproj
@@ -18,13 +18,22 @@
False
+
+
+
+
+
+
+
+
+
@@ -34,6 +43,9 @@
+
+ ..\Library\CK.Common.dll
+
..\Library\EOM.Encrypt.dll
diff --git a/EOM.TSHotelManager.WebApi/Filter/ActionFilter.cs b/EOM.TSHotelManager.WebApi/Filter/ActionFilter.cs
deleted file mode 100644
index 1bb12fefe7daf5e7b70f40d0f6be60a0025f8d6d..0000000000000000000000000000000000000000
--- a/EOM.TSHotelManager.WebApi/Filter/ActionFilter.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-using Microsoft.AspNetCore.Mvc.Controllers;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.AspNetCore.Mvc.Filters;
-using System;
-
-namespace EOM.TSHotelManager.WebApi.Filter
-{
- public class ActionFilter : ActionFilterAttribute
- {
- ///
- /// Action方法调用之前执行
- ///
- ///
- public override void OnActionExecuting(ActionExecutingContext context)
- {
- var descriptor = context.ActionDescriptor as ControllerActionDescriptor;
-
- string param = string.Empty;
- string globalParam = string.Empty;
-
- foreach (var arg in context.ActionArguments)
- {
- string value = Newtonsoft.Json.JsonConvert.SerializeObject(arg.Value);
- param += $"{arg.Key} : {value} \r\n";
- globalParam += value;
- }
- Console.WriteLine($"webapi方法名称:【{descriptor.ActionName}】接收到参数为:{param}");
- }
-
- ///
- /// Action 方法调用后,Result 方法调用前执行
- ///
- ///
- public override void OnActionExecuted(ActionExecutedContext context) { }
-
- ///
- /// Result 方法调用前执行
- ///
- ///
- public override void OnResultExecuting(ResultExecutingContext context) { }
-
- ///
- /// Result 方法调用后执行
- ///
- ///
- public override void OnResultExecuted(ResultExecutedContext context)
- {
- var descriptor = context.ActionDescriptor as ControllerActionDescriptor;
-
- string result = string.Empty;
- if (context.Result is ObjectResult)
- {
- result = Newtonsoft.Json.JsonConvert.SerializeObject(((ObjectResult)context.Result).Value);
- }
-
- Console.WriteLine($"webapi方法名称【{descriptor.ActionName}】执行的返回值 : {result}");
- }
- }
-}
diff --git a/EOM.TSHotelManager.WebApi/Filter/AuthorizeAllControllersConvention.cs b/EOM.TSHotelManager.WebApi/Filter/AuthorizeAllControllersConvention.cs
new file mode 100644
index 0000000000000000000000000000000000000000..57343d8b0ffd7f2414c5b7e723b0f86037680c9a
--- /dev/null
+++ b/EOM.TSHotelManager.WebApi/Filter/AuthorizeAllControllersConvention.cs
@@ -0,0 +1,35 @@
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc.ApplicationModels;
+using Microsoft.AspNetCore.Mvc.Authorization;
+using System.Linq;
+
+namespace EOM.TSHotelManager.WebApi.Filter
+{
+ public class AuthorizeAllControllersConvention : IApplicationModelConvention
+ {
+ public void Apply(ApplicationModel application)
+ {
+ foreach (var controller in application.Controllers)
+ {
+ var hasAllowAnonymousAttribute = controller.ControllerType.GetCustomAttributes(true)
+ .Any(attr => attr.GetType() == typeof(AllowAnonymousAttribute));
+
+ if (!hasAllowAnonymousAttribute)
+ {
+ controller.Filters.Add(new AuthorizeFilter());
+ }
+
+ foreach (var action in controller.Actions)
+ {
+ var hasAllowAnonymousAttributeOnAction = action.ActionMethod.GetCustomAttributes(true)
+ .Any(attr => attr.GetType() == typeof(AllowAnonymousAttribute));
+
+ if (!hasAllowAnonymousAttributeOnAction)
+ {
+ action.Filters.Add(new AuthorizeFilter());
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/EOM.TSHotelManager.WebApi/Program.cs b/EOM.TSHotelManager.WebApi/Program.cs
index a1734455a360d799d4b76092403c82c7f4abad48..7f9520cb65129d882081144ed99358a3a6e20cd6 100644
--- a/EOM.TSHotelManager.WebApi/Program.cs
+++ b/EOM.TSHotelManager.WebApi/Program.cs
@@ -1,14 +1,6 @@
-using Autofac;
using Autofac.Extensions.DependencyInjection;
-using EOM.TSHotelManager.EntityFramework;
using Microsoft.AspNetCore.Hosting;
-using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
-using Microsoft.Extensions.Logging;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
namespace EOM.TSHotelManager.WebApi
{
diff --git a/EOM.TSHotelManager.WebApi/Router_Extension/MvcOptionsExtensions.cs b/EOM.TSHotelManager.WebApi/Router_Extension/MvcOptionsExtensions.cs
index a98e2b1e6df55784d20b41255db792592843d442..c291def179ed4671271aa8fb923d0c9d8005551c 100644
--- a/EOM.TSHotelManager.WebApi/Router_Extension/MvcOptionsExtensions.cs
+++ b/EOM.TSHotelManager.WebApi/Router_Extension/MvcOptionsExtensions.cs
@@ -1,5 +1,5 @@
-using Microsoft.AspNetCore.Mvc.Routing;
-using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.Routing;
namespace EOM.TSHotelManager.WebApi
{
diff --git a/EOM.TSHotelManager.WebApi/Startup.cs b/EOM.TSHotelManager.WebApi/Startup.cs
index ce93daa993c144d732458fd7fd7f4e0a8e143608..cceb591bea9a51f00b744661d3d7c16abe4a5b78 100644
--- a/EOM.TSHotelManager.WebApi/Startup.cs
+++ b/EOM.TSHotelManager.WebApi/Startup.cs
@@ -1,59 +1,70 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using System.Text.Encodings.Web;
-using System.Text.Unicode;
-using System.Threading.Tasks;
using Autofac;
-using Autofac.Core;
-using EOM.Encrypt;
using EOM.TSHotelManager.EntityFramework;
+using EOM.TSHotelManager.WebApi.Filter;
+using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
-using Microsoft.AspNetCore.Mvc.Controllers;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting;
-using Microsoft.Extensions.Logging;
-using Microsoft.Extensions.Options;
+using Microsoft.IdentityModel.Tokens;
using Microsoft.OpenApi.Models;
using Newtonsoft.Json.Serialization;
+using System;
+using System.IO;
+using System.Reflection;
+using System.Text;
namespace EOM.TSHotelManager.WebApi
{
public class Startup
{
+ private readonly IConfiguration _configuration;
+
public Startup(IConfiguration configuration)
{
- Configuration = configuration;
+ _configuration = configuration;
}
- public IConfiguration Configuration { get; }
-
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
- //services.AddCors(options =>
- //{
- // options.AddDefaultPolicy(builder =>
- // {
- // builder
- // .AllowAnyOrigin() // κԴ
- // .AllowAnyMethod() // κHTTP
- // .AllowAnyHeader()// κHTTPͷֶ
- // .AllowCredentials();
- // });
- //});
-
- services.AddControllers().AddJsonOptions(opts =>
+ services.AddAuthentication(options =>
+ {
+ options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
+ options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
+ }).AddJwtBearer("Bearer", options =>
+ {
+ options.TokenValidationParameters = new TokenValidationParameters
+ {
+ ValidateIssuer = true,
+ ValidateAudience = true,
+ ValidateLifetime = true,
+ ValidateIssuerSigningKey = true,
+ ValidIssuer = _configuration["Jwt:Issuer"],
+ ValidAudience = _configuration["Jwt:Audience"], // Чaudienceֵ
+ IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(_configuration["Jwt:Key"]))
+ };
+ });
+
+ services.AddAuthorization(options =>
+ {
+ // һΪApiAccessIJ
+ options.AddPolicy("ApiAccess", policy =>
+ {
+ policy.AuthenticationSchemes.Add("Bearer");
+ policy.RequireAuthenticatedUser();
+ });
+
+ // ʹ涨ġApiAccessΪĬϲ
+ options.DefaultPolicy = options.GetPolicy("ApiAccess");
+ });
+
+
+ services.AddControllers(options =>
{
- opts.JsonSerializerOptions.Encoder = JavaScriptEncoder.Create(UnicodeRanges.All);
- opts.JsonSerializerOptions.PropertyNamingPolicy = null;
+ options.Conventions.Add(new AuthorizeAllControllersConvention());
}).AddNewtonsoftJson(opt =>
{
//ʱʽӦ
@@ -92,9 +103,9 @@ namespace EOM.TSHotelManager.WebApi
}
});
//ȡͬ¸ֲxmlעͣһȡҵ㡢ʵͽӿڲ㼴
- s.IncludeXmlComments(AppContext.BaseDirectory+"EOM.TSHotelManager.Application.xml");
- s.IncludeXmlComments(AppContext.BaseDirectory+"EOM.TSHotelManager.Common.Core.xml");
- s.IncludeXmlComments(AppContext.BaseDirectory+"EOM.TSHotelManager.WebApi.xml");
+ s.IncludeXmlComments(AppContext.BaseDirectory + "EOM.TSHotelManager.Application.xml");
+ s.IncludeXmlComments(AppContext.BaseDirectory + "EOM.TSHotelManager.Common.Core.xml");
+ s.IncludeXmlComments(AppContext.BaseDirectory + "EOM.TSHotelManager.WebApi.xml");
#endregion
#region ʽʱ
@@ -104,7 +115,7 @@ namespace EOM.TSHotelManager.WebApi
#endregion
});
#endregion
-
+
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
@@ -119,6 +130,8 @@ namespace EOM.TSHotelManager.WebApi
app.UseRouting();
+ app.UseAuthentication();
+
app.UseAuthorization();
app.UseEndpoints(endpoints =>
diff --git a/EOM.TSHotelManager.WebApi/appsettings.json b/EOM.TSHotelManager.WebApi/appsettings.json
index 5711b4bccf356523455016bff0f3345bd8015e43..87bf62242f6631dece8fcd1969d456369532c1fb 100644
--- a/EOM.TSHotelManager.WebApi/appsettings.json
+++ b/EOM.TSHotelManager.WebApi/appsettings.json
@@ -7,7 +7,12 @@
}
},
"ConnectionStrings": {
- "PgSqlConnectStr": "Host=127.1.1.1;Port=5432;Username=postgres;Password=123;Database=tshoteldb;"
+ "PgSqlConnectStr": "Host=.;Port=5432;Username=postgres;Password=.;Database=tshoteldb;"
},
- "AllowedHosts": "*"
+ "AllowedHosts": "*",
+ "Jwt": {
+ "Key": ".",
+ "Issuer": ".",
+ "Audience": "."
+ }
}