过滤特殊数据处理
This commit is contained in:
parent
9bf59916a6
commit
bd59b2dc69
@ -126,8 +126,10 @@ func ImportPublish(c *gin.Context) {
|
||||
accountList, err := service.CastProvider.MediaUserList(c, &apiCast.MediaUserListReq{
|
||||
//ArtistUuid: strconv.FormatUint(list.UserList[0].Id, 10),
|
||||
ArtistVal: artist.Name,
|
||||
Page: 1,
|
||||
PageSize: 10,
|
||||
})
|
||||
if err != nil || accountList == nil || len(accountList.Data) == 0 {
|
||||
if err != nil {
|
||||
failedRecords = append(failedRecords, FailedRecord{
|
||||
Name: artist.Name,
|
||||
Msg: fmt.Sprintf("自媒体账号数量获取失败: %s,账号数量:%d", err.Error(), len(accountList.Data)),
|
||||
@ -135,10 +137,22 @@ func ImportPublish(c *gin.Context) {
|
||||
log.Printf(fmt.Sprintf("自媒体账号数量获取失败: %s,账号数量:%d", err.Error(), len(accountList.Data)))
|
||||
continue
|
||||
}
|
||||
if accountList == nil || len(accountList.Data) == 0 {
|
||||
failedRecords = append(failedRecords, FailedRecord{
|
||||
Name: artist.Name,
|
||||
Msg: "自媒体账号数量为0",
|
||||
})
|
||||
log.Printf(fmt.Sprintf("自媒体账号,账号数量:%d", len(accountList.Data)))
|
||||
continue
|
||||
}
|
||||
mediaAccountUuids := []string{}
|
||||
mediaAccountNames := []string{}
|
||||
platformIDs := []apiCast.PlatformIDENUM{}
|
||||
for _, info := range accountList.Data {
|
||||
if info.PlatformID == 2 && ((artist.Id == "31" && info.ArtistName == "荣小松") ||
|
||||
(artist.Id == "72" && info.ArtistName == "韩风霞")) {
|
||||
continue // 跳过
|
||||
}
|
||||
mediaAccountUuids = append(mediaAccountUuids, info.MediaAccountUuid)
|
||||
mediaAccountNames = append(mediaAccountNames, info.PlatformUserName)
|
||||
platformIDs = append(platformIDs, apiCast.PlatformIDENUM(info.PlatformID))
|
||||
|
Loading…
Reference in New Issue
Block a user