aso.go 726 B

12345678910111213141516171819202122232425262728293031
  1. package service
  2. import (
  3. "context"
  4. "go-common/app/job/main/passport-encrypt/model"
  5. )
  6. func (s *Service) saveEncryptAccount(c context.Context, account *model.EncryptAccount) (err error) {
  7. var affect int64
  8. if affect, err = s.d.AddAsoAccount(c, account); err != nil || affect == 0 {
  9. return
  10. }
  11. return
  12. }
  13. func (s *Service) updateEncryptAccount(c context.Context, account *model.EncryptAccount) (err error) {
  14. var affect int64
  15. if affect, err = s.d.UpdateAsoAccount(c, account); err != nil || affect == 0 {
  16. return
  17. }
  18. return
  19. }
  20. func (s *Service) delEncryptAccount(c context.Context, mid int64) (err error) {
  21. var affect int64
  22. if affect, err = s.d.DelAsoAccount(c, mid); err != nil || affect == 0 {
  23. return
  24. }
  25. return
  26. }