TaskHistory.go 378 B

123456789101112131415
  1. package dao
  2. import (
  3. "gorm.io/gorm"
  4. )
  5. // TaskHistory TaskHistory
  6. type TaskHistory struct {
  7. Task
  8. }
  9. // CopyTaskToHistoryByProInstID 根据procInstID查询结果,并将结果复制到task_history表
  10. func CopyTaskToHistoryByProInstID(procInstID int, tx *gorm.DB) error {
  11. return tx.Exec("insert into task_history select * from task where proc_inst_id=?", procInstID).Error
  12. }