package company_approval_message

import "hongze/hongze_yb/global"

// Update 更新对应字段数据
/*func (yc *YbComment) Update(updateCols []string) (err error) {
	err = global.DEFAULT_MYSQL.Model(yc).Select(updateCols).Updates(*yc).Error
	return
}*/

// Cancel 消息作废
func Cancel(companyApprovalId int, sourceType int8) (err error) {
	sql1 := ` UPDATE company_approval_message SET message_status=2,modify_time=NOW() 
WHERE company_approval_id=? AND source_type=?  AND message_type=1 AND operation_status=1`
	err = global.DEFAULT_MYSQL.Exec(sql1, companyApprovalId, sourceType).Error
	return
}
