|
|
|
@ -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)
|
|
|
|
|
{
|
|
|
|
|