This commit is contained in:
2021-07-06 15:16:17 +08:00
parent 957d206c2b
commit 7f785d6423
13 changed files with 240 additions and 102 deletions
@@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using BLL;
using WebAPI.Filter;
namespace WebAPI.Controllers
{
/// <summary>
///
/// </summary>
public class getController : ApiController
{
/// <summary>
/// 获取凭证
/// </summary>
/// <param name="projectId"></param>
/// <param name="appId"></param>
/// <param name="appSecret"></param>
/// <returns></returns>
[HttpGet]
public object token(string projectId, string appId, string appSecret)
{
return new
{
code = 0,
data = new { token = Const.sysglyId },
tokenExpires = Funs.ConvertDateTimeToInt32(DateTime.Now.AddMonths(1)),
};
}
}
}
@@ -93,7 +93,39 @@ namespace WebAPI.Controllers
}
else
{
responeData.message ="数据为空!";
responeData.message = "数据为空!";
}
}
catch (Exception ex)
{
responeData.code = -1;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region
/// <summary>
/// 保存人员信息
/// </summary>
/// <param name="person">人员信息</param>
/// <returns></returns>
[HttpPost]
public Model.ResponeData person([FromBody] Model.attendanceItem person)
{
var responeData = new Model.ResponeData();
try
{
responeData.code = 0;
if (person != null )
{
responeData.message="success";
}
else
{
responeData.message = "数据为空!";
}
}
catch (Exception ex)