Merge branch 'feat-hjj-Competitors#A203' into dev

This commit is contained in:
cjy 2026-01-21 10:11:45 +08:00
commit 26044470f0
4 changed files with 18 additions and 14 deletions

View File

@ -4,6 +4,7 @@ import (
"context" "context"
"fmt" "fmt"
"micro-bundle/internal/dao" "micro-bundle/internal/dao"
"micro-bundle/internal/dto"
"micro-bundle/internal/logic" "micro-bundle/internal/logic"
"micro-bundle/internal/model" "micro-bundle/internal/model"
"micro-bundle/pb/bundle" "micro-bundle/pb/bundle"
@ -323,7 +324,7 @@ func (b *BundleProvider) GetArtistUploadStatsList(_ context.Context, req *bundle
if sortBy, ok := model.OrderByDataAnalysis[req.SortBy]; ok { if sortBy, ok := model.OrderByDataAnalysis[req.SortBy]; ok {
req.SortBy = sortBy req.SortBy = sortBy
} }
daoReq := &dao.TaskQueryRequest{ daoReq := &dto.TaskQueryRequest{
Keyword: req.Keyword, Keyword: req.Keyword,
Page: int(req.Page), Page: int(req.Page),
PageSize: int(req.PageSize), PageSize: int(req.PageSize),

View File

@ -3,6 +3,7 @@ package dao
import ( import (
"fmt" "fmt"
bundleConfig "micro-bundle/config" bundleConfig "micro-bundle/config"
"micro-bundle/internal/dto"
"micro-bundle/internal/model" "micro-bundle/internal/model"
"micro-bundle/pkg/app" "micro-bundle/pkg/app"
commonErr "micro-bundle/pkg/err" commonErr "micro-bundle/pkg/err"
@ -16,17 +17,6 @@ import (
"gorm.io/gorm/clause" "gorm.io/gorm/clause"
) )
// TaskQueryRequest 查询待指派任务记录请求参数
type TaskQueryRequest struct {
Keyword string `json:"keyword"` // 艺人姓名、编号、手机号搜索关键词
LastTaskAssignee string `json:"lastTaskAssignee"` // 最近一次指派人筛选(模糊匹配)
Page int `json:"page"` // 页码
PageSize int `json:"pageSize"` // 每页数量
SortBy string `json:"sortBy"` // 排序字段(支持白名单字段)
SortType string `json:"sortType"` // 排序类型 asc/desc
SubNums []string `json:"subNums"` // 选中导出的艺人编号集合(可选)
}
// TaskAssignRequest 指派任务请求参数 // TaskAssignRequest 指派任务请求参数
type TaskAssignRequest struct { type TaskAssignRequest struct {
SubNum string `json:"subNum"` // 艺人编号 SubNum string `json:"subNum"` // 艺人编号
@ -264,7 +254,7 @@ type ArtistPendingAssignItem struct {
} }
// GetArtistUploadStatsList 查询所有艺人的上传统计与额度信息(通过 BundleBalance 关联 CastWork/CastWorkAnalysis及 subNum 关联 TaskManagement // GetArtistUploadStatsList 查询所有艺人的上传统计与额度信息(通过 BundleBalance 关联 CastWork/CastWorkAnalysis及 subNum 关联 TaskManagement
func GetArtistUploadStatsList(req *TaskQueryRequest) ([]*ArtistUploadStatsItem, int64, error) { func GetArtistUploadStatsList(req *dto.TaskQueryRequest) ([]*ArtistUploadStatsItem, int64, error) {
taskSchema := bundleConfig.Data.TaskBenchDB.DbName taskSchema := bundleConfig.Data.TaskBenchDB.DbName
nowMonth := time.Now().Format("2006-01") nowMonth := time.Now().Format("2006-01")

12
internal/dto/task.go Normal file
View File

@ -0,0 +1,12 @@
package dto
// TaskQueryRequest 查询待指派任务记录请求参数
type TaskQueryRequest struct {
Keyword string `json:"keyword"` // 艺人姓名、编号、手机号搜索关键词
LastTaskAssignee string `json:"lastTaskAssignee"` // 最近一次指派人筛选(模糊匹配)
Page int `json:"page"` // 页码
PageSize int `json:"pageSize"` // 每页数量
SortBy string `json:"sortBy"` // 排序字段(支持白名单字段)
SortType string `json:"sortType"` // 排序类型 asc/desc
SubNums []string `json:"subNums"` // 选中导出的艺人编号集合(可选)
}

View File

@ -3,6 +3,7 @@ package logic
import ( import (
"encoding/json" "encoding/json"
"micro-bundle/internal/dao" "micro-bundle/internal/dao"
"micro-bundle/internal/dto"
"micro-bundle/pb/bundle" "micro-bundle/pb/bundle"
commonErr "micro-bundle/pkg/err" commonErr "micro-bundle/pkg/err"
"strings" "strings"
@ -60,7 +61,7 @@ func ValidateEmployee(employeeNum string) (bool, error) {
} }
// GetArtistUploadStatsList 查询艺人上传与额度统计列表 // GetArtistUploadStatsList 查询艺人上传与额度统计列表
func GetArtistUploadStatsList(req *dao.TaskQueryRequest) ([]*dao.ArtistUploadStatsItem, int64, error) { func GetArtistUploadStatsList(req *dto.TaskQueryRequest) ([]*dao.ArtistUploadStatsItem, int64, error) {
return dao.GetArtistUploadStatsList(req) return dao.GetArtistUploadStatsList(req)
} }