Add 测试中间服务API
This commit is contained in:
parent
9a9a41e9fa
commit
b484f81694
|
@ -3,13 +3,18 @@
|
|||
*如果接口需要做Action的权限验证,请在Action上使用属性
|
||||
*如: [ApiActionPermission("HR_EmployeeSync",Enums.ActionPermissionOptions.Search)]
|
||||
*/
|
||||
using Azure.Core;
|
||||
using Confluent.Kafka;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
//using Quartz.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.Filters;
|
||||
using VOL.Core.Services;
|
||||
using VOL.DingTalk.Models.Biz;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.HR.IServices;
|
||||
|
@ -91,5 +96,62 @@ namespace VOL.HR.Controllers
|
|||
var result = await Service.SyncYSEmpToDingTalk(ysEmpId);
|
||||
return Json(new { success=result });
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("/iuap-api-gateway/yonbip/digitalModel/product/integration/querylist"), AllowAnonymous]
|
||||
public async Task<IActionResult> ErpApiTest( object obj)
|
||||
{
|
||||
Logger.Info(obj.ToString());
|
||||
//var result = await Service.SyncYSEmpToDingTalk(ysEmpId);
|
||||
return Json(new { message = "",code = 200 ,data=new { recordList = new List<Dictionary<string,object>>() } });
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("/iuap-api-auth/open-auth/selfAppAuth/getAccessToken"), AllowAnonymous]
|
||||
public async Task<IActionResult> ErpApiTestgetAccessToken( string appKey, string timestamp,string signature)
|
||||
{
|
||||
//Logger.Info(obj.ToString());
|
||||
//var result = await Service.SyncYSEmpToDingTalk(ysEmpId);
|
||||
return Json(new { message = "00000",
|
||||
code = "00000",
|
||||
data=new {
|
||||
access_token = "1111111111312",
|
||||
expire = 60 * 60,
|
||||
timeOutMills = DateTime.Now.AddSeconds(60*60).Microsecond } });
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("/iuap-api-gateway/yonbip/digitalModel/product/batchsave"), AllowAnonymous]
|
||||
public async Task<IActionResult> ErpApiTestbatchsave(string access_token,[FromBody] object body)
|
||||
{
|
||||
//string body;
|
||||
//using (var reader = new System.IO.StreamReader(Request.Body))
|
||||
//{
|
||||
// body = await reader.ReadToEndAsync();
|
||||
//}
|
||||
Logger.Info($"access_token:{access_token}");
|
||||
Logger.Info($"body:{body}");
|
||||
|
||||
//Logger.Info(obj.ToString());
|
||||
//var result = await Service.SyncYSEmpToDingTalk(ysEmpId);
|
||||
return Json(new
|
||||
{
|
||||
message = "",
|
||||
code = 200,
|
||||
data = new
|
||||
{
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue