1234567891011121314151617181920212223 |
- package dao
- import (
- "gorm.io/gorm"
- "server/global"
- )
- // IdentitylinkHistory IdentitylinkHistory
- type IdentitylinkHistory struct {
- Identitylink
- }
- // CopyIdentitylinkToHistoryByProcInstID CopyIdentitylinkToHistoryByProcInstID
- func CopyIdentitylinkToHistoryByProcInstID(procInstID int, tx *gorm.DB) error {
- return tx.Exec("insert into identitylink_history select * from identitylink where proc_inst_id=?", procInstID).Error
- }
- // FindParticipantHistoryByProcInstID FindParticipantHistoryByProcInstID
- func FindParticipantHistoryByProcInstID(procInstID int) ([]*IdentitylinkHistory, error) {
- var datas []*IdentitylinkHistory
- err := global.GVA_DB.Select("id,user_id,step,comment").Where("proc_inst_id=? and type=?", procInstID, IdentityTypes[PARTICIPANT]).Order("id asc").Find(&datas).Error
- return datas, err
- }
|