|
@@ -1,6 +1,7 @@
|
|
using AutoMapper;
|
|
using AutoMapper;
|
|
using MySqlX.XDevAPI.Common;
|
|
using MySqlX.XDevAPI.Common;
|
|
using OASystem.Domain;
|
|
using OASystem.Domain;
|
|
|
|
+using OASystem.Domain.AesEncryption;
|
|
using OASystem.Domain.Dtos.Groups;
|
|
using OASystem.Domain.Dtos.Groups;
|
|
using OASystem.Domain.Dtos.Resource;
|
|
using OASystem.Domain.Dtos.Resource;
|
|
using OASystem.Domain.Entities.Resource;
|
|
using OASystem.Domain.Entities.Resource;
|
|
@@ -10,6 +11,7 @@ using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Threading.Tasks;
|
|
|
|
+using XAct.Users;
|
|
using Result = OASystem.Domain.Result;
|
|
using Result = OASystem.Domain.Result;
|
|
|
|
|
|
namespace OASystem.Infrastructure.Repositories.Resource
|
|
namespace OASystem.Infrastructure.Repositories.Resource
|
|
@@ -48,6 +50,8 @@ WHERE
|
|
if (portType == 1 || portType == 2 || portType == 3)
|
|
if (portType == 1 || portType == 2 || portType == 3)
|
|
{
|
|
{
|
|
var info = await _sqlSugar.SqlQueryable<HotelDataInfoView>(sql).FirstAsync();
|
|
var info = await _sqlSugar.SqlQueryable<HotelDataInfoView>(sql).FirstAsync();
|
|
|
|
+
|
|
|
|
+ EncryptionProcessor.DecryptProperties(info);
|
|
if (info != null) return new Result() { Code = 0, Msg = "操作成功!",Data = info };
|
|
if (info != null) return new Result() { Code = 0, Msg = "操作成功!",Data = info };
|
|
return new Result() { Code = -1, Msg = "暂无数据!" };
|
|
return new Result() { Code = -1, Msg = "暂无数据!" };
|
|
}
|
|
}
|
|
@@ -70,7 +74,9 @@ WHERE
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- Res_HotelData _HotelDataDto = _mapper.Map<Res_HotelData>(dto);
|
|
+ var _HotelDataDto = _mapper.Map<Res_HotelData>(dto);
|
|
|
|
+
|
|
|
|
+ EncryptionProcessor.EncryptProperties(_HotelDataDto);
|
|
int id = await AddAsyncReturnId(_HotelDataDto);
|
|
int id = await AddAsyncReturnId(_HotelDataDto);
|
|
if (id == 0)
|
|
if (id == 0)
|
|
{
|
|
{
|
|
@@ -82,7 +88,7 @@ WHERE
|
|
}
|
|
}
|
|
else if (dto.Status == 2)
|
|
else if (dto.Status == 2)
|
|
{
|
|
{
|
|
- bool res = await UpdateAsync(a => a.Id == dto.Id, a => new Res_HotelData
|
|
+ var updateInfo = new Res_HotelData
|
|
{
|
|
{
|
|
City = dto.City,
|
|
City = dto.City,
|
|
Name = dto.Name,
|
|
Name = dto.Name,
|
|
@@ -94,7 +100,9 @@ WHERE
|
|
ContactPhone = dto.ContactPhone,
|
|
ContactPhone = dto.ContactPhone,
|
|
OtherInformation = dto.OtherInformation,
|
|
OtherInformation = dto.OtherInformation,
|
|
Remark = dto.Remark,
|
|
Remark = dto.Remark,
|
|
- });
|
|
+ };
|
|
|
|
+ EncryptionProcessor.EncryptProperties(updateInfo);
|
|
|
|
+ bool res = await UpdateAsync(a => a.Id == dto.Id, a => updateInfo);
|
|
if (!res)
|
|
if (!res)
|
|
{
|
|
{
|
|
return result = new Result() { Code = -1, Msg = "修改失败!" };
|
|
return result = new Result() { Code = -1, Msg = "修改失败!" };
|
|
@@ -106,8 +114,5 @@ WHERE
|
|
return result = new Result() { Code = -1, Msg = "请传入Status参数,1添加 2修改!" };
|
|
return result = new Result() { Code = -1, Msg = "请传入Status参数,1添加 2修改!" };
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|