统计时创建系统、浏览器信息时加锁

This commit is contained in:
GoEdgeLab
2021-06-27 15:17:18 +08:00
parent a1185ded26
commit 535c723e61
3 changed files with 42 additions and 14 deletions

View File

@@ -1303,7 +1303,6 @@ func (this *ServerService) UploadServerHTTPRequestStat(ctx context.Context, req
return err
}
if systemId == 0 {
// TODO 失败时,需要查询一次确认是否已添加
systemId, err = models.SharedClientSystemDAO.CreateSystem(tx, result.Name)
if err != nil {
return err
@@ -1332,7 +1331,6 @@ func (this *ServerService) UploadServerHTTPRequestStat(ctx context.Context, req
return err
}
if browserId == 0 {
// TODO 失败时,需要查询一次确认是否已添加
browserId, err = models.SharedClientBrowserDAO.CreateBrowser(tx, result.Name)
if err != nil {
return err