Bladeren bron

update

master
shenjiachi 6 dagen geleden
bovenliggende
commit
212e906d84
5 gewijzigde bestanden met toevoegingen van 35 en 1 verwijderingen
  1. +4
    -0
      src/dao/egg_energy_user_activity_dao.go
  2. +1
    -0
      src/dao/egg_sign_in_dao.go
  3. +21
    -0
      src/implement/egg_energy_user_activity_implement.go
  4. +8
    -0
      src/implement/egg_sign_in_implement.go
  5. +1
    -1
      src/model/platform_total_data.go

+ 4
- 0
src/dao/egg_energy_user_activity_dao.go Bestand weergeven

@@ -1,5 +1,9 @@
package dao

import "code.fnuoos.com/EggPlanet/egg_models.git/src/model"

type EggEnergyUserActivityDao interface {
//TODO:: You can add specific method definitions here
EggEnergyUserActivityGetOneByTimeAndUserID(userID int64, date string) (*model.EggEnergyUserActivity, error)
EggEnergyUserActivityInsert(m *model.EggEnergyUserActivity) (int64, error)
}

+ 1
- 0
src/dao/egg_sign_in_dao.go Bestand weergeven

@@ -8,4 +8,5 @@ type EggSignInDao interface {
EggSignInFindByParams(params map[string]interface{}) ([]*model.EggSignIn, error)
EggSignINGetOneByTimeAndUid(startAt, endAt string, uid int64, isCompleted int) (bool, *model.EggSignIn, error)
EggSignInFindByTimeAndParams(startAt, endAt string, isCompleted int, params map[string]interface{}) ([]*model.EggSignIn, error)
EggSignInInsert(m *model.EggSignIn) (int64, error)
}

+ 21
- 0
src/implement/egg_energy_user_activity_implement.go Bestand weergeven

@@ -2,6 +2,7 @@

import (
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao"
"code.fnuoos.com/EggPlanet/egg_models.git/src/model"
"xorm.io/xorm"
)

@@ -12,3 +13,23 @@ func NewEggEnergyUserActivityDb(engine *xorm.Engine) dao.EggEnergyUserActivityDa
type EggEnergyUserActivityDb struct {
Db *xorm.Engine
}

func (e EggEnergyUserActivityDb) EggEnergyUserActivityGetOneByTimeAndUserID(userID int64, date string) (*model.EggEnergyUserActivity, error) {
var m model.EggEnergyUserActivity
has, err := e.Db.Where("uid = ?", userID).And("date = ?", date).Get(&m)
if err != nil {
return nil, err
}
if !has {
return nil, nil
}
return &m, nil
}

func (e EggEnergyUserActivityDb) EggEnergyUserActivityInsert(m *model.EggEnergyUserActivity) (int64, error) {
_, err := e.Db.InsertOne(m)
if err != nil {
return 0, err
}
return m.Id, nil
}

+ 8
- 0
src/implement/egg_sign_in_implement.go Bestand weergeven

@@ -87,3 +87,11 @@ func (e EggSignInDb) EggSignInFindByTimeAndParams(startAt, endAt string, isCompl
}
return m, nil
}

func (e EggSignInDb) EggSignInInsert(m *model.EggSignIn) (int64, error) {
_, err := e.Db.InsertOne(m)
if err != nil {
return 0, err
}
return m.Id, nil
}

+ 1
- 1
src/model/platform_total_data.go Bestand weergeven

@@ -4,7 +4,7 @@ type PlatformTotalData struct {
Id int64 `json:"id" xorm:"pk autoincr BIGINT(20)"`
TotalUserCount int `json:"total_user_count" xorm:"not null comment('平台总用户数') INT(11)"`
VerifiedUserCount int `json:"verified_user_count" xorm:"not null comment('已认证用户数') INT(11)"`
NoSiginInUserCount int `json:"no_sigin_in_user_count" xorm:"not null comment('未签到用户数') INT(11)"`
NoSignInUserCount int `json:"no_sign_in_user_count" xorm:"not null comment('未签到用户数') INT(11)"`
TotalWithdrawAmount string `json:"total_withdraw_amount" xorm:"not null comment('已提现累计金额') DECIMAL(10,2)"`
Year string `json:"year" xorm:"not null comment('年份') CHAR(50)"`
Month string `json:"month" xorm:"not null comment('月份') CHAR(50)"`


Laden…
Annuleren
Opslaan