Explorar el Código

[20250725]达人库

lin-jim-leon hace 1 semana
padre
commit
1d00d18a3b
Se han modificado 1 ficheros con 7 adiciones y 7 borrados
  1. 7 7
      app/dao/sec_task_info_dao.go

+ 7 - 7
app/dao/sec_task_info_dao.go

@@ -62,8 +62,8 @@ func (s SelectionTaskInfoDao) GetSecInfoByOpenId(talentid string, others string,
 
 	// 正确JOIN younggee_selection_info表
 	query := Db.Model(&entity.SelectionTaskInfo{}).
-		Joins("JOIN younggee_selection_info ysi ON ysi.selection_id = selection_task_info.selection_id").
-		Where("selection_task_info.talent_id = ? AND selection_task_info.task_stage = ? ", talentid, 10)
+		Joins("JOIN younggee_selection_info ysi ON ysi.selection_id = younggee_sec_task_info.selection_id").
+		Where("younggee_sec_task_info.talent_id = ? AND younggee_sec_task_info.task_stage = ? ", talentid, 10)
 
 	// 搜索条件(针对selection_name)
 	if others != "" {
@@ -82,9 +82,9 @@ func (s SelectionTaskInfoDao) GetSecInfoByOpenId(talentid string, others string,
 			switch sortfield {
 			case "sale_actual":
 				if sortorder == "asc" {
-					query = query.Order("selection_task_info.sale_actual asc")
+					query = query.Order("younggee_sec_task_info.sale_actual asc")
 				} else {
-					query = query.Order("selection_task_info.sale_actual desc")
+					query = query.Order("younggee_sec_task_info.sale_actual desc")
 				}
 			}
 		}
@@ -97,10 +97,10 @@ func (s SelectionTaskInfoDao) GetSecInfoByOpenId(talentid string, others string,
 
 	// 选择字段(明确指定表名)
 	query = query.Select(`
-        selection_task_info.selection_id, 
-        selection_task_info.task_id, 
+        younggee_sec_task_info.selection_id, 
+        younggee_sec_task_info.task_id, 
         ysi.selection_name, 
-        selection_task_info.sale_actual
+        younggee_sec_task_info.sale_actual
     `)
 
 	// 分页查询