Compare commits
3 Commits
e91ff54207
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 9efa1d7db2 | |||
| c8d0a1f717 | |||
| b29975f06d |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -397,3 +397,4 @@ FodyWeavers.xsd
|
||||
# JetBrains Rider
|
||||
*.sln.iml
|
||||
|
||||
/api_v1/Appointment.Api/Appointment.Api/App
|
||||
|
||||
@@ -10,6 +10,13 @@
|
||||
<DocumentationFile>Appointment.Api.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="App\**" />
|
||||
<Content Remove="App\**" />
|
||||
<EmbeddedResource Remove="App\**" />
|
||||
<None Remove="App\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Log4NetCore" Version="1.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Log4Net.AspNetCore" Version="3.1.0" />
|
||||
|
||||
@@ -83,9 +83,9 @@ namespace Appointment.Api.Controllers
|
||||
/// <param name="req"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("Add")]
|
||||
public ApiResult Add(ApptSummaryReq req)
|
||||
public async Task<ApiResult> Add(ApptSummaryReq req)
|
||||
{
|
||||
return _ApptRepo.Add(req);
|
||||
return await _ApptRepo.Add(req);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -94,9 +94,9 @@ namespace Appointment.Api.Controllers
|
||||
/// <param name="req"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("ApptAudit")]
|
||||
public ApiResult ApptAudit(ApptAuditReq req)
|
||||
public async Task<ApiResult> ApptAudit(ApptAuditReq req)
|
||||
{
|
||||
return _ApptRepo.ApptAudit(req);
|
||||
return await _ApptRepo.ApptAudit(req);
|
||||
}
|
||||
|
||||
[HttpPost("CancelAudit")]
|
||||
|
||||
@@ -3,6 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Appointment.IRepository
|
||||
{
|
||||
@@ -46,7 +47,7 @@ namespace Appointment.IRepository
|
||||
/// </summary>
|
||||
/// <param name="req"></param>
|
||||
/// <returns></returns>
|
||||
ApiResult Add(ApptSummaryReq req);
|
||||
Task<ApiResult> Add(ApptSummaryReq req);
|
||||
|
||||
/// <summary>
|
||||
/// 删除主单或详情
|
||||
@@ -60,7 +61,7 @@ namespace Appointment.IRepository
|
||||
/// </summary>
|
||||
/// <param name="req"></param>
|
||||
/// <returns></returns>
|
||||
public ApiResult ApptAudit(ApptAuditReq req);
|
||||
Task<ApiResult> ApptAudit(ApptAuditReq req);
|
||||
|
||||
/// <summary>
|
||||
/// 取消预订
|
||||
|
||||
@@ -282,7 +282,7 @@ namespace Appointment.Repository
|
||||
/// </summary>
|
||||
/// <param name="req"></param>
|
||||
/// <returns></returns>
|
||||
public ApiResult Add(ApptSummaryReq req)
|
||||
public async Task<ApiResult> Add(ApptSummaryReq req)
|
||||
{
|
||||
DateTime now = DateTime.Now;
|
||||
|
||||
@@ -654,7 +654,7 @@ namespace Appointment.Repository
|
||||
Remark = "自动"
|
||||
};
|
||||
InsertReturnId(auditLog);
|
||||
return InAppt(summaryId);
|
||||
return await InAppt(summaryId);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -729,7 +729,7 @@ namespace Appointment.Repository
|
||||
/// </summary>
|
||||
/// <param name="req"></param>
|
||||
/// <returns></returns>
|
||||
public ApiResult ApptAudit(ApptAuditReq req)
|
||||
public async Task<ApiResult> ApptAudit(ApptAuditReq req)
|
||||
{
|
||||
var loginUserRes = BaseRepo.DECLoginInfo(req.AccountDES);
|
||||
if (!loginUserRes.IsSuccess) return ApiResult.Failed(loginUserRes.Msg);
|
||||
@@ -758,7 +758,7 @@ namespace Appointment.Repository
|
||||
}
|
||||
else
|
||||
{
|
||||
return InAppt(req.ApptId);
|
||||
return await InAppt(req.ApptId);
|
||||
}
|
||||
|
||||
|
||||
@@ -1420,7 +1420,7 @@ namespace Appointment.Repository
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
private ApiResult InAppt(int id)
|
||||
private async Task<ApiResult> InAppt(int id)
|
||||
{
|
||||
var appt = GetDataModel(id);
|
||||
if (!appt.IsSuccess) return ApiResult.Failed(appt.Msg);
|
||||
@@ -1431,7 +1431,8 @@ namespace Appointment.Repository
|
||||
|
||||
|
||||
DateTime now = DateTime.Now;
|
||||
var userList = Db.Queryable<UcLogin>().ToList().Replace();
|
||||
var userList =await Db.Queryable<UcLogin>().ToListAsync();
|
||||
userList = userList.Replace();
|
||||
|
||||
var user = userList.Where(t => t.OpId == appt.Info.UserId).FirstOrDefault();
|
||||
if (user == null && user.Locked == "T") return ApiResult.Failed("生成正式预订失败,提交人不存在!");
|
||||
@@ -1709,7 +1710,7 @@ namespace Appointment.Repository
|
||||
});
|
||||
if (!string.IsNullOrEmpty(item.WxServiceId))
|
||||
{
|
||||
SetCopyMsg(item.WxServiceId);
|
||||
_ = SetCopyMsg(item.WxServiceId);
|
||||
}
|
||||
}
|
||||
InsertRange(apptAuditLogs);
|
||||
@@ -1879,10 +1880,11 @@ namespace Appointment.Repository
|
||||
/// 抄送 消息模板
|
||||
/// </summary>
|
||||
/// <param name="wxSericeOpenId">接收人程序openid</param>
|
||||
private void SetCopyMsg(string wxSericeOpenId)
|
||||
private async Task<ApiResult> SetCopyMsg(string wxSericeOpenId)
|
||||
{
|
||||
try
|
||||
{
|
||||
await Task.Delay(1);
|
||||
string AppId = BaseConfig.App(new string[] { "WeChatService", "AppId" });
|
||||
if (AppId == "wx3f193488e04b2ed8")
|
||||
{
|
||||
@@ -1925,6 +1927,8 @@ namespace Appointment.Repository
|
||||
{
|
||||
_logger.Error(ex.ToString());
|
||||
}
|
||||
|
||||
return ApiResult.Success(string.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1662,7 +1662,8 @@ namespace Appointment.Repository
|
||||
|
||||
if (req.ToUserAccounts == null || req.ToUserAccounts.Length <= 0) return ApiResult.Failed("操作失败,未选择抄送人!");
|
||||
|
||||
var userList = await Db.Queryable<UcLogin>().Where(t => t.Locked == "F").In(t => t.OpId, req.ToUserAccounts).ToListAsync().Replace();
|
||||
var userList = await Db.Queryable<UcLogin>().Where(t => t.Locked == "F").In(t => t.OpId, req.ToUserAccounts).ToListAsync();
|
||||
userList = userList.Replace();
|
||||
if (userList.Count != req.ToUserAccounts.Length)
|
||||
{
|
||||
List<string> notUser = new List<string>();
|
||||
@@ -3619,7 +3620,8 @@ namespace Appointment.Repository
|
||||
string AppId = BaseConfig.App(new string[] { "WeChatService", "AppId" });
|
||||
string Hotelid = BaseConfig.App(new string[] { "Hotelid" });
|
||||
string appId = BaseConfig.App(new string[] { "WeChat", "AppId" });// 小程序的appid
|
||||
var userAll = await Db.Queryable<UcLogin>().ToListAsync().Replace();
|
||||
var userAll = await Db.Queryable<UcLogin>().ToListAsync();
|
||||
userAll = userAll.Replace();
|
||||
var userCreate = userAll.Where(t => t.OpId == summary.UserId).FirstOrDefault();
|
||||
if (userCreate == null) return new ApiResult { Code = 500, Msg = "用户信息不存在" };
|
||||
List<string> createUserOpenid = new List<string>() { userCreate.WxServiceId };
|
||||
@@ -4526,7 +4528,7 @@ namespace Appointment.Repository
|
||||
});
|
||||
if (!string.IsNullOrEmpty(item.WxServiceId))
|
||||
{
|
||||
_ = await SetCopyMsg(createUserName, summary.BuyerTitle, item.WxServiceId, true, "");
|
||||
_ = SetCopyMsg(createUserName, summary.BuyerTitle, item.WxServiceId, true, "");
|
||||
}
|
||||
}
|
||||
InsertRange(apptAuditLogs);
|
||||
|
||||
@@ -1 +1,6 @@
|
||||
#oaOAWebApiwebapi
|
||||
|
||||
发布配置:
|
||||
目录框架:netcoreapp3.1
|
||||
部署模式:独立
|
||||
目录运行:win-x86
|
||||
Reference in New Issue
Block a user