up_base_info.go 744 B

123456789101112131415161718192021
  1. package upcrm
  2. import "go-common/app/job/main/up/model/upcrmmodel"
  3. //QueryUpBaseInfo query db
  4. func (d *Dao) QueryUpBaseInfo(mid int64, fields string) (result upcrmmodel.UpBaseInfo, err error) {
  5. err = d.crmdb.Select(fields).Where("mid=?", mid).Find(&result).Error
  6. return
  7. }
  8. //QueryUpBaseInfoBatchByMid query db
  9. func (d *Dao) QueryUpBaseInfoBatchByMid(fields string, mid ...int64) (result []upcrmmodel.UpBaseInfo, err error) {
  10. err = d.crmdb.Select(fields).Where("mid in(?)", mid).Find(&result).Error
  11. return
  12. }
  13. //QueryUpBaseInfoBatchByID query db
  14. func (d *Dao) QueryUpBaseInfoBatchByID(fields string, id ...int64) (result []upcrmmodel.UpBaseInfo, err error) {
  15. err = d.crmdb.Select(fields).Where("id in(?)", id).Find(&result).Error
  16. return
  17. }