瀏覽代碼

[20250403]本地生活金额

lin-jim-leon 2 周之前
父節點
當前提交
d3737bdfc4
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 2 1
      db/locallife_task.go
  2. 1 0
      model/gorm_model/locallife_info.go

+ 2 - 1
db/locallife_task.go

@@ -388,7 +388,7 @@ func PassLocalTaskCoop(ctx context.Context, req http_model.PasslocalTaskCoopRequ
 					return err
 				}
 				projectinfo.RecruitNum += 1
-				projectinfo.EstimatedCost += taskInfo.SupportFee
+				projectinfo.NeedPay += taskInfo.SupportFee
 				err = tx.Model(gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ? ", req.ProjectId).Updates(projectinfo).Error
 				if err != nil {
 					return err
@@ -445,6 +445,7 @@ func PassLocalTaskCoop(ctx context.Context, req http_model.PasslocalTaskCoopRequ
 					return err
 				}
 				projectinfo.RecruitNum += 1
+				projectinfo.NeedPay += taskInfo.SupportFee
 				err = tx.Model(gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ? ", req.ProjectId).Updates(projectinfo).Error
 				if err != nil {
 					return err

+ 1 - 0
model/gorm_model/locallife_info.go

@@ -47,6 +47,7 @@ type YounggeeLocalLifeInfo struct {
 	NeedQuality         int        `gorm:"column:need_quality;type:int(11);default:0;comment:待质检;NOT NULL" json:"need_quality"`
 	NeedCalculate       int        `gorm:"column:need_calculate;type:int(11);default:0;comment:待结算;NOT NULL" json:"need_calculate"`
 	InvoiceStatus       int        `gorm:"column:invoice_status;type:int(11);default:0;comment:开票状态(1开票中 2已开票);NOT NULL" json:"invoice_status"`
+	NeedPay             float64    `gorm:"column:need_pay"`
 }
 
 func (m *YounggeeLocalLifeInfo) TableName() string {