jiangshuai
2023-10-23 0551df1d2a65876b2427df112e37625f128b67e4
models/operation.go
@@ -111,6 +111,10 @@
   slf.Status = status
   return slf
}
func (slf *OperationSearch) SetBaseOperationType(baseOperationType constvar.BaseOperationType) *OperationSearch {
   slf.BaseOperationType = baseOperationType
   return slf
}
func (slf *OperationSearch) build() *gorm.DB {
   var db = slf.Orm.Model(&Operation{})
@@ -154,6 +158,10 @@
      db = db.Where("status = ?", slf.Status)
   }
   if int(slf.BaseOperationType) != 0 {
      db = db.Where("base_operation_type=?", slf.BaseOperationType)
   }
   return db
}