@@ -7,4 +7,5 @@ type EggEnergyCommunityDividendsWithUserDao interface { | |||||
EggEnergyCommunityDividendsWithUserInsert(EggEnergyCommunityDividendsWithUser *model.EggEnergyCommunityDividendsWithUser) (int, error) | EggEnergyCommunityDividendsWithUserInsert(EggEnergyCommunityDividendsWithUser *model.EggEnergyCommunityDividendsWithUser) (int, error) | ||||
EggEnergyCommunityDividendsWithUserFindAndCount(page, limit int, uid int64) ([]*model.EggEnergyCommunityDividendsWithUser, int64, error) | EggEnergyCommunityDividendsWithUserFindAndCount(page, limit int, uid int64) ([]*model.EggEnergyCommunityDividendsWithUser, int64, error) | ||||
EggEnergyCommunityDividendsWithUserExist(uid int64) (bool, error) | EggEnergyCommunityDividendsWithUserExist(uid int64) (bool, error) | ||||
EggEnergyCommunityDividendsWithUserDel(id interface{}) (int64, error) | |||||
} | } |
@@ -0,0 +1,8 @@ | |||||
package dao | |||||
import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" | |||||
type UserEggScoreDataDao interface { | |||||
//TODO:: You can add specific method definitions here | |||||
UserEggScoreDataInsert(data *model.UserEggScoreData) (int64, error) | |||||
} |
@@ -44,3 +44,11 @@ func (e EggEnergyCommunityDividendsWithUserDb) EggEnergyCommunityDividendsWithUs | |||||
} | } | ||||
return has, nil | return has, nil | ||||
} | } | ||||
func (e EggEnergyCommunityDividendsWithUserDb) EggEnergyCommunityDividendsWithUserDel(id interface{}) (int64, error) { | |||||
affected, err := e.Db.Where("id=?", id).Delete(&model.EggEnergyCommunityDividendsWithUser{}) | |||||
if err != nil { | |||||
return 0, zhios_order_relate_logx.Error(err.Error()) | |||||
} | |||||
return affected, nil | |||||
} |
@@ -0,0 +1,23 @@ | |||||
package implement | |||||
import ( | |||||
"code.fnuoos.com/EggPlanet/egg_models.git/src/dao" | |||||
"code.fnuoos.com/EggPlanet/egg_models.git/src/model" | |||||
"xorm.io/xorm" | |||||
) | |||||
func NewUserEggScoreDataDb(engine *xorm.Engine) dao.UserEggScoreDataDao { | |||||
return &UserEggScoreDataDb{Db: engine} | |||||
} | |||||
type UserEggScoreDataDb struct { | |||||
Db *xorm.Engine | |||||
} | |||||
func (u UserEggScoreDataDb) UserEggScoreDataInsert(m *model.UserEggScoreData) (int64, error) { | |||||
_, err := u.Db.InsertOne(m) | |||||
if err != nil { | |||||
return 0, err | |||||
} | |||||
return m.Id, nil | |||||
} |
@@ -0,0 +1,24 @@ | |||||
package model | |||||
type UserEggScoreData struct { | |||||
Id int64 `json:"id" xorm:"pk autoincr BIGINT(20)"` | |||||
Uid int64 `json:"uid" xorm:"not null comment('用户ID') BIGINT(20)"` | |||||
Ecpm string `json:"ecpm" xorm:"not null default 0.00000000 comment('ecpm') DECIMAL(20,8)"` | |||||
InviteUserNums int `json:"invite_user_nums" xorm:"not null default 0 comment('拉新人数') INT(11)"` | |||||
TeamActivityNums int `json:"team_activity_nums" xorm:"not null default 0 comment('团队活跃次数') INT(11)"` | |||||
SignInNums int `json:"sign_in_nums" xorm:"not null default 0 comment('签到次数') INT(11)"` | |||||
ImActivityNums int `json:"im_activity_nums" xorm:"not null default 0 comment('im活跃次数') INT(11)"` | |||||
SendRedPackageNums int `json:"send_red_package_nums" xorm:"not null default 0 comment('发红包次数') INT(11)"` | |||||
EggEnergyExchangeAccountBalance int `json:"egg_energy_exchange_account_balance" xorm:"not null default 0 comment('蛋蛋能量兑换余额数量') INT(11)"` | |||||
AccountBalanceExchangeEggEnergyNums int `json:"account_balance_exchange_egg_energy_nums" xorm:"not null default 0 comment('余额兑换蛋蛋能量数量') INT(11)"` | |||||
SendCircleOfFriendNums int `json:"send_circle_of_friend_nums" xorm:"not null default 0 comment('发朋友圈次数') INT(11)"` | |||||
ForumCommentsNums int `json:"forum_comments_nums" xorm:"not null default 0 comment('论坛评论次数') INT(11)"` | |||||
CollegeLearningNums int `json:"college_learning_nums" xorm:"not null default 0 comment('学院学习次数') INT(11)"` | |||||
ViolateNums int `json:"violate_nums" xorm:"not null default 0 comment('违规次数') INT(11)"` | |||||
BrowseInterfaceNums int `json:"browse_interface_nums" xorm:"not null default 0 comment('浏览界面次数') INT(11)"` | |||||
PersonAddActivityValue int `json:"person_add_activity_value" xorm:"not null default 0 comment('个人活跃积分') INT(11)"` | |||||
Score string `json:"score" xorm:"not null comment('分数') DECIMAL(20,8)"` | |||||
Date string `json:"date" xorm:"not null default '0000-00' comment('日期(YYYY-WW)') CHAR(50)"` | |||||
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"` | |||||
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"` | |||||
} |