Browse Source

更新专项及全流程批量处理

yuliang1112 2 years ago
parent
commit
7740d041c7
2 changed files with 2 additions and 2 deletions
  1. 1 1
      db/number_info.go
  2. 1 1
      db/task.go

+ 1 - 1
db/number_info.go

@@ -219,7 +219,7 @@ func GetFinishNumberInfo(ctx context.Context, projectId int64, strategyIds []int
 
 func GetSpecialInviteNumber(ctx context.Context, projectId int64) (*http_model.GetSpecialInviteNumberData, error) {
 	var specialInviteNumberData http_model.GetSpecialInviteNumberData
-	db := GetReadDB(ctx).Model(gorm_model.YoungeeTaskInfo{}).Where("project_id = ?", projectId)
+	db := GetReadDB(ctx).Model(gorm_model.YoungeeTaskInfo{}).Where("project_id = ? AND task_stage != 3", projectId)
 	err := db.Where("task_status <> 2").Count(&specialInviteNumberData.UnpassNumber).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)

+ 1 - 1
db/task.go

@@ -203,7 +203,7 @@ func SetTaskFinish(ctx context.Context, TaskIDs []int) error {
 func GetSpecialTaskInviteList(ctx context.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.SpecialTaskInviteInfo, int64, error) {
 	db := GetReadDB(ctx)
 	// 查询task表信息
-	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{})
+	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_stage != 3")
 	// 根据Project条件过滤
 	conditionType := reflect.TypeOf(conditions).Elem()
 	conditionValue := reflect.ValueOf(conditions).Elem()