Skip to content

Commit

Permalink
feat:编译加速运营数据统计 #156
Browse files Browse the repository at this point in the history
  • Loading branch information
eazence committed Dec 26, 2023
1 parent d0592c1 commit 6ecbaee
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class TBSDaySummaryJob @Autowired constructor(
val notInProjectMapKeySet = projectIdSet.subtract(projectVOMap.keys)

// 获取项目信息清单
val projectVOList = this.getProjectVOListByProjectIds(notInProjectMapKeySet.toList())
val projectVOList = this.getProjectVOListByProjectIds(projectIds = notInProjectMapKeySet.toList())
if (projectVOList.isNotEmpty()) {
projectVOMap.putAll(projectVOList.associateBy { it.englishName })
}
Expand All @@ -107,6 +107,8 @@ class TBSDaySummaryJob @Autowired constructor(
it.bgId = projectVOMap[it.projectId]?.bgId?.toInt()
it.deptName = projectVOMap[it.projectId]?.deptName
it.deptId = projectVOMap[it.projectId]?.deptId?.toInt()
it.centerName = projectVOMap[it.projectId]?.centerName
it.centerId = projectVOMap[it.projectId]?.centerId?.toInt()
it.productId = projectVOMap[it.projectId]?.productId
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ object TBSSdkApi {
)
url = url.trimEnd('&')
}
logger.info(">>>request url: $url")
val request = when (method) {
HttpMethod.GET.name -> {
buildGet(url, headers)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.tencent.devops.turbo.model

import org.springframework.data.annotation.Id
import org.springframework.data.mongodb.core.index.Indexed
import org.springframework.data.mongodb.core.mapping.Document
import org.springframework.data.mongodb.core.mapping.Field
import java.time.LocalDateTime
Expand All @@ -16,6 +17,7 @@ data class TTbsDaySummaryEntity(
* 统计数据归属日期
*/
@Field
@Indexed(background = true)
var day: String?,

/**
Expand Down Expand Up @@ -101,6 +103,14 @@ data class TTbsDaySummaryEntity(
@Field("dept_id")
var deptId: Int? = null,

/**
* 中心信息
*/
@Field("center_name")
var centerName: String? = null,
@Field("center_id")
var centerId: Int? = null,

/**
* 项目所属组织架构
*/
Expand Down

0 comments on commit 6ecbaee

Please sign in to comment.