scrm-go

illness_service.go 733B

1234567891011121314151617181920212223
  1. package member_service
  2. import (
  3. "SCRM/models"
  4. "SCRM/service"
  5. )
  6. func GetIllnessList() (ills []*models.Illness, err error) {
  7. err = service.UserReadDB().Where("status=1").Find(&ills).Error
  8. return
  9. }
  10. func GetMemberAllIllnessByIllIDs(orgID, customerID int64, ids []int64) (ills []*CustomerIllness, err error) {
  11. err = service.UserReadDB().Where("user_org_id = ? and customer_id =? and illness_id IN (?) ", orgID, customerID, ids).Find(&ills).Error
  12. return
  13. }
  14. //GetMemberAllIllness 取所有(包括已经软删除的记录)
  15. func GetMemberAllIllness(orgID, customerID int64) (ills []*CustomerIllness, err error) {
  16. err = service.UserReadDB().Where("user_org_id = ? and customer_id =? ", orgID, customerID).Find(&ills).Error
  17. return
  18. }