|
@@ -135,11 +135,11 @@ namespace TEAMModelBI.Controllers.BICommon
|
|
|
jsonElement.TryGetProperty("schoolIds", out JsonElement _schoolIds);
|
|
|
jsonElement.TryGetProperty("areaIds", out JsonElement _areaIds);
|
|
|
if (!jsonElement.TryGetProperty("crowdType", out JsonElement _crowdType)) return BadRequest();
|
|
|
- jsonElement.TryGetProperty("sendTime", out JsonElement sendTime);
|
|
|
+ if(!jsonElement.TryGetProperty("sendTime", out JsonElement sendTime)) return BadRequest();
|
|
|
jsonElement.TryGetProperty("source", out JsonElement source);
|
|
|
|
|
|
var cosmosClient = _azureCosmos.GetCosmosClient();
|
|
|
- DateTimeOffset dateTime = DateTimeOffset.UtcNow;
|
|
|
+ //DateTimeOffset dateTime = DateTimeOffset.UtcNow;
|
|
|
|
|
|
List<IdNameCode> idNameCodes = new();
|
|
|
BINotice bINotice = new();
|
|
@@ -147,8 +147,8 @@ namespace TEAMModelBI.Controllers.BICommon
|
|
|
List<string> schoolIds = new();
|
|
|
List<string> areaIds = new();
|
|
|
|
|
|
- if (!string.IsNullOrEmpty($"{sendTime}"))
|
|
|
- dateTime = DateTimeOffset.Parse($"{sendTime}");
|
|
|
+ //if (!string.IsNullOrEmpty($"{sendTime}"))
|
|
|
+ // dateTime = DateTimeOffset.Parse($"{sendTime}");
|
|
|
if (string.IsNullOrEmpty($"{_tmdIds}") && string.IsNullOrEmpty($"{_schoolIds}") && string.IsNullOrEmpty($"{_areaIds}"))
|
|
|
return Ok(new { state = RespondCode.ParamsError, msg = "发送人群不能为空" });
|
|
|
if (!string.IsNullOrEmpty($"{_tmdIds}"))
|
|
@@ -223,7 +223,7 @@ namespace TEAMModelBI.Controllers.BICommon
|
|
|
crowd = crowd,
|
|
|
crowdIds = tmdIds,
|
|
|
createId = _tmdId,
|
|
|
- sendTime = dateTime.ToUnixTimeMilliseconds(),//发布时间待解决
|
|
|
+ sendTime = sendTime.GetInt64(),//发布时间待解决
|
|
|
createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
|
|
|
source = !string.IsNullOrEmpty($"{source}") ? $"{source}" : "BI"
|
|
|
};
|