You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
542 B
21 lines
542 B
package service |
|
|
|
import ( |
|
"context" |
|
|
|
"go-common/app/job/main/figure/model" |
|
spym "go-common/app/service/main/spy/model" |
|
) |
|
|
|
// PutSpyScore handle user spy score chenage message |
|
func (s *Service) PutSpyScore(c context.Context, sc *spym.ScoreChange) (err error) { |
|
s.figureDao.PutSpyScore(c, sc.Mid, sc.Score) |
|
if sc.Reason == spym.CoinReason { |
|
if sc.RiskLevel == spym.CoinHighRisk { |
|
s.figureDao.PutCoinUnusual(c, sc.Mid, model.ACColumnHighRisk) |
|
} else { |
|
s.figureDao.PutCoinUnusual(c, sc.Mid, model.ACColumnLowRisk) |
|
} |
|
} |
|
return |
|
}
|
|
|