pull/1/head
潘建东 8 months ago
parent adb4903496
commit 7d4acd61c0

@ -21,6 +21,17 @@ namespace ZKLT.Hadoop.API.Controllers
private IHadoopService _HadoopService;
[HttpGet("getid")]
public ActionResult GetId([FromQuery] string? prefix) {
string _result = "";
if (!string.IsNullOrEmpty(prefix)) {
_result += prefix;
}
var _date = DateTime.Now;
_result += $@"{_date.Year.ToString().PadLeft(4,'0')}{_date.Month.ToString().PadLeft(2, '0')}{_date.Day.ToString().PadLeft(2, '0')}{_date.Hour.ToString().PadLeft(2, '0')}{_date.Minute.ToString().PadLeft(2, '0')}{_date.Second.ToString().PadLeft(2, '0')}{_date.Millisecond.ToString().PadLeft(3, '0')}{new Random().Next(1000).ToString().PadLeft(4,'0')}";
return Ok(_result);
}
[HttpGet("getsource")]
public ActionResult GetSource([FromQuery] string sourceid)
{

Loading…
Cancel
Save