This commit is contained in:
yangduo 2024-08-21 10:30:46 +08:00
parent 1f1a09170e
commit 86b5a49953
2 changed files with 2 additions and 2 deletions

View File

@ -134,8 +134,8 @@ func (cta *ContriApi) CECQuery(c *gin.Context) {
} `json:"info"`
}{}
totalgcp, _ := service.Contribution.GetGlobalContribution(false)
mycp, _ := service.Contribution.GetAddressContribution(account, false)
totalgcp, _ := service.Contribution.GetGlobalContribution(false)
rspObj.CP = fmt.Sprintf("%.2f", mycp)
rspObj.Info.MyCP = rspObj.CP
rspObj.Info.GCP = fmt.Sprintf("%.2f", totalgcp)

View File

@ -312,7 +312,7 @@ func (this *contribution) GetGlobalContribution(instant bool) (float64, error) {
func (this *contribution) checkContributionList() {
fmt.Println("checkContributionList start")
for {
if time.Now().UTC().Hour() == 0 {
if time.Now().UTC().Hour() == 0 && time.Now().UTC().Minute() == 0 {
nowseconds := f5.GetApp().GetRealSeconds()
deletelist := []string{}
this.accountContributionlist.Range(func(key string, value *accountContribution) bool {