Compare commits
3 Commits
b24e96e6e9
...
11f3b2b439
| Author | SHA1 | Date |
|---|---|---|
|
|
11f3b2b439 | |
|
|
595496fd16 | |
|
|
cf384fc380 |
|
|
@ -311,7 +311,28 @@ namespace OpenAuth.App.ServiceApp.Algo
|
||||||
|
|
||||||
Console.WriteLine("已保存图片: " + savePath);
|
Console.WriteLine("已保存图片: " + savePath);
|
||||||
}
|
}
|
||||||
|
public async Task<Response<bool>> UpdateState(string id)
|
||||||
|
{
|
||||||
|
using (var db = UnitWork.CreateContext())
|
||||||
|
{
|
||||||
|
await db.Lasa_ChangeDetection.UpdateAsync(u => new Lasa_ChangeDetection
|
||||||
|
{
|
||||||
|
IsFinish = true
|
||||||
|
}, u => u.Id == id);
|
||||||
|
if (db.Commit())
|
||||||
|
return new Response<bool>
|
||||||
|
{
|
||||||
|
Result = true,
|
||||||
|
Message = "检测完成"
|
||||||
|
};
|
||||||
|
else
|
||||||
|
return new Response<bool>
|
||||||
|
{
|
||||||
|
Result = false,
|
||||||
|
Message = "检测完成"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,5 +27,6 @@ namespace OpenAuth.Repository.Domain
|
||||||
public DateTime? CreateTime { get; set; }
|
public DateTime? CreateTime { get; set; }
|
||||||
public long CreateId { get; set; }
|
public long CreateId { get; set; }
|
||||||
public string AiAchievementId { get; set; }
|
public string AiAchievementId { get; set; }
|
||||||
|
public bool IsFinish { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -223,6 +223,7 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="firstId"></param>
|
/// <param name="firstId"></param>
|
||||||
/// <param name="secondId"></param>
|
/// <param name="secondId"></param>
|
||||||
|
/// <param name="cdId"></param>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public async Task<Response<string>> BehaviorAlarm(string firstId, string secondId, string cdId)
|
public async Task<Response<string>> BehaviorAlarm(string firstId, string secondId, string cdId)
|
||||||
|
|
@ -233,6 +234,7 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
|
||||||
{
|
{
|
||||||
await mq.SendAsync("event.capturePic.1.sdhc04", JsonConvert.SerializeObject(data));
|
await mq.SendAsync("event.capturePic.1.sdhc04", JsonConvert.SerializeObject(data));
|
||||||
}
|
}
|
||||||
|
await _app.UpdateState(cdId);
|
||||||
return new Response<string>()
|
return new Response<string>()
|
||||||
{
|
{
|
||||||
Code = 200,
|
Code = 200,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue