From d12adae4f032655cfdaefd124ea0f0f5bc12d018 Mon Sep 17 00:00:00 2001 From: dengbiao Date: Tue, 25 Jun 2024 22:08:59 +0800 Subject: [PATCH] update --- ...oud_issuance_user_robot_bind_source_dao.go | 34 ++++++++++++++++ ...user_robot_bind_source_follow_group_dao.go | 7 ++++ ..._user_robot_bind_source_message_log_dao.go | 8 ++++ ...ance_user_robot_with_activate_group_dao.go | 7 +++- ...ssuance_user_robot_bind_follow_group_db.go | 4 +- ...issuance_user_robot_bind_follow_user_db.go | 2 +- ...loud_issuance_user_robot_bind_source_db.go | 38 ++++++++++++++++++ ..._user_robot_bind_source_follow_group_db.go | 23 +++++++++++ ...e_user_robot_bind_source_message_log_db.go | 33 ++++++++++++++++ ...uance_user_robot_with_activate_group_db.go | 39 ++++++++++++++++++- ...r_cloud_issuance_user_robot_bind_follow.go | 1 + ...d_issuance_user_robot_bind_follow_group.go | 3 +- ...ud_issuance_user_robot_bind_follow_user.go | 2 +- ...er_cloud_issuance_user_robot_bind_group.go | 1 + ...nce_user_robot_bind_source_follow_group.go | 15 +++++++ ..._robot_bind_source_follow_group_warning.go | 12 +++--- ...ance_user_robot_bind_source_message_log.go | 11 ++++++ ...issuance_user_robot_with_activate_group.go | 1 + super_cloud_issuance/md/md_request.go | 33 ++++++++++++++++ 19 files changed, 260 insertions(+), 14 deletions(-) create mode 100644 src/dao/super_cloud_issuance_user_robot_bind_source_dao.go create mode 100644 src/dao/super_cloud_issuance_user_robot_bind_source_follow_group_dao.go create mode 100644 src/dao/super_cloud_issuance_user_robot_bind_source_message_log_dao.go create mode 100644 src/implement/super_cloud_issuance_user_robot_bind_source_db.go create mode 100644 src/implement/super_cloud_issuance_user_robot_bind_source_follow_group_db.go create mode 100644 src/implement/super_cloud_issuance_user_robot_bind_source_message_log_db.go create mode 100644 src/models/super_cloud_issuance_user_robot_bind_source_follow_group.go create mode 100644 src/models/super_cloud_issuance_user_robot_bind_source_message_log.go diff --git a/src/dao/super_cloud_issuance_user_robot_bind_source_dao.go b/src/dao/super_cloud_issuance_user_robot_bind_source_dao.go new file mode 100644 index 0000000..b7fdc6d --- /dev/null +++ b/src/dao/super_cloud_issuance_user_robot_bind_source_dao.go @@ -0,0 +1,34 @@ +package dao + +import ( + "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" +) + +type SuperCloudIssuanceUserRobotBindSourceDao interface { + GetSuperCloudIssuanceUserRobotBindSource(activityGroupId int) (m *models.SuperCloudIssuanceUserRobotBindSource, err error) + FindSuperCloudIssuanceUserRobotBindSource(page, pageSize int) (resp []*FindSuperCloudIssuanceUserRobotBindSourceResponse, total int64, err error) +} + +type FindSuperCloudIssuanceUserRobotBindSourceResponse struct { + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + Name string `json:"name" xorm:"not null default '' comment('源头名称') VARCHAR(255)"` + ActivateGroupId int `json:"activate_group_id" xorm:"not null default '' comment('激活群id') VARCHAR(255)"` + IsSee int `json:"is_see" xorm:"not null default 1 comment('是否可见(1可见 2不可见)') TINYINT(1)"` + IsUse int `json:"is_use" xorm:"not null default 1 comment('是否可用(1正常转发 2暂停转发)') TINYINT(1)"` + SendOrderNums int `json:"send_order_nums" xorm:"not null default 0 comment('发单量') INT(11)"` + OutOrderNums int `json:"out_order_nums" xorm:"not null default 0 comment('出单量') INT(11)"` + TransactionAmount string `json:"transaction_amount" xorm:"not null default 0.0000 comment('成交金额') DECIMAL(8,4)"` + TransactionCommissionAmount string `json:"transaction_commission_amount" xorm:"not null default 0.0000 comment('成交佣金金额') DECIMAL(8,4)"` + FollowGroupNums int `json:"follow_group_nums" xorm:"not null default 0 comment('跟群数量') INT(11)"` + WarningNums int `json:"warning_nums" xorm:"not null default 0 comment('告警次数') INT(11)"` + Desc string `json:"desc" xorm:"not null comment('源头介绍') TEXT"` + CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('创建时间') DATETIME"` + UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') DATETIME"` + ChatRoomId string `json:"chat_room_id" xorm:"not null default '' comment('微信群id') VARCHAR(255)"` + ChatRoomOwnerWxNickname string `json:"chat_room_owner_wx_nickname" xorm:"not null default '' comment('群所有者微信昵称') VARCHAR(255)"` + ChatRoomOwnerWxHeadUrl string `json:"chat_room_owner_wx_head_url" xorm:"not null default '' comment('群所有者微信头像') VARCHAR(255)"` + ChatRoomOwner string `json:"chat_room_owner" xorm:"not null default '' comment('群所有者') VARCHAR(255)"` + MemberCount int `json:"member_count" xorm:"not null default 0 comment('群成员数') INT(11)"` + BigHeadImgUrl string `json:"big_head_img_url" xorm:"not null default '' comment('大的群头像') VARCHAR(255)"` + SmallHeadImgUrl string `json:"small_head_img_url" xorm:"not null default '' comment('小的群头像') VARCHAR(255)"` +} diff --git a/src/dao/super_cloud_issuance_user_robot_bind_source_follow_group_dao.go b/src/dao/super_cloud_issuance_user_robot_bind_source_follow_group_dao.go new file mode 100644 index 0000000..e47bf9d --- /dev/null +++ b/src/dao/super_cloud_issuance_user_robot_bind_source_follow_group_dao.go @@ -0,0 +1,7 @@ +package dao + +import "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" + +type SuperCloudIssuanceUserRobotBindSourceFollowGroupDao interface { + BatchAddSuperCloudIssuanceUserRobotBindSourceFollowGroups(data []*models.SuperCloudIssuanceUserRobotBindSourceFollowGroup) (int64, error) +} diff --git a/src/dao/super_cloud_issuance_user_robot_bind_source_message_log_dao.go b/src/dao/super_cloud_issuance_user_robot_bind_source_message_log_dao.go new file mode 100644 index 0000000..0641613 --- /dev/null +++ b/src/dao/super_cloud_issuance_user_robot_bind_source_message_log_dao.go @@ -0,0 +1,8 @@ +package dao + +import "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" + +type SuperCloudIssuanceUserRobotBindSourceMessageLogDao interface { + InsertSuperCloudIssuanceUserRobotBindSourceMessageLog(m *models.SuperCloudIssuanceUserRobotBindSourceMessageLog) (id int, err error) + FindSuperCloudIssuanceUserRobotBindSourceMessageLogs(bindId, page, pageSize int) (m []*models.SuperCloudIssuanceUserRobotBindSourceMessageLog, err error) +} diff --git a/src/dao/super_cloud_issuance_user_robot_with_activate_group_dao.go b/src/dao/super_cloud_issuance_user_robot_with_activate_group_dao.go index 066ff69..cbf04d4 100644 --- a/src/dao/super_cloud_issuance_user_robot_with_activate_group_dao.go +++ b/src/dao/super_cloud_issuance_user_robot_with_activate_group_dao.go @@ -1,5 +1,10 @@ package dao +import "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" + type SuperCloudIssuanceUserRobotWithActivateGroupDao interface { - //TODO:: You can add specific method definitions here + GetSuperCloudIssuanceUserRobotWithActivateGroupByChatRoomId(chatRoomId string, robotId int) (m *models.SuperCloudIssuanceUserRobotWithActivateGroup, err error) + FindSuperCloudIssuanceUserRobotWithActivateGroup(uid, page, pageSize int) (m []*models.SuperCloudIssuanceUserRobotWithActivateGroup, err error) + InsertSuperCloudIssuanceUserRobotWithActivateGroup(m *models.SuperCloudIssuanceUserRobotWithActivateGroup) (id int, err error) + DelSuperCloudIssuanceUserRobotWithActivateGroup(id int) (int64, error) } diff --git a/src/implement/super_cloud_issuance_user_robot_bind_follow_group_db.go b/src/implement/super_cloud_issuance_user_robot_bind_follow_group_db.go index 47bf151..bc85869 100644 --- a/src/implement/super_cloud_issuance_user_robot_bind_follow_group_db.go +++ b/src/implement/super_cloud_issuance_user_robot_bind_follow_group_db.go @@ -28,7 +28,7 @@ func (s SuperCloudIssuanceUserRobotBindFollowGroupDb) GetCloudIssuanceUserRobotB } func (s SuperCloudIssuanceUserRobotBindFollowGroupDb) GetCloudIssuanceUserRobotBindFollowGroupByBindId(bandId int) (m []*models.SuperCloudIssuanceUserRobotBindFollowGroup, err error) { - err = s.Db.Where("bind_id =?", bandId).Find(&m) + err = s.Db.Where("activate_group_id =?", bandId).Find(&m) if err != nil { return nil, zhios_order_relate_logx.Error(err) } @@ -62,7 +62,7 @@ func (s SuperCloudIssuanceUserRobotBindFollowGroupDb) SaveCloudIssuanceUserRobot } func (s SuperCloudIssuanceUserRobotBindFollowGroupDb) DeleteCloudIssuanceUserRobotBindFollowGroup(bindId interface{}) (affected int64, err error) { - _, err = s.Db.Where("bind_id=?", bindId).Delete(models.SuperCloudIssuanceUserRobotBindFollowGroup{}) + _, err = s.Db.Where("activate_group_id=?", bindId).Delete(models.SuperCloudIssuanceUserRobotBindFollowGroup{}) if err != nil { return 0, err } diff --git a/src/implement/super_cloud_issuance_user_robot_bind_follow_user_db.go b/src/implement/super_cloud_issuance_user_robot_bind_follow_user_db.go index 6f049c7..cd0de15 100644 --- a/src/implement/super_cloud_issuance_user_robot_bind_follow_user_db.go +++ b/src/implement/super_cloud_issuance_user_robot_bind_follow_user_db.go @@ -66,7 +66,7 @@ func (s SuperCloudIssuanceUserRobotBindFollowUserDb) SaveCloudIssuanceUserRobotB } func (s SuperCloudIssuanceUserRobotBindFollowUserDb) DeleteCloudIssuanceUserRobotBindFollowUser(bindId interface{}) (affected int64, err error) { - _, err = s.Db.Where("bind_id=?", bindId).Delete(models.SuperCloudIssuanceUserRobotBindFollowUser{}) + _, err = s.Db.Where("activate_group_id=?", bindId).Delete(models.SuperCloudIssuanceUserRobotBindFollowUser{}) if err != nil { return 0, err } diff --git a/src/implement/super_cloud_issuance_user_robot_bind_source_db.go b/src/implement/super_cloud_issuance_user_robot_bind_source_db.go new file mode 100644 index 0000000..c24a7e8 --- /dev/null +++ b/src/implement/super_cloud_issuance_user_robot_bind_source_db.go @@ -0,0 +1,38 @@ +package implement + +import ( + "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" + "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" + zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils/logx" + "xorm.io/xorm" +) + +func NewSuperCloudIssuanceUserRobotBindSourceDb(engine *xorm.Engine) dao.SuperCloudIssuanceUserRobotBindSourceDao { + return &SuperCloudIssuanceUserRobotBindSourceDb{Db: engine} +} + +type SuperCloudIssuanceUserRobotBindSourceDb struct { + Db *xorm.Engine +} + +func (s SuperCloudIssuanceUserRobotBindSourceDb) FindSuperCloudIssuanceUserRobotBindSource(page, pageSize int) (resp []*dao.FindSuperCloudIssuanceUserRobotBindSourceResponse, total int64, err error) { + total, err = s.Db.Table("super_cloud_issuance_user_robot_bind_source"). + Join("LEFT", "super_cloud_issuance_user_robot_with_activate_group", "super_cloud_issuance_user_robot_bind_source.activate_group_id = super_cloud_issuance_user_robot_with_activate_group.id"). + OrderBy("super_cloud_issuance_user_robot_bind_source.id DESC"). + Cols("super_cloud_issuance_user_robot_bind_source.*, super_cloud_issuance_user_robot_with_activate_group.*"). + Limit(pageSize, (page-1)*pageSize). + FindAndCount(&resp) + return +} + +func (s SuperCloudIssuanceUserRobotBindSourceDb) GetSuperCloudIssuanceUserRobotBindSource(activityGroupId int) (m *models.SuperCloudIssuanceUserRobotBindSource, err error) { + m = new(models.SuperCloudIssuanceUserRobotBindSource) + has, err := s.Db.Where("activate_group_id =?", activityGroupId).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/implement/super_cloud_issuance_user_robot_bind_source_follow_group_db.go b/src/implement/super_cloud_issuance_user_robot_bind_source_follow_group_db.go new file mode 100644 index 0000000..0b45909 --- /dev/null +++ b/src/implement/super_cloud_issuance_user_robot_bind_source_follow_group_db.go @@ -0,0 +1,23 @@ +package implement + +import ( + "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" + "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" + "xorm.io/xorm" +) + +func NewSuperCloudIssuanceUserRobotBindSourceFollowGroupDb(engine *xorm.Engine) dao.SuperCloudIssuanceUserRobotBindSourceFollowGroupDao { + return &SuperCloudIssuanceUserRobotBindSourceFollowGroupDb{Db: engine} +} + +type SuperCloudIssuanceUserRobotBindSourceFollowGroupDb struct { + Db *xorm.Engine +} + +func (s SuperCloudIssuanceUserRobotBindSourceFollowGroupDb) BatchAddSuperCloudIssuanceUserRobotBindSourceFollowGroups(data []*models.SuperCloudIssuanceUserRobotBindSourceFollowGroup) (int64, error) { + affected, err := s.Db.Insert(data) + if err != nil { + return 0, err + } + return affected, nil +} diff --git a/src/implement/super_cloud_issuance_user_robot_bind_source_message_log_db.go b/src/implement/super_cloud_issuance_user_robot_bind_source_message_log_db.go new file mode 100644 index 0000000..068e1cc --- /dev/null +++ b/src/implement/super_cloud_issuance_user_robot_bind_source_message_log_db.go @@ -0,0 +1,33 @@ +package implement + +import ( + "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" + "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" + zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils/logx" + "xorm.io/xorm" +) + +func NewSuperCloudIssuanceUserRobotBindSourceMessageLogDb(engine *xorm.Engine) dao.SuperCloudIssuanceUserRobotBindSourceMessageLogDao { + return &SuperCloudIssuanceUserRobotBindSourceMessageLogDb{Db: engine} +} + +type SuperCloudIssuanceUserRobotBindSourceMessageLogDb struct { + Db *xorm.Engine +} + +func (s SuperCloudIssuanceUserRobotBindSourceMessageLogDb) InsertSuperCloudIssuanceUserRobotBindSourceMessageLog(m *models.SuperCloudIssuanceUserRobotBindSourceMessageLog) (id int, err error) { + _, err = s.Db.InsertOne(m) + if err != nil { + return 0, err + } + id = m.Id + return id, nil +} + +func (s SuperCloudIssuanceUserRobotBindSourceMessageLogDb) FindSuperCloudIssuanceUserRobotBindSourceMessageLogs(bindId, page, pageSize int) (m []*models.SuperCloudIssuanceUserRobotBindSourceMessageLog, err error) { + err = s.Db.Where("activate_group_id =? ", bindId).Limit(pageSize, (page-1)*pageSize).OrderBy("id ASC").Find(&m) + if err != nil { + return nil, zhios_order_relate_logx.Error(err) + } + return m, nil +} diff --git a/src/implement/super_cloud_issuance_user_robot_with_activate_group_db.go b/src/implement/super_cloud_issuance_user_robot_with_activate_group_db.go index 1046a2d..ce0e5af 100644 --- a/src/implement/super_cloud_issuance_user_robot_with_activate_group_db.go +++ b/src/implement/super_cloud_issuance_user_robot_with_activate_group_db.go @@ -2,13 +2,48 @@ package implement import ( "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" + "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" + zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils/logx" "xorm.io/xorm" ) +func NewSuperCloudIssuanceUserRobotWithActivateGroupDb(engine *xorm.Engine) dao.SuperCloudIssuanceUserRobotWithActivateGroupDao { + return &SuperCloudIssuanceUserRobotWithActivateGroupDb{Db: engine} +} + type SuperCloudIssuanceUserRobotWithActivateGroupDb struct { Db *xorm.Engine } -func NewSuperCloudIssuanceUserRobotWithActivateGroupDb(engine *xorm.Engine) dao.SuperCloudIssuanceUserRobotWithActivateGroupDao { - return &SuperCloudIssuanceUserRobotWithActivateGroupDb{Db: engine} +func (s SuperCloudIssuanceUserRobotWithActivateGroupDb) DelSuperCloudIssuanceUserRobotWithActivateGroup(id int) (int64, error) { + return s.Db.Where("id = ?", id).Delete(models.SuperCloudIssuanceUserRobotWithActivateGroup{}) +} + +func (s SuperCloudIssuanceUserRobotWithActivateGroupDb) InsertSuperCloudIssuanceUserRobotWithActivateGroup(m *models.SuperCloudIssuanceUserRobotWithActivateGroup) (id int, err error) { + _, err = s.Db.InsertOne(m) + if err != nil { + return 0, err + } + id = m.Id + return id, nil +} + +func (s SuperCloudIssuanceUserRobotWithActivateGroupDb) FindSuperCloudIssuanceUserRobotWithActivateGroup(uid, page, pageSize int) (m []*models.SuperCloudIssuanceUserRobotWithActivateGroup, err error) { + err = s.Db.Where("uid =? ", uid).Limit(pageSize, (page-1)*pageSize).OrderBy("id ASC").Find(&m) + if err != nil { + return nil, zhios_order_relate_logx.Error(err) + } + return m, nil +} + +func (s SuperCloudIssuanceUserRobotWithActivateGroupDb) GetSuperCloudIssuanceUserRobotWithActivateGroupByChatRoomId(chatRoomId string, robotId int) (m *models.SuperCloudIssuanceUserRobotWithActivateGroup, err error) { + m = new(models.SuperCloudIssuanceUserRobotWithActivateGroup) + has, err := s.Db.Where("chat_room_id =? AND robot_id = ? AND state = 1", chatRoomId, robotId).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/models/super_cloud_issuance_user_robot_bind_follow.go b/src/models/super_cloud_issuance_user_robot_bind_follow.go index 48dcd68..2b80cfb 100644 --- a/src/models/super_cloud_issuance_user_robot_bind_follow.go +++ b/src/models/super_cloud_issuance_user_robot_bind_follow.go @@ -2,6 +2,7 @@ package models type SuperCloudIssuanceUserRobotBindFollow struct { Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + ActivateGroupId int `json:"activate_group_id" xorm:"not null default 0 comment('绑定激活群id') INT(11)"` Uid int `json:"uid" xorm:"not null default 0 comment('uid') INT(11)"` Name string `json:"name" xorm:"not null default '' comment('群名称') VARCHAR(255)"` RobotId int `json:"robot_id" xorm:"not null default 0 comment('机器人id') INT(11)"` diff --git a/src/models/super_cloud_issuance_user_robot_bind_follow_group.go b/src/models/super_cloud_issuance_user_robot_bind_follow_group.go index 4b4a22e..d0f6f65 100644 --- a/src/models/super_cloud_issuance_user_robot_bind_follow_group.go +++ b/src/models/super_cloud_issuance_user_robot_bind_follow_group.go @@ -2,7 +2,8 @@ package models type SuperCloudIssuanceUserRobotBindFollowGroup struct { Id int `json:"id" xorm:"not null pk autoincr INT(11)"` - BindId int `json:"bind_id" xorm:"not null default 0 comment('绑定id') INT(11)"` + ActivateGroupId int `json:"activate_group_id" xorm:"not null default 0 comment('绑定激活群id') INT(11)"` + FollowActivateGroupId int `json:"follow_activate_group_id" xorm:"not null default 0 comment('跟发激活群id') INT(11)"` Name string `json:"name" xorm:"not null default '' comment('跟发-群名称') VARCHAR(255)"` FollowChatRoomId string `json:"follow_chat_room_id" xorm:"not null default '' comment('跟发-微信群id') VARCHAR(255)"` FollowChatRoomOwner string `json:"follow_chat_room_owner" xorm:"not null default '' comment('跟发-群所有者') VARCHAR(255)"` diff --git a/src/models/super_cloud_issuance_user_robot_bind_follow_user.go b/src/models/super_cloud_issuance_user_robot_bind_follow_user.go index 7e267d8..0fb6f36 100644 --- a/src/models/super_cloud_issuance_user_robot_bind_follow_user.go +++ b/src/models/super_cloud_issuance_user_robot_bind_follow_user.go @@ -2,7 +2,7 @@ package models type SuperCloudIssuanceUserRobotBindFollowUser struct { Id int `json:"id" xorm:"not null pk autoincr INT(11)"` - BindId int `json:"bind_id" xorm:"not null default 0 comment('绑定id') INT(11)"` + ActivateGroupId int `json:"activate_group_id" xorm:"not null default 0 comment('绑定激活群id') INT(11)"` MonitorHostWxId string `json:"monitor_host_wx_id" xorm:"not null default '' comment('监听主持人微信id') VARCHAR(255)"` MonitorHostWxNickname string `json:"monitor_host_wx_nickname" xorm:"not null default '' comment('监听主持人微信昵称') VARCHAR(255)"` MonitorHostWxHeadUrl string `json:"monitor_host_wx_head_url" xorm:"not null default '' comment('监听主持人微信头像') VARCHAR(255)"` diff --git a/src/models/super_cloud_issuance_user_robot_bind_group.go b/src/models/super_cloud_issuance_user_robot_bind_group.go index 7f65619..2ae1f6a 100644 --- a/src/models/super_cloud_issuance_user_robot_bind_group.go +++ b/src/models/super_cloud_issuance_user_robot_bind_group.go @@ -2,6 +2,7 @@ package models type SuperCloudIssuanceUserRobotBindGroup struct { Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + ActivateGroupId int `json:"activate_group_id" xorm:"not null default 0 comment('绑定激活群id') INT(11)"` Uid int `json:"uid" xorm:"not null default 0 comment('uid') INT(11)"` Name string `json:"name" xorm:"not null default '' comment('群名称') VARCHAR(255)"` RobotId int `json:"robot_id" xorm:"not null default 0 comment('机器人id') INT(11)"` diff --git a/src/models/super_cloud_issuance_user_robot_bind_source_follow_group.go b/src/models/super_cloud_issuance_user_robot_bind_source_follow_group.go new file mode 100644 index 0000000..e76f98f --- /dev/null +++ b/src/models/super_cloud_issuance_user_robot_bind_source_follow_group.go @@ -0,0 +1,15 @@ +package models + +type SuperCloudIssuanceUserRobotBindSourceFollowGroup struct { + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + ActivateGroupId int `json:"activate_group_id" xorm:"not null default 0 comment('绑定激活群id') INT(11)"` + FollowActivateGroupId int `json:"follow_activate_group_id" xorm:"not null default 0 comment('跟发激活群id') INT(11)"` + Name string `json:"name" xorm:"not null default '' comment('跟发-群名称') VARCHAR(255)"` + FollowChatRoomId string `json:"follow_chat_room_id" xorm:"not null default '' comment('跟发-微信群id') VARCHAR(255)"` + FollowChatRoomOwner string `json:"follow_chat_room_owner" xorm:"not null default '' comment('跟发-群所有者') VARCHAR(255)"` + FollowChatMemberCount int `json:"follow_chat_member_count" xorm:"not null default 0 comment('跟发-群群成员数') INT(11)"` + FollowBigHeadImgUrl string `json:"follow_big_head_img_url" xorm:"not null default '' comment('跟发-大的群头像') VARCHAR(255)"` + FollowSmallHeadImgUrl string `json:"follow_small_head_img_url" xorm:"not null default '' comment('跟发-小的群头像') VARCHAR(255)"` + CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('创建时间') DATETIME"` + UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') DATETIME"` +} diff --git a/src/models/super_cloud_issuance_user_robot_bind_source_follow_group_warning.go b/src/models/super_cloud_issuance_user_robot_bind_source_follow_group_warning.go index 441e170..eb88149 100644 --- a/src/models/super_cloud_issuance_user_robot_bind_source_follow_group_warning.go +++ b/src/models/super_cloud_issuance_user_robot_bind_source_follow_group_warning.go @@ -1,10 +1,10 @@ package models type SuperCloudIssuanceUserRobotBindSourceFollowGroupWarning struct { - Id int `json:"id" xorm:"not null pk autoincr INT(11)"` - BindId int `json:"bind_id" xorm:"not null default 0 comment('绑定id') INT(11)"` - FollowId int `json:"follow_id" xorm:"not null default 0 comment('跟随id') INT(11)"` - Content string `json:"content" xorm:"not null default '' comment('内容') VARCHAR(255)"` - CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('创建时间') DATETIME"` - UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') DATETIME"` + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + ActivateGroupId int `json:"activate_group_id" xorm:"not null default 0 comment('绑定激活群id') INT(11)"` + FollowId int `json:"follow_id" xorm:"not null default 0 comment('跟随id') INT(11)"` + Content string `json:"content" xorm:"not null default '' comment('内容') VARCHAR(255)"` + CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('创建时间') DATETIME"` + UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') DATETIME"` } diff --git a/src/models/super_cloud_issuance_user_robot_bind_source_message_log.go b/src/models/super_cloud_issuance_user_robot_bind_source_message_log.go new file mode 100644 index 0000000..b2efaef --- /dev/null +++ b/src/models/super_cloud_issuance_user_robot_bind_source_message_log.go @@ -0,0 +1,11 @@ +package models + +type SuperCloudIssuanceUserRobotBindSourceMessageLog struct { + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + ActivateGroupId int `json:"activate_group_id" xorm:"not null default 0 comment('绑定激活群id') INT(11)"` + MessageType int `json:"message_type" xorm:"not null default 0 comment('消息类型(0:其他 9:群聊文本消息 10:群聊图片消息 11:群聊视频消息)') TINYINT(11)"` + Timestamp int64 `json:"timestamp" xorm:"not null default 0 comment('时间') BIGINT(20)"` + Content string `json:"content" xorm:"not null comment('消息体') TEXT"` + CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('创建时间') DATETIME"` + UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') DATETIME"` +} diff --git a/src/models/super_cloud_issuance_user_robot_with_activate_group.go b/src/models/super_cloud_issuance_user_robot_with_activate_group.go index 526ebaa..6111997 100644 --- a/src/models/super_cloud_issuance_user_robot_with_activate_group.go +++ b/src/models/super_cloud_issuance_user_robot_with_activate_group.go @@ -5,6 +5,7 @@ type SuperCloudIssuanceUserRobotWithActivateGroup struct { Uid int `json:"uid" xorm:"not null default 0 comment('uid') INT(11)"` Name string `json:"name" xorm:"not null default '' comment('群名称') VARCHAR(255)"` RobotId int `json:"robot_id" xorm:"not null default 0 comment('机器人id') INT(11)"` + ChatRoomId string `json:"chat_room_id" xorm:"not null default '' comment('微信群id') VARCHAR(255)"` ChatRoomOwnerWxNickname string `json:"chat_room_owner_wx_nickname" xorm:"not null default '' comment('群所有者微信昵称') VARCHAR(255)"` ChatRoomOwnerWxHeadUrl string `json:"chat_room_owner_wx_head_url" xorm:"not null default '' comment('群所有者微信头像') VARCHAR(255)"` ChatRoomOwner string `json:"chat_room_owner" xorm:"not null default '' comment('群所有者') VARCHAR(255)"` diff --git a/super_cloud_issuance/md/md_request.go b/super_cloud_issuance/md/md_request.go index 5e89852..0f3885c 100644 --- a/super_cloud_issuance/md/md_request.go +++ b/super_cloud_issuance/md/md_request.go @@ -18,3 +18,36 @@ type BuyPackageRecordsResponse struct { CreateAt string `json:"create_at" ` UpdateAt string `json:"update_at" ` } +type ActivityGroupListRequest struct { + Page int `json:"page"` + Limit int `json:"limit"` +} +type AddActivityGroupRequest struct { + Name string `json:"name"` + ChatRoomId string `json:"chat_room_id"` + ChatRoomOwnerWxNickname string `json:"chat_room_owner_wx_nickname"` + ChatRoomOwnerWxHeadUrl string `json:"chat_room_owner_wx_head_url"` + ChatRoomOwner string `json:"chat_room_owner"` + MemberCount int `json:"member_count"` + BigHeadImgUrl string `json:"big_head_img_url"` + SmallHeadImgUrl string `json:"small_head_img_url"` +} +type SourceGroupListRequest struct { + Page int `json:"page"` + Limit int `json:"limit"` +} +type PreviewSourceRequest struct { + ActivateGroupId int `json:"activate_group_id"` + Page int `json:"page"` + Limit int `json:"limit"` +} +type JoinSourceGroupRequest struct { + FollowActivateGroupId int `json:"follow_activate_group_id"` + Name string `json:"name"` + FollowChatRoomId string `json:"follow_chat_room_id"` + FollowChatRoomOwner string `json:"follow_chat_room_owner"` + FollowChatMemberCount int `json:"follow_chat_member_count"` + FollowBigHeadImgUrl string `json:"follow_big_head_img_url"` + FollowSmallHeadImgUrl string `json:"follow_small_head_img_url"` + JoinActivateGroupIds []int `json:"activate_group_id"` +}