update.go 605 B

1234567891011121314151617
  1. package company_approval_message
  2. import "hongze/hongze_yb/global"
  3. // Update 更新对应字段数据
  4. /*func (yc *YbComment) Update(updateCols []string) (err error) {
  5. err = global.DEFAULT_MYSQL.Model(yc).Select(updateCols).Updates(*yc).Error
  6. return
  7. }*/
  8. // Cancel 消息作废
  9. func Cancel(companyApprovalId int, sourceType int8) (err error) {
  10. sql1 := ` UPDATE company_approval_message SET message_status=2,modify_time=NOW()
  11. WHERE company_approval_id=? AND source_type=? AND message_type=1 AND operation_status=1`
  12. err = global.DEFAULT_MYSQL.Exec(sql1, companyApprovalId, sourceType).Error
  13. return
  14. }