spy.go 542 B

123456789101112131415161718192021
  1. package service
  2. import (
  3. "context"
  4. "go-common/app/job/main/figure/model"
  5. spym "go-common/app/service/main/spy/model"
  6. )
  7. // PutSpyScore handle user spy score chenage message
  8. func (s *Service) PutSpyScore(c context.Context, sc *spym.ScoreChange) (err error) {
  9. s.figureDao.PutSpyScore(c, sc.Mid, sc.Score)
  10. if sc.Reason == spym.CoinReason {
  11. if sc.RiskLevel == spym.CoinHighRisk {
  12. s.figureDao.PutCoinUnusual(c, sc.Mid, model.ACColumnHighRisk)
  13. } else {
  14. s.figureDao.PutCoinUnusual(c, sc.Mid, model.ACColumnLowRisk)
  15. }
  16. }
  17. return
  18. }