Xingyu Xian 2 месяцев назад
Родитель
Сommit
0e19784ab1
2 измененных файлов с 13 добавлено и 13 удалено
  1. 4 4
      model/http_model/full_s_local_task_bill_list.go
  2. 9 9
      service/s_local_life.go

+ 4 - 4
model/http_model/full_s_local_task_bill_list.go

@@ -1,10 +1,10 @@
 package http_model
 
 type FullSLocalTaskBillListRequest struct {
-	SProjectId int    `json:"s_project_id"` // 种草任务ID
-	TalentId   string `json:"talent_id"`    // 达人ID
-	PageNum    int32  `json:"page_num"`
-	PageSize   int32  `json:"page_size"`
+	SLocalId int    `json:"s_local_id"` // 服务商任务ID
+	TalentId string `json:"talent_id"`  // 达人ID
+	PageNum  int32  `json:"page_num"`
+	PageSize int32  `json:"page_size"`
 }
 
 type FullSLocalTaskBillData struct {

+ 9 - 9
service/s_local_life.go

@@ -463,7 +463,7 @@ func (*sLocalLife) FullSLocalTaskBillList(ctx context.Context, request *http_mod
 	currSLocalTaskBillData.DraftFeeSettle = 0
 
 	// 1. 查找子任务
-	taskList, total, taskListErr := db.GetSLocalTaskList(ctx, request.SProjectId, request.TalentId, request.PageSize, request.PageNum)
+	taskList, total, taskListErr := db.GetSLocalTaskList(ctx, request.SLocalId, request.TalentId, request.PageSize, request.PageNum)
 	if taskListErr != nil {
 		return nil, taskListErr
 	}
@@ -490,15 +490,15 @@ func (*sLocalLife) FullSLocalTaskBillList(ctx context.Context, request *http_mod
 		}
 
 		// 2. 补充任务信息
-		sProjectInfo, sProjectErr := db.GetSProjectDetail(ctx, request.SProjectId)
-		if sProjectErr != nil {
-			return nil, sProjectErr
+		sLocalInfo, sLocalErr := db.GetSLocalLifeDetail(ctx, request.SLocalId)
+		if sLocalErr != nil {
+			return nil, sLocalErr
 		}
-		if sProjectInfo != nil {
-			currSLocalTaskBillData.SettleNum = sProjectInfo.SettleNum
-			currSLocalTaskBillData.ChooseNum = sProjectInfo.ApplyNum
-			currSLocalTaskBillData.ServiceCharge = sProjectInfo.ServiceCharge
-			currSLocalTaskBillData.ServiceChargeSettle = sProjectInfo.ServiceChargeSettle
+		if sLocalInfo != nil {
+			currSLocalTaskBillData.SettleNum = sLocalInfo.SettleNum
+			currSLocalTaskBillData.ChooseNum = sLocalInfo.ApplyNum
+			currSLocalTaskBillData.ServiceCharge = sLocalInfo.ServiceCharge
+			currSLocalTaskBillData.ServiceChargeSettle = sLocalInfo.ServiceChargeSettle
 		}
 	}
 	return currSLocalTaskBillData, nil