From a7998d1c1fb388c8bf4a872120eed4bc7b941f84 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Tue, 26 Nov 2024 19:56:10 +0800 Subject: [PATCH 01/17] =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=AE=BE=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/user_imei.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/model/user_imei.go diff --git a/src/model/user_imei.go b/src/model/user_imei.go new file mode 100644 index 0000000..06d98b4 --- /dev/null +++ b/src/model/user_imei.go @@ -0,0 +1,13 @@ +package model + +import ( + "time" +) + +type UserImei struct { + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + Uid int `json:"uid" xorm:"INT(11)"` + Imei string `json:"imei" xorm:"VARCHAR(255)"` + CreateAt time.Time `json:"create_at" xorm:"DATETIME"` + Ip string `json:"ip" xorm:"VARCHAR(255)"` +} From 2fadc60eff6fd6160a1d74dc9d12f796fdd343ff Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Tue, 26 Nov 2024 20:32:20 +0800 Subject: [PATCH 02/17] update --- src/implement/user_tag_records_implement.go | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/implement/user_tag_records_implement.go b/src/implement/user_tag_records_implement.go index 56ca4d7..3d2e4db 100644 --- a/src/implement/user_tag_records_implement.go +++ b/src/implement/user_tag_records_implement.go @@ -3,6 +3,7 @@ package implement import ( "code.fnuoos.com/EggPlanet/egg_models.git/src/dao" "code.fnuoos.com/EggPlanet/egg_models.git/src/model" + zhios_order_relate_utils "code.fnuoos.com/EggPlanet/egg_models.git/utils" zhios_order_relate_logx "code.fnuoos.com/EggPlanet/egg_models.git/utils/logx" "fmt" "reflect" @@ -44,10 +45,10 @@ func (u UserTagRecordsDb) UserTagRecordsUpdateBySession(session *xorm.Session, u func (u UserTagRecordsDb) UserTagRecordsDeleteBySession(session *xorm.Session, params map[string]interface{}) (int64, error) { if reflect.TypeOf(params["value"]).Kind() == reflect.Slice { - return session.In(zhios_order_relate_logx.AnyToString(params["key"]), params["value"]).Delete(model.UserTag{}) + return session.In(zhios_order_relate_logx.AnyToString(params["key"]), params["value"]).Delete(model.UserTagRecords{}) } else { var query = fmt.Sprintf("%s =?", params["key"]) - return session.Where(query, params["value"]).Delete(model.UserTag{}) + return session.Where(query, params["value"]).Delete(model.UserTagRecords{}) } } @@ -61,9 +62,17 @@ func (u UserTagRecordsDb) UserTagRecordsBatchInsert(userTagRecord []*model.UserT func (u UserTagRecordsDb) UserTagRecordsFindByParams(params map[string]interface{}) (*[]model.UserTagRecords, error) { var m []model.UserTagRecords - var query = fmt.Sprintf("%s = ?", params["key"]) - if err := u.Db.Where(query, params["value"]).Find(&m); err != nil { - return nil, zhios_order_relate_logx.Error(err) + if reflect.TypeOf(params["value"]).Kind() == reflect.Slice { + //指定In查询 + if err := u.Db.In(zhios_order_relate_utils.AnyToString(params["key"]), params["value"]).Find(&m); err != nil { + return nil, zhios_order_relate_logx.Warn(err) + } + } else { + var query = fmt.Sprintf("%s =?", params["key"]) + err := u.Db.Where(query, params["value"]).Find(&m) + if err != nil { + return nil, zhios_order_relate_logx.Error(err) + } } return &m, nil } From 467e6011aa2513e2b87205b19637c7351a2a7d49 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 27 Nov 2024 09:38:19 +0800 Subject: [PATCH 03/17] =?UTF-8?q?=E7=9F=AD=E4=BF=A1=20=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/aliyun_sms_notice.go | 17 +++++++++-------- src/model/jpush_notice.go | 17 +++++++++-------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/model/aliyun_sms_notice.go b/src/model/aliyun_sms_notice.go index 96189e4..d7e98cc 100644 --- a/src/model/aliyun_sms_notice.go +++ b/src/model/aliyun_sms_notice.go @@ -5,12 +5,13 @@ import ( ) type AliyunSmsNotice struct { - Id int `json:"id" xorm:"not null pk autoincr INT(11)"` - Title string `json:"title" xorm:"VARCHAR(255)"` - Content string `json:"content" xorm:"VARCHAR(255)"` - Skip string `json:"skip" xorm:"TEXT"` - CreateAt time.Time `json:"create_at" xorm:"DATETIME"` - UpdateAt time.Time `json:"update_at" xorm:"DATETIME"` - Day int `json:"day" xorm:"comment('部分通知需要时间') INT(11)"` - Type string `json:"type" xorm:"VARCHAR(255)"` + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + Title string `json:"title" xorm:"VARCHAR(255)"` + Content string `json:"content" xorm:"VARCHAR(255)"` + Skip string `json:"skip" xorm:"TEXT"` + CreateAt time.Time `json:"create_at" xorm:"DATETIME"` + UpdateAt time.Time `json:"update_at" xorm:"DATETIME"` + Day int `json:"day" xorm:"comment('部分通知需要时间') INT(11)"` + Type string `json:"type" xorm:"VARCHAR(255)"` + NoticeDay int `json:"notice_day" xorm:"default 0 comment('部分通知需要时间 隔X小时通知') INT(11)"` } diff --git a/src/model/jpush_notice.go b/src/model/jpush_notice.go index 63088f1..2757086 100644 --- a/src/model/jpush_notice.go +++ b/src/model/jpush_notice.go @@ -5,12 +5,13 @@ import ( ) type JpushNotice struct { - Id int `json:"id" xorm:"not null pk autoincr INT(11)"` - Title string `json:"title" xorm:"VARCHAR(255)"` - Content string `json:"content" xorm:"VARCHAR(255)"` - Skip string `json:"skip" xorm:"TEXT"` - CreateAt time.Time `json:"create_at" xorm:"DATETIME"` - UpdateAt time.Time `json:"update_at" xorm:"DATETIME"` - Day int `json:"day" xorm:"comment('部分通知需要时间') INT(11)"` - Type string `json:"type" xorm:"VARCHAR(255)"` + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + Title string `json:"title" xorm:"VARCHAR(255)"` + Content string `json:"content" xorm:"VARCHAR(255)"` + Skip string `json:"skip" xorm:"TEXT"` + CreateAt time.Time `json:"create_at" xorm:"DATETIME"` + UpdateAt time.Time `json:"update_at" xorm:"DATETIME"` + Day int `json:"day" xorm:"comment('部分通知需要时间 X小时') INT(11)"` + Type string `json:"type" xorm:"VARCHAR(255)"` + NoticeDay int `json:"notice_day" xorm:"default 0 comment('部分通知需要时间 隔X小时通知') INT(11)"` } From 8dabaaaec318e9d181ed0edaa3a3f474c2c04988 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 27 Nov 2024 10:17:17 +0800 Subject: [PATCH 04/17] =?UTF-8?q?=E7=9F=AD=E4=BF=A1=20=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/user_notice_time.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/model/user_notice_time.go diff --git a/src/model/user_notice_time.go b/src/model/user_notice_time.go new file mode 100644 index 0000000..292f4b6 --- /dev/null +++ b/src/model/user_notice_time.go @@ -0,0 +1,12 @@ +package model + +import ( + "time" +) + +type UserNoticeTime struct { + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + Uid int `json:"uid" xorm:"default 0 INT(11)"` + LoginNoticeTime time.Time `json:"login_notice_time" xorm:"DATETIME"` + SignNoticeTime time.Time `json:"sign_notice_time" xorm:"DATETIME"` +} From 629023eee8c6e9504b92d5c157bd47722d644cb2 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 27 Nov 2024 10:30:00 +0800 Subject: [PATCH 05/17] =?UTF-8?q?=E7=9F=AD=E4=BF=A1=20=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/aliyun_sms_notice.go | 1 + src/model/jpush_notice.go | 1 + 2 files changed, 2 insertions(+) diff --git a/src/model/aliyun_sms_notice.go b/src/model/aliyun_sms_notice.go index d7e98cc..2ed421e 100644 --- a/src/model/aliyun_sms_notice.go +++ b/src/model/aliyun_sms_notice.go @@ -14,4 +14,5 @@ type AliyunSmsNotice struct { Day int `json:"day" xorm:"comment('部分通知需要时间') INT(11)"` Type string `json:"type" xorm:"VARCHAR(255)"` NoticeDay int `json:"notice_day" xorm:"default 0 comment('部分通知需要时间 隔X小时通知') INT(11)"` + IsShow int `json:"is_show" xorm:"default 0 INT(1)"` } diff --git a/src/model/jpush_notice.go b/src/model/jpush_notice.go index 2757086..f0dde41 100644 --- a/src/model/jpush_notice.go +++ b/src/model/jpush_notice.go @@ -14,4 +14,5 @@ type JpushNotice struct { Day int `json:"day" xorm:"comment('部分通知需要时间 X小时') INT(11)"` Type string `json:"type" xorm:"VARCHAR(255)"` NoticeDay int `json:"notice_day" xorm:"default 0 comment('部分通知需要时间 隔X小时通知') INT(11)"` + IsShow int `json:"is_show" xorm:"default 0 INT(1)"` } From 6ff35d2075d5cecf525202e8e5e95d247be676a8 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 27 Nov 2024 14:36:55 +0800 Subject: [PATCH 06/17] =?UTF-8?q?=E4=BA=91=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/dao/cloud_bundle_dao.go | 11 ++++++ src/implement/cloud_bundle_implement.go | 50 +++++++++++++++++++++++++ src/model/cloud_bundle.go | 25 +++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 src/dao/cloud_bundle_dao.go create mode 100644 src/implement/cloud_bundle_implement.go create mode 100644 src/model/cloud_bundle.go diff --git a/src/dao/cloud_bundle_dao.go b/src/dao/cloud_bundle_dao.go new file mode 100644 index 0000000..21b6de6 --- /dev/null +++ b/src/dao/cloud_bundle_dao.go @@ -0,0 +1,11 @@ +package dao + +import ( + "code.fnuoos.com/EggPlanet/egg_models.git/src/model" +) + +type CloudBundleDao interface { + FindCloudBundleAndTotal(page, limit string) (*[]model.CloudBundle, int64, error) + GetCloudBundle(id string) (m *model.CloudBundle, err error) + GetCloudBundleLast(os string) (m *model.CloudBundle, err error) +} diff --git a/src/implement/cloud_bundle_implement.go b/src/implement/cloud_bundle_implement.go new file mode 100644 index 0000000..a63b36e --- /dev/null +++ b/src/implement/cloud_bundle_implement.go @@ -0,0 +1,50 @@ +package implement + +import ( + "code.fnuoos.com/EggPlanet/egg_models.git/src/dao" + "code.fnuoos.com/EggPlanet/egg_models.git/src/model" + zhios_order_relate_utils "code.fnuoos.com/EggPlanet/egg_models.git/utils" + zhios_order_relate_logx "code.fnuoos.com/EggPlanet/egg_models.git/utils/logx" + "xorm.io/xorm" +) + +func NewCloudBundleDb(engine *xorm.Engine) dao.CloudBundleDao { + return &CloudBundleDb{Db: engine} +} + +type CloudBundleDb struct { + Db *xorm.Engine +} + +func (c CloudBundleDb) FindCloudBundleAndTotal(page, limit string) (*[]model.CloudBundle, int64, error) { + var m []model.CloudBundle + sess := c.Db.Where("1=1") + start := (zhios_order_relate_utils.StrToInt(page) - 1) * zhios_order_relate_utils.StrToInt(limit) + count, err := sess.Limit(zhios_order_relate_utils.StrToInt(limit), start).OrderBy("id desc").FindAndCount(&m) + if err != nil { + return nil, count, zhios_order_relate_logx.Error(err) + } + return &m, count, nil +} +func (c CloudBundleDb) GetCloudBundle(id string) (m *model.CloudBundle, err error) { + m = new(model.CloudBundle) + has, err := c.Db.Where("id=?", id).Get(m) + if err != nil { + return nil, zhios_order_relate_logx.Error(err) + } + if has == false { + return nil, nil + } + return m, nil +} +func (c CloudBundleDb) GetCloudBundleLast(os string) (m *model.CloudBundle, err error) { + m = new(model.CloudBundle) + has, err := c.Db.Where("os=? and ep=0", os).Desc("id").Get(m) + if err != nil { + return nil, zhios_order_relate_logx.Error(err) + } + if has == false { + return nil, nil + } + return m, nil +} diff --git a/src/model/cloud_bundle.go b/src/model/cloud_bundle.go new file mode 100644 index 0000000..ba78c89 --- /dev/null +++ b/src/model/cloud_bundle.go @@ -0,0 +1,25 @@ +package model + +type CloudBundle struct { + Id int `json:"id" xorm:"not null pk autoincr INT(10)"` + Os int `json:"os" xorm:"not null default 1 comment('系统类型:1.Android; 2.IOS 3.微信小程序 4.支付宝小程序') TINYINT(1)"` + Version string `json:"version" xorm:"not null default '' comment('版本号') VARCHAR(255)"` + Modules string `json:"modules" xorm:"not null comment('包含的模块') TEXT"` + ApplyAt int `json:"apply_at" xorm:"comment('申请时间') INT(11)"` + FinishAt int `json:"finish_at" xorm:"comment('完成时间') INT(11)"` + State int `json:"state" xorm:"not null default 1 comment('状态:正在排队0,正在同步代码1,正在更新配置2,正在混淆3,正在打包4,正在上传5,打包成功999,异常-1, 998已重签') SMALLINT(5)"` + Memo string `json:"memo" xorm:"comment('备注') TEXT"` + ErrorMsg string `json:"error_msg" xorm:"comment('错误信息') TEXT"` + Src string `json:"src" xorm:"comment('包源地址') VARCHAR(255)"` + BuildId string `json:"build_id" xorm:"comment('build版本ID') VARCHAR(255)"` + BuildNumber string `json:"build_number" xorm:"default '' VARCHAR(255)"` + TemplateDuringAudit string `json:"template_during_audit" xorm:"not null default '' VARCHAR(255)"` + ResignSrc string `json:"resign_src" xorm:"comment('已重签的apk包') VARCHAR(255)"` + Ep int `json:"ep" xorm:"not null default 0 comment('0:c端 1:b端') TINYINT(1)"` + Bit string `json:"bit" xorm:"comment('位数') VARCHAR(255)"` + AppletId int `json:"applet_id" xorm:"default 0 comment('小程序记录id') INT(11)"` + IsCombine string `json:"is_combine" xorm:"default '0' VARCHAR(255)"` + NewBit string `json:"new_bit" xorm:"VARCHAR(255)"` + 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)"` +} From 15aa08a421b0e603c80f32343f3460cefc361112 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 27 Nov 2024 16:18:13 +0800 Subject: [PATCH 07/17] =?UTF-8?q?=E4=BA=91=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/dao/cloud_bundle_dao.go | 1 + src/implement/cloud_bundle_implement.go | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/dao/cloud_bundle_dao.go b/src/dao/cloud_bundle_dao.go index 21b6de6..6c16591 100644 --- a/src/dao/cloud_bundle_dao.go +++ b/src/dao/cloud_bundle_dao.go @@ -8,4 +8,5 @@ type CloudBundleDao interface { FindCloudBundleAndTotal(page, limit string) (*[]model.CloudBundle, int64, error) GetCloudBundle(id string) (m *model.CloudBundle, err error) GetCloudBundleLast(os string) (m *model.CloudBundle, err error) + GetCloudBundleVersion(os, version string) (m *model.CloudBundle, err error) } diff --git a/src/implement/cloud_bundle_implement.go b/src/implement/cloud_bundle_implement.go index a63b36e..74c85f7 100644 --- a/src/implement/cloud_bundle_implement.go +++ b/src/implement/cloud_bundle_implement.go @@ -48,3 +48,14 @@ func (c CloudBundleDb) GetCloudBundleLast(os string) (m *model.CloudBundle, err } return m, nil } +func (c CloudBundleDb) GetCloudBundleVersion(os, version string) (m *model.CloudBundle, err error) { + m = new(model.CloudBundle) + has, err := c.Db.Where("os=? and version=?", os, version).Desc("id").Get(m) + if err != nil { + return nil, zhios_order_relate_logx.Error(err) + } + if has == false { + return nil, nil + } + return m, nil +} From 7527f43404d141861db13ba821e87347751b3cb1 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 27 Nov 2024 17:56:05 +0800 Subject: [PATCH 08/17] =?UTF-8?q?=E4=BA=91=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/cloud_bundle.go | 1 + src/model/jpush_notice.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/model/cloud_bundle.go b/src/model/cloud_bundle.go index ba78c89..5e51b25 100644 --- a/src/model/cloud_bundle.go +++ b/src/model/cloud_bundle.go @@ -22,4 +22,5 @@ type CloudBundle struct { NewBit string `json:"new_bit" xorm:"VARCHAR(255)"` 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)"` } diff --git a/src/model/jpush_notice.go b/src/model/jpush_notice.go index f0dde41..bbb130a 100644 --- a/src/model/jpush_notice.go +++ b/src/model/jpush_notice.go @@ -15,4 +15,7 @@ type JpushNotice struct { Type string `json:"type" xorm:"VARCHAR(255)"` NoticeDay int `json:"notice_day" xorm:"default 0 comment('部分通知需要时间 隔X小时通知') INT(11)"` IsShow int `json:"is_show" xorm:"default 0 INT(1)"` + JpushOpen int `json:"jpush_open" xorm:"default 0 INT(1)"` + SmsOpen int `json:"sms_open" xorm:"default 0 INT(1)"` + SmsCode string `json:"sms_code" xorm:"VARCHAR(255)"` } From 1959e539cc1f1fd991e2b3f00ffb255fc0cab006 Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Wed, 27 Nov 2024 18:16:21 +0800 Subject: [PATCH 09/17] add batch send message --- ...im_group_batch_send_message_records_dao.go | 9 +++++ .../im_user_batch_send_message_records_dao.go | 9 +++++ src/dao/user_dao.go | 1 + ...up_batch_send_message_records_implement.go | 39 +++++++++++++++++++ ...er_batch_send_message_records_implement.go | 39 +++++++++++++++++++ src/implement/user_implement.go | 19 +++++++++ .../im_group_batch_send_message_records.go | 15 +++++++ .../im_user_batch_send_message_records.go | 16 ++++++++ 8 files changed, 147 insertions(+) create mode 100644 src/dao/im_group_batch_send_message_records_dao.go create mode 100644 src/dao/im_user_batch_send_message_records_dao.go create mode 100644 src/implement/im_group_batch_send_message_records_implement.go create mode 100644 src/implement/im_user_batch_send_message_records_implement.go create mode 100644 src/model/im_group_batch_send_message_records.go create mode 100644 src/model/im_user_batch_send_message_records.go diff --git a/src/dao/im_group_batch_send_message_records_dao.go b/src/dao/im_group_batch_send_message_records_dao.go new file mode 100644 index 0000000..2631a65 --- /dev/null +++ b/src/dao/im_group_batch_send_message_records_dao.go @@ -0,0 +1,9 @@ +package dao + +import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" + +type ImGroupBatchSendMessageRecordsDao interface { + //TODO:: You can add specific method definitions here + ImGroupBatchSendMessageRecordsInsert(m *model.ImGroupBatchSendMessageRecords) (int, error) + ImGroupBatchSendMessageRecordsUpdate(id interface{}, m *model.ImGroupBatchSendMessageRecords, forceColumns ...string) (int64, error) +} diff --git a/src/dao/im_user_batch_send_message_records_dao.go b/src/dao/im_user_batch_send_message_records_dao.go new file mode 100644 index 0000000..54750d7 --- /dev/null +++ b/src/dao/im_user_batch_send_message_records_dao.go @@ -0,0 +1,9 @@ +package dao + +import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" + +type ImUserBatchSendMessageRecordsDao interface { + //TODO:: You can add specific method definitions here + ImUserBatchSendMessageRecordsInsert(m *model.ImUserBatchSendMessageRecords) (int, error) + ImUserBatchSendMessageRecordsUpdate(id interface{}, m *model.ImUserBatchSendMessageRecords, forceColumns ...string) (int64, error) +} diff --git a/src/dao/user_dao.go b/src/dao/user_dao.go index 5a91632..c665546 100644 --- a/src/dao/user_dao.go +++ b/src/dao/user_dao.go @@ -18,4 +18,5 @@ type UserDao interface { UpdateUser(m *model.User, columns ...string) (int64, error) GetUser(id int64) (m *model.User, err error) UserCount() (int64, error) + UserFindNotInByParamsByPage(page int, limit int, params map[string]interface{}) ([]model.User, int64, error) } diff --git a/src/implement/im_group_batch_send_message_records_implement.go b/src/implement/im_group_batch_send_message_records_implement.go new file mode 100644 index 0000000..9edcd58 --- /dev/null +++ b/src/implement/im_group_batch_send_message_records_implement.go @@ -0,0 +1,39 @@ +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 NewImGroupBatchSendMessageRecordsDb(engine *xorm.Engine) dao.ImGroupBatchSendMessageRecordsDao { + return &ImGroupBatchSendMessageRecordsDb{Db: engine} +} + +type ImGroupBatchSendMessageRecordsDb struct { + Db *xorm.Engine +} + +func (i ImGroupBatchSendMessageRecordsDb) ImGroupBatchSendMessageRecordsInsert(m *model.ImGroupBatchSendMessageRecords) (int, error) { + _, err := i.Db.InsertOne(m) + if err != nil { + return 0, err + } + return m.Id, nil +} + +func (i ImGroupBatchSendMessageRecordsDb) ImGroupBatchSendMessageRecordsUpdate(id interface{}, m *model.ImGroupBatchSendMessageRecords, forceColumns ...string) (int64, error) { + var ( + affected int64 + err error + ) + if forceColumns != nil { + affected, err = i.Db.Where("id=?", id).MustCols(forceColumns...).Update(m) + } else { + affected, err = i.Db.Where("id=?", id).Update(m) + } + if err != nil { + return 0, err + } + return affected, nil +} diff --git a/src/implement/im_user_batch_send_message_records_implement.go b/src/implement/im_user_batch_send_message_records_implement.go new file mode 100644 index 0000000..8bc1c68 --- /dev/null +++ b/src/implement/im_user_batch_send_message_records_implement.go @@ -0,0 +1,39 @@ +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 NewImUserBatchSendMessageRecordsDb(engine *xorm.Engine) dao.ImUserBatchSendMessageRecordsDao { + return &ImUserBatchSendMessageRecordsDb{Db: engine} +} + +type ImUserBatchSendMessageRecordsDb struct { + Db *xorm.Engine +} + +func (i ImUserBatchSendMessageRecordsDb) ImUserBatchSendMessageRecordsInsert(m *model.ImUserBatchSendMessageRecords) (int, error) { + _, err := i.Db.InsertOne(m) + if err != nil { + return 0, err + } + return m.Id, nil +} + +func (i ImUserBatchSendMessageRecordsDb) ImUserBatchSendMessageRecordsUpdate(id interface{}, m *model.ImUserBatchSendMessageRecords, forceColumns ...string) (int64, error) { + var ( + affected int64 + err error + ) + if forceColumns != nil { + affected, err = i.Db.Where("id=?", id).MustCols(forceColumns...).Update(m) + } else { + affected, err = i.Db.Where("id=?", id).Update(m) + } + if err != nil { + return 0, err + } + return affected, nil +} diff --git a/src/implement/user_implement.go b/src/implement/user_implement.go index 6117051..e4df67b 100644 --- a/src/implement/user_implement.go +++ b/src/implement/user_implement.go @@ -157,3 +157,22 @@ func (u UserDb) UserCount() (int64, error) { } return count, nil } + +func (u UserDb) UserFindNotInByParamsByPage(page int, limit int, params map[string]interface{}) ([]model.User, int64, error) { + var m []model.User + var total int64 + var err error + if reflect.TypeOf(params["value"]).Kind() == reflect.Slice { + //指定In查询 + if total, err = u.Db.NotIn(zhios_order_relate_utils.AnyToString(params["key"]), params["value"]).Limit(limit, (page-1)*limit).FindAndCount(&m); err != nil { + return nil, 0, zhios_order_relate_logx.Warn(err) + } + } else { + var query = fmt.Sprintf("%s != ?", params["key"]) + total, err = u.Db.Where(query, params["value"]).Limit(limit, (page-1)*limit).FindAndCount(&m) + if err != nil { + return nil, 0, zhios_order_relate_logx.Error(err) + } + } + return m, total, nil +} diff --git a/src/model/im_group_batch_send_message_records.go b/src/model/im_group_batch_send_message_records.go new file mode 100644 index 0000000..a4a8c4e --- /dev/null +++ b/src/model/im_group_batch_send_message_records.go @@ -0,0 +1,15 @@ +package model + +type ImGroupBatchSendMessageRecords struct { + Id int `json:"id" xorm:"not null pk autoincr comment('主键id') INT(11)"` + SendKind int `json:"send_kind" xorm:"not null default 1 comment('发送模式(1:指定群组 2:所有群组)') TINYINT(1)"` + GroupId string `json:"group_id" xorm:"not null comment('群组id(以;切割)') TEXT"` + Kind int `json:"kind" xorm:"not null default 1 comment('消息类型(0未知 1文本 2表情 3语音消息 4图片 5文件 6地理位置 7指令推送 8自定义 9撤回消息 10红包消息)') TINYINT(1)"` + Content string `json:"content" xorm:"comment('消息内容') TEXT"` + SendTime string `json:"send_time" xorm:"not null default 'CURRENT_TIMESTAMP(3)' comment('消息发送时间') DATETIME(3)"` + State int `json:"state" xorm:"not null default 0 comment('消息状态,1:正常 2:失败') TINYINT(3)"` + SendCondition string `json:"send_condition" xorm:"not null comment('发送条件') TEXT"` + NotCondition string `json:"not_condition" xorm:"not null comment('不发送条件') TEXT"` + CreateTime string `json:"create_time" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"` + UpdateTime string `json:"update_time" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"` +} diff --git a/src/model/im_user_batch_send_message_records.go b/src/model/im_user_batch_send_message_records.go new file mode 100644 index 0000000..f3cc393 --- /dev/null +++ b/src/model/im_user_batch_send_message_records.go @@ -0,0 +1,16 @@ +package model + +type ImUserBatchSendMessageRecords struct { + Id int `json:"id" xorm:"not null pk autoincr comment('主键id') INT(11)"` + SendKind int `json:"send_kind" xorm:"not null default 1 comment('发送模式(1:所有用户 2:指定用户)') TINYINT(1)"` + Uid string `json:"uid" xorm:"not null comment('uid(以;切割)') TEXT"` + ImUid string `json:"im_uid" xorm:"not null comment('im-uid(以;切割)') TEXT"` + Kind int `json:"kind" xorm:"not null default 1 comment('消息类型(0未知 1文本 2表情 3语音消息 4图片 5文件 6地理位置 7指令推送 8自定义 9撤回消息 10红包消息)') TINYINT(1)"` + Content string `json:"content" xorm:"comment('消息内容') TEXT"` + SendTime string `json:"send_time" xorm:"not null default 'CURRENT_TIMESTAMP(3)' comment('消息发送时间') DATETIME(3)"` + State int `json:"state" xorm:"not null default 0 comment('消息状态,1:正常 2:失败') TINYINT(3)"` + SendCondition string `json:"send_condition" xorm:"not null comment('发送条件') TEXT"` + NotCondition string `json:"not_condition" xorm:"not null comment('不发送条件') TEXT"` + CreateTime string `json:"create_time" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"` + UpdateTime string `json:"update_time" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"` +} From 8ffcaa9a33d71b4186475d8224176722b5e81b77 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 27 Nov 2024 20:04:16 +0800 Subject: [PATCH 10/17] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/jpush_notice.go | 1 - 1 file changed, 1 deletion(-) diff --git a/src/model/jpush_notice.go b/src/model/jpush_notice.go index bbb130a..0b34253 100644 --- a/src/model/jpush_notice.go +++ b/src/model/jpush_notice.go @@ -14,7 +14,6 @@ type JpushNotice struct { Day int `json:"day" xorm:"comment('部分通知需要时间 X小时') INT(11)"` Type string `json:"type" xorm:"VARCHAR(255)"` NoticeDay int `json:"notice_day" xorm:"default 0 comment('部分通知需要时间 隔X小时通知') INT(11)"` - IsShow int `json:"is_show" xorm:"default 0 INT(1)"` JpushOpen int `json:"jpush_open" xorm:"default 0 INT(1)"` SmsOpen int `json:"sms_open" xorm:"default 0 INT(1)"` SmsCode string `json:"sms_code" xorm:"VARCHAR(255)"` From 00fb5ed328a63a3247c3065d63a3871c1c3e9a1a Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 27 Nov 2024 20:29:06 +0800 Subject: [PATCH 11/17] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/user_notice_time.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/model/user_notice_time.go b/src/model/user_notice_time.go index 292f4b6..880d46d 100644 --- a/src/model/user_notice_time.go +++ b/src/model/user_notice_time.go @@ -9,4 +9,6 @@ type UserNoticeTime struct { Uid int `json:"uid" xorm:"default 0 INT(11)"` LoginNoticeTime time.Time `json:"login_notice_time" xorm:"DATETIME"` SignNoticeTime time.Time `json:"sign_notice_time" xorm:"DATETIME"` + LoginTime time.Time `json:"login_time" xorm:"DATETIME"` + SignTime time.Time `json:"sign_time" xorm:"DATETIME"` } From 9e411a1a864951112ff47039425ee70d02c1d30b Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 27 Nov 2024 20:43:33 +0800 Subject: [PATCH 12/17] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/user_notice_time.go | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/model/user_notice_time.go b/src/model/user_notice_time.go index 880d46d..6d24e72 100644 --- a/src/model/user_notice_time.go +++ b/src/model/user_notice_time.go @@ -1,14 +1,10 @@ package model -import ( - "time" -) - type UserNoticeTime struct { - Id int `json:"id" xorm:"not null pk autoincr INT(11)"` - Uid int `json:"uid" xorm:"default 0 INT(11)"` - LoginNoticeTime time.Time `json:"login_notice_time" xorm:"DATETIME"` - SignNoticeTime time.Time `json:"sign_notice_time" xorm:"DATETIME"` - LoginTime time.Time `json:"login_time" xorm:"DATETIME"` - SignTime time.Time `json:"sign_time" xorm:"DATETIME"` + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + Uid int `json:"uid" xorm:"default 0 INT(11)"` + LoginNoticeTime int `json:"login_notice_time" xorm:"default 0 INT(11)"` + SignNoticeTime int `json:"sign_notice_time" xorm:"default 0 INT(11)"` + LoginTime int `json:"login_time" xorm:"default 0 INT(11)"` + SignTime int `json:"sign_time" xorm:"default 0 INT(11)"` } From fcef3d7a95d70beb7520bd3a0b316d83f42f0a10 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 27 Nov 2024 20:44:50 +0800 Subject: [PATCH 13/17] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/user_notice_time.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/model/user_notice_time.go b/src/model/user_notice_time.go index 6d24e72..614c91e 100644 --- a/src/model/user_notice_time.go +++ b/src/model/user_notice_time.go @@ -2,7 +2,7 @@ package model type UserNoticeTime struct { Id int `json:"id" xorm:"not null pk autoincr INT(11)"` - Uid int `json:"uid" xorm:"default 0 INT(11)"` + Uid int `json:"uid" xorm:"default 0 unique INT(11)"` LoginNoticeTime int `json:"login_notice_time" xorm:"default 0 INT(11)"` SignNoticeTime int `json:"sign_notice_time" xorm:"default 0 INT(11)"` LoginTime int `json:"login_time" xorm:"default 0 INT(11)"` From a00c65a48d15fad66f7c03ca8d850ef4677c9a67 Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Wed, 27 Nov 2024 21:00:35 +0800 Subject: [PATCH 14/17] add home page --- src/dao/platform_active_data_dao.go | 8 ++++++ src/dao/platform_grow_data_dao.go | 8 ++++++ src/dao/platform_total_data_dao.go | 8 ++++++ .../platform_active_data_implement.go | 26 ++++++++++++++++++ src/implement/platform_grow_data_implement.go | 25 +++++++++++++++++ .../platform_total_data_implement.go | 27 +++++++++++++++++++ src/model/platform_active_data.go | 10 +++++++ src/model/platform_grow_data.go | 7 +++++ src/model/platform_total_data.go | 11 ++++++++ 9 files changed, 130 insertions(+) create mode 100644 src/dao/platform_active_data_dao.go create mode 100644 src/dao/platform_grow_data_dao.go create mode 100644 src/dao/platform_total_data_dao.go create mode 100644 src/implement/platform_active_data_implement.go create mode 100644 src/implement/platform_grow_data_implement.go create mode 100644 src/implement/platform_total_data_implement.go create mode 100644 src/model/platform_active_data.go create mode 100644 src/model/platform_grow_data.go create mode 100644 src/model/platform_total_data.go diff --git a/src/dao/platform_active_data_dao.go b/src/dao/platform_active_data_dao.go new file mode 100644 index 0000000..72301de --- /dev/null +++ b/src/dao/platform_active_data_dao.go @@ -0,0 +1,8 @@ +package dao + +import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" + +type PlatformActiveDataDao interface { + //TODO:: You can add specific method definitions here + PlatformActiveDataGetOneByParams(params map[string]interface{}) (*model.PlatformActiveData, error) +} diff --git a/src/dao/platform_grow_data_dao.go b/src/dao/platform_grow_data_dao.go new file mode 100644 index 0000000..b8fd015 --- /dev/null +++ b/src/dao/platform_grow_data_dao.go @@ -0,0 +1,8 @@ +package dao + +import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" + +type PlatformGrowDataDao interface { + //TODO:: You can add specific method definitions here + PlatformGrowDataGetLastOne() (*model.PlatformGrowData, bool, error) +} diff --git a/src/dao/platform_total_data_dao.go b/src/dao/platform_total_data_dao.go new file mode 100644 index 0000000..a71ff89 --- /dev/null +++ b/src/dao/platform_total_data_dao.go @@ -0,0 +1,8 @@ +package dao + +import "code.fnuoos.com/EggPlanet/egg_models.git/src/model" + +type PlatformTotalDataDao interface { + //TODO:: You can add specific method definitions here + PlatformTotalDataGetOneByTime(year string, month string) (*model.PlatformTotalData, error) +} diff --git a/src/implement/platform_active_data_implement.go b/src/implement/platform_active_data_implement.go new file mode 100644 index 0000000..1679592 --- /dev/null +++ b/src/implement/platform_active_data_implement.go @@ -0,0 +1,26 @@ +package implement + +import ( + "code.fnuoos.com/EggPlanet/egg_models.git/src/dao" + "code.fnuoos.com/EggPlanet/egg_models.git/src/model" + zhios_order_relate_logx "code.fnuoos.com/EggPlanet/egg_models.git/utils/logx" + "fmt" + "xorm.io/xorm" +) + +func NewPlatformActiveDataDb(engine *xorm.Engine) dao.PlatformActiveDataDao { + return &PlatformActiveDataDb{Db: engine} +} + +type PlatformActiveDataDb struct { + Db *xorm.Engine +} + +func (p PlatformActiveDataDb) PlatformActiveDataGetOneByParams(params map[string]interface{}) (*model.PlatformActiveData, error) { + var m model.PlatformActiveData + var query = fmt.Sprintf("%s = ?", params["key"]) + if has, err := p.Db.Where(query, params["value"]).Get(&m); err != nil || has == false { + return nil, zhios_order_relate_logx.Error(err) + } + return &m, nil +} diff --git a/src/implement/platform_grow_data_implement.go b/src/implement/platform_grow_data_implement.go new file mode 100644 index 0000000..e3634a8 --- /dev/null +++ b/src/implement/platform_grow_data_implement.go @@ -0,0 +1,25 @@ +package implement + +import ( + "code.fnuoos.com/EggPlanet/egg_models.git/src/dao" + "code.fnuoos.com/EggPlanet/egg_models.git/src/model" + zhios_order_relate_logx "code.fnuoos.com/EggPlanet/egg_models.git/utils/logx" + "xorm.io/xorm" +) + +func NewPlatformGrowDataDb(engine *xorm.Engine) dao.PlatformGrowDataDao { + return &PlatformGrowDataDb{Db: engine} +} + +type PlatformGrowDataDb struct { + Db *xorm.Engine +} + +func (p PlatformGrowDataDb) PlatformGrowDataGetLastOne() (*model.PlatformGrowData, bool, error) { + var m model.PlatformGrowData + exist, err := p.Db.Desc("id").Get(&m) + if err != nil { + return nil, false, zhios_order_relate_logx.Error(err.Error()) + } + return &m, exist, nil +} diff --git a/src/implement/platform_total_data_implement.go b/src/implement/platform_total_data_implement.go new file mode 100644 index 0000000..3db6e13 --- /dev/null +++ b/src/implement/platform_total_data_implement.go @@ -0,0 +1,27 @@ +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 NewPlatformTotalDataDb(engine *xorm.Engine) dao.PlatformTotalDataDao { + return &PlatformTotalDataDb{Db: engine} +} + +type PlatformTotalDataDb struct { + Db *xorm.Engine +} + +func (p PlatformTotalDataDb) PlatformTotalDataGetOneByTime(year string, month string) (*model.PlatformTotalData, error) { + var m model.PlatformTotalData + get, err := p.Db.Where("year = ?", year).And("month = ?", month).Get(&m) + if err != nil { + return nil, err + } + if !get { + return nil, nil + } + return &m, nil +} diff --git a/src/model/platform_active_data.go b/src/model/platform_active_data.go new file mode 100644 index 0000000..ea2f250 --- /dev/null +++ b/src/model/platform_active_data.go @@ -0,0 +1,10 @@ +package model + +type PlatformActiveData struct { + Id int64 `json:"id" xorm:"pk autoincr BIGINT(20)"` + NewUserCount int `json:"new_user_count" xorm:"not null comment('今日新增用户数') INT(11)"` + UserSignInCount int `json:"user_sign_in_count" xorm:"not null comment('今日签到用户数') INT(11)"` + WithdrawAmountCount string `json:"withdraw_amount_count" xorm:"not null comment('今日提现金额') DECIMAL(10,2)"` + WithdrawUserCount int `json:"withdraw_user_count" xorm:"not null comment('今日提现用户数') INT(11)"` + Date string `json:"date" xorm:"not null default '0000-00-00' comment('日期') CHAR(50)"` +} diff --git a/src/model/platform_grow_data.go b/src/model/platform_grow_data.go new file mode 100644 index 0000000..5ddefc2 --- /dev/null +++ b/src/model/platform_grow_data.go @@ -0,0 +1,7 @@ +package model + +type PlatformGrowData struct { + Id int64 `json:"id" xorm:"pk autoincr BIGINT(20)"` + UserGrowCount int `json:"user_grow_count" xorm:"not null comment('用户增长数量') INT(11)"` + Date string `json:"date" xorm:"not null default '0000-00-00' comment('日期') CHAR(50)"` +} diff --git a/src/model/platform_total_data.go b/src/model/platform_total_data.go new file mode 100644 index 0000000..757ffd2 --- /dev/null +++ b/src/model/platform_total_data.go @@ -0,0 +1,11 @@ +package model + +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)"` + 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)"` +} From f94c311b6bb4786ba3cc91b4d9aef5542614466c Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 28 Nov 2024 10:05:03 +0800 Subject: [PATCH 15/17] =?UTF-8?q?=E5=B9=BF=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/advertising_callback.go | 11 +++++++++++ src/model/advertising_space.go | 1 + 2 files changed, 12 insertions(+) create mode 100644 src/model/advertising_callback.go diff --git a/src/model/advertising_callback.go b/src/model/advertising_callback.go new file mode 100644 index 0000000..e9c7458 --- /dev/null +++ b/src/model/advertising_callback.go @@ -0,0 +1,11 @@ +package model + +type AdvertisingCallback struct { + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + Platform string `json:"platform" xorm:"unique(platform) VARCHAR(255)"` + Oid string `json:"oid" xorm:"unique(platform) VARCHAR(255)"` + Uid int `json:"uid" xorm:"default 0 INT(11)"` + Extra string `json:"extra" xorm:"VARCHAR(255)"` + SpaceId string `json:"space_id" xorm:"VARCHAR(255)"` + Amount string `json:"amount" xorm:"VARCHAR(255)"` +} diff --git a/src/model/advertising_space.go b/src/model/advertising_space.go index 93dfbc6..a16a566 100644 --- a/src/model/advertising_space.go +++ b/src/model/advertising_space.go @@ -6,4 +6,5 @@ type AdvertisingSpace struct { Kind int `json:"kind" xorm:"not null default 1 comment('广告类型(1:开屏广告 2:插屏广告 3:激励视频 4:信息流广告)') TINYINT(1)"` Info string `json:"info" xorm:"TEXT"` CountingDown int `json:"counting_down" xorm:"default 0 comment('倒计时 单位秒') INT(11)"` + ServiceKey string `json:"service_key" xorm:"comment('回调校验') VARCHAR(255)"` } From 1cb145c7fa436812b0dc2269f8f1e477c9ef19f3 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 28 Nov 2024 10:53:09 +0800 Subject: [PATCH 16/17] =?UTF-8?q?=E5=B9=BF=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/advertising_callback.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/model/advertising_callback.go b/src/model/advertising_callback.go index e9c7458..883fcf0 100644 --- a/src/model/advertising_callback.go +++ b/src/model/advertising_callback.go @@ -8,4 +8,5 @@ type AdvertisingCallback struct { Extra string `json:"extra" xorm:"VARCHAR(255)"` SpaceId string `json:"space_id" xorm:"VARCHAR(255)"` Amount string `json:"amount" xorm:"VARCHAR(255)"` + IsRun int `json:"is_run" xorm:"default 0 INT(1)"` } From 743f36ef9dadd6a7f32bb40bc1778c8f9c1ed130 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 28 Nov 2024 11:02:09 +0800 Subject: [PATCH 17/17] =?UTF-8?q?=E5=B9=BF=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/advertising_space.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/model/advertising_space.go b/src/model/advertising_space.go index a16a566..4e4997d 100644 --- a/src/model/advertising_space.go +++ b/src/model/advertising_space.go @@ -1,7 +1,7 @@ package model type AdvertisingSpace struct { - Id int `json:"id" xorm:"not null pk INT(11)"` + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` Name string `json:"name" xorm:"VARCHAR(255)"` Kind int `json:"kind" xorm:"not null default 1 comment('广告类型(1:开屏广告 2:插屏广告 3:激励视频 4:信息流广告)') TINYINT(1)"` Info string `json:"info" xorm:"TEXT"`