dengbiao пре 1 недеља
родитељ
комит
fc839292d7
6 измењених фајлова са 36 додато и 1 уклоњено
  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
    -0
      src/model/cloud_bundle.go
  6. +1
    -1
      src/model/platform_total_data.go

+ 4
- 0
src/dao/egg_energy_user_activity_dao.go Прегледај датотеку

@@ -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 Прегледај датотеку

@@ -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 Прегледај датотеку

@@ -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 Прегледај датотеку

@@ -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
- 0
src/model/cloud_bundle.go Прегледај датотеку

@@ -23,4 +23,5 @@ type CloudBundle struct {
IsAuditing int `json:"is_auditing" xorm:"default 0 INT(1)"`
AlipayAppletAppId string `json:"alipay_applet_app_id" xorm:"not null default '' comment('支付宝小程序appid') CHAR(50)"`
Platform string `json:"platform" xorm:"VARCHAR(255)"`
NewPlatform string `json:"new_platform" xorm:"VARCHAR(5000)"`
}

+ 1
- 1
src/model/platform_total_data.go Прегледај датотеку

@@ -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)"`


Loading…
Откажи
Сачувај