Compare commits
No commits in common. "cde3a059e399e480101cd897704cc9e073bd9be2" and "89f6a549ada640e0761e0d0e91d1b50dd652cf7f" have entirely different histories.
cde3a059e3
...
89f6a549ad
@ -1686,19 +1686,21 @@ func CreateMissingTaskManagementRecords(validArtist []ValidArtistInfo) error {
|
||||
pendingDataCount = 0
|
||||
}
|
||||
|
||||
// 为所有有效艺人创建记录,确保additionalResults不会重复出现
|
||||
newRecord := model.TaskManagement{
|
||||
SubNum: artist.CustomerNum,
|
||||
TelNum: artist.UserPhoneNumber,
|
||||
ArtistName: artist.UserName,
|
||||
LastTaskAssignee: "",
|
||||
TaskAssigneeNum: "",
|
||||
ProgressCount: 0,
|
||||
CompleteCount: 0,
|
||||
CreatedAt: time.Now(),
|
||||
UpdatedAt: time.Now(),
|
||||
// 只有当至少有一种类型的待发任务数量大于0时才创建记录
|
||||
if pendingVideoCount > 0 || pendingPostCount > 0 || pendingDataCount > 0 {
|
||||
newRecord := model.TaskManagement{
|
||||
SubNum: artist.CustomerNum,
|
||||
TelNum: artist.UserPhoneNumber,
|
||||
ArtistName: artist.UserName,
|
||||
LastTaskAssignee: "",
|
||||
TaskAssigneeNum: "",
|
||||
ProgressCount: 0,
|
||||
CompleteCount: 0,
|
||||
CreatedAt: time.Now(),
|
||||
UpdatedAt: time.Now(),
|
||||
}
|
||||
recordsToCreate = append(recordsToCreate, newRecord)
|
||||
}
|
||||
recordsToCreate = append(recordsToCreate, newRecord)
|
||||
}
|
||||
|
||||
// 批量创建记录
|
||||
|
||||
Loading…
Reference in New Issue
Block a user