From f533f5e7e4a0f217b0cbeb659ae3db724b12a646 Mon Sep 17 00:00:00 2001 From: dengbiao Date: Thu, 27 Jun 2024 22:39:28 +0800 Subject: [PATCH] update --- go.mod | 1 + ..._issuance_add_group_welcome_message_dao.go | 29 ++++ ...e_keyword_reply_with_activate_group_dao.go | 27 ++++ ...word_reply_with_activate_group_list_dao.go | 8 + ...suance_user_group_manage_black_list_dao.go | 30 ++++ ...roup_manage_black_list_with_wx_user_dao.go | 10 ++ ...er_cloud_issuance_user_group_manage_dao.go | 9 ++ ...suance_user_group_manage_white_list_dao.go | 30 ++++ ...roup_manage_white_list_with_wx_user_dao.go | 10 ++ ...oud_issuance_user_robot_bind_follow_dao.go | 25 ++- ...suance_user_robot_bind_follow_group_dao.go | 1 + ...ssuance_user_robot_bind_follow_user_dao.go | 2 +- ...ance_user_robot_with_activate_group_dao.go | 4 +- ...d_issuance_add_group_welcome_message_db.go | 65 ++++++++ ...ce_keyword_reply_with_activate_group_db.go | 65 ++++++++ ...yword_reply_with_activate_group_list_db.go | 32 ++++ ...ssuance_user_group_manage_black_list_db.go | 76 +++++++++ ...group_manage_black_list_with_wx_user_db.go | 46 ++++++ ...per_cloud_issuance_user_group_manage_db.go | 46 ++++++ ...ssuance_user_group_manage_white_list_db.go | 76 +++++++++ ...group_manage_white_list_with_wx_user_db.go | 46 ++++++ ...loud_issuance_user_robot_bind_follow_db.go | 38 +++++ ...ssuance_user_robot_bind_follow_group_db.go | 35 +++++ ...issuance_user_robot_bind_follow_user_db.go | 35 +++++ ...loud_issuance_user_robot_bind_source_db.go | 9 +- ...uance_user_robot_with_activate_group_db.go | 39 ++++- ...loud_issuance_add_group_welcome_message.go | 14 ++ ...uance_keyword_reply_with_activate_group.go | 10 ++ ..._keyword_reply_with_activate_group_list.go | 11 ++ .../super_cloud_issuance_user_group_manage.go | 14 ++ ...d_issuance_user_group_manage_black_list.go | 13 ++ ...er_group_manage_black_list_with_wx_user.go | 10 ++ ...d_issuance_user_group_manage_white_list.go | 13 ++ ...er_group_manage_white_list_with_wx_user.go | 10 ++ super_cloud_issuance/md/md_request.go | 144 +++++++++++++++++- 35 files changed, 1020 insertions(+), 13 deletions(-) create mode 100644 src/dao/super_cloud_issuance_add_group_welcome_message_dao.go create mode 100644 src/dao/super_cloud_issuance_keyword_reply_with_activate_group_dao.go create mode 100644 src/dao/super_cloud_issuance_keyword_reply_with_activate_group_list_dao.go create mode 100644 src/dao/super_cloud_issuance_user_group_manage_black_list_dao.go create mode 100644 src/dao/super_cloud_issuance_user_group_manage_black_list_with_wx_user_dao.go create mode 100644 src/dao/super_cloud_issuance_user_group_manage_dao.go create mode 100644 src/dao/super_cloud_issuance_user_group_manage_white_list_dao.go create mode 100644 src/dao/super_cloud_issuance_user_group_manage_white_list_with_wx_user_dao.go create mode 100644 src/implement/super_cloud_issuance_add_group_welcome_message_db.go create mode 100644 src/implement/super_cloud_issuance_keyword_reply_with_activate_group_db.go create mode 100644 src/implement/super_cloud_issuance_keyword_reply_with_activate_group_list_db.go create mode 100644 src/implement/super_cloud_issuance_user_group_manage_black_list_db.go create mode 100644 src/implement/super_cloud_issuance_user_group_manage_black_list_with_wx_user_db.go create mode 100644 src/implement/super_cloud_issuance_user_group_manage_db.go create mode 100644 src/implement/super_cloud_issuance_user_group_manage_white_list_db.go create mode 100644 src/implement/super_cloud_issuance_user_group_manage_white_list_with_wx_user_db.go create mode 100644 src/models/super_cloud_issuance_add_group_welcome_message.go create mode 100644 src/models/super_cloud_issuance_keyword_reply_with_activate_group.go create mode 100644 src/models/super_cloud_issuance_keyword_reply_with_activate_group_list.go create mode 100644 src/models/super_cloud_issuance_user_group_manage.go create mode 100644 src/models/super_cloud_issuance_user_group_manage_black_list.go create mode 100644 src/models/super_cloud_issuance_user_group_manage_black_list_with_wx_user.go create mode 100644 src/models/super_cloud_issuance_user_group_manage_white_list.go create mode 100644 src/models/super_cloud_issuance_user_group_manage_white_list_with_wx_user.go diff --git a/go.mod b/go.mod index 8467dc6..9ebbcb2 100644 --- a/go.mod +++ b/go.mod @@ -15,6 +15,7 @@ require ( filippo.io/edwards25519 v1.1.0 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/golang/snappy v0.0.4 // indirect + github.com/jinzhu/copier v0.4.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect diff --git a/src/dao/super_cloud_issuance_add_group_welcome_message_dao.go b/src/dao/super_cloud_issuance_add_group_welcome_message_dao.go new file mode 100644 index 0000000..709ba43 --- /dev/null +++ b/src/dao/super_cloud_issuance_add_group_welcome_message_dao.go @@ -0,0 +1,29 @@ +package dao + +import ( + "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" +) + +type SuperCloudIssuanceAddGroupWelcomeMessageDao interface { + GetSuperCloudIssuanceAddGroupWelcomeMessage(activateGroupId int) (m *models.SuperCloudIssuanceAddGroupWelcomeMessage, err error) + FindSuperCloudIssuanceAddGroupWelcomeMessage(uid, page, pageSize int) (m []*FindSuperCloudIssuanceAddGroupWelcomeMessageResponse, total int64, err error) + InsertSuperCloudIssuanceAddGroupWelcomeMessage(m *models.SuperCloudIssuanceAddGroupWelcomeMessage) (id int, err error) + SaveSuperCloudIssuanceAddGroupWelcomeMessage(id interface{}, m *models.SuperCloudIssuanceAddGroupWelcomeMessage, forceColums ...string) (affected int64, err error) +} + +type FindSuperCloudIssuanceAddGroupWelcomeMessageResponse struct { + Id int `json:"id" xorm:"not null pk autoincr comment('自增id') INT(11)"` + ActivateGroupId int `json:"activate_group_id" xorm:"not null default 0 comment('绑定激活群id') INT(11)"` + Content string `json:"content" xorm:"not null default '' comment('内容') VARCHAR(255)"` + State int `json:"state" xorm:"not null default 1 comment('状态(1正常 2暂停)') TINYINT(1)"` + CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('创建时间') DATETIME"` + UpdateAt string `json:"update_at" xorm:"default 'CURRENT_TIMESTAMP' comment('更新时间') DATETIME"` + Uid int `json:"uid"` + Name string `json:"name"` + RobotId int `json:"robot_id"` + ChatRoomId string `json:"chat_room_id"` + 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"` +} diff --git a/src/dao/super_cloud_issuance_keyword_reply_with_activate_group_dao.go b/src/dao/super_cloud_issuance_keyword_reply_with_activate_group_dao.go new file mode 100644 index 0000000..7e2d4d8 --- /dev/null +++ b/src/dao/super_cloud_issuance_keyword_reply_with_activate_group_dao.go @@ -0,0 +1,27 @@ +package dao + +import "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" + +type SuperCloudIssuanceKeywordReplyWithActivateGroupDao interface { + GetSuperCloudIssuanceKeywordReplyWithActivateGroup(activateGroupId int) (m *models.SuperCloudIssuanceKeywordReplyWithActivateGroup, err error) + FindSuperCloudIssuanceKeywordReplyWithActivateGroup(uid, page, pageSize int) (m []*FindSuperCloudIssuanceKeywordReplyWithActivateGroupResponse, total int64, err error) + InsertSuperCloudIssuanceKeywordReplyWithActivateGroup(m *models.SuperCloudIssuanceKeywordReplyWithActivateGroup) (id int, err error) + SaveSuperCloudIssuanceKeywordReplyWithActivateGroup(id interface{}, m *models.SuperCloudIssuanceKeywordReplyWithActivateGroup, forceColums ...string) (affected int64, err error) +} + +type FindSuperCloudIssuanceKeywordReplyWithActivateGroupResponse struct { + Id int `json:"id" xorm:"not null pk autoincr comment('自增id') INT(11)"` + ActivateGroupId int `json:"activate_group_id" xorm:"not null default 0 comment('绑定激活群id') INT(11)"` + State int `json:"state" xorm:"not null default 1 comment('状态(1正常 2暂停)') TINYINT(1)"` + IsFollowOfficial int `json:"is_follow_official"` + CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('创建时间') DATETIME"` + UpdateAt string `json:"update_at" xorm:"default 'CURRENT_TIMESTAMP' comment('更新时间') DATETIME"` + Uid int `json:"uid"` + Name string `json:"name"` + RobotId int `json:"robot_id"` + ChatRoomId string `json:"chat_room_id"` + 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"` +} diff --git a/src/dao/super_cloud_issuance_keyword_reply_with_activate_group_list_dao.go b/src/dao/super_cloud_issuance_keyword_reply_with_activate_group_list_dao.go new file mode 100644 index 0000000..1dfa302 --- /dev/null +++ b/src/dao/super_cloud_issuance_keyword_reply_with_activate_group_list_dao.go @@ -0,0 +1,8 @@ +package dao + +import "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" + +type SuperCloudIssuanceKeywordReplyWithActivateGroupListDao interface { + BatchAddSuperCloudIssuanceUserRobotBindSourceFollowGroups(data []*models.SuperCloudIssuanceKeywordReplyWithActivateGroupList) (int64, error) + FindSuperCloudIssuanceKeywordReplyWithActivateGroupList(activateGroupId int) (mm *[]models.SuperCloudIssuanceKeywordReplyWithActivateGroupList, err error) +} diff --git a/src/dao/super_cloud_issuance_user_group_manage_black_list_dao.go b/src/dao/super_cloud_issuance_user_group_manage_black_list_dao.go new file mode 100644 index 0000000..112b851 --- /dev/null +++ b/src/dao/super_cloud_issuance_user_group_manage_black_list_dao.go @@ -0,0 +1,30 @@ +package dao + +import ( + "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" +) + +type SuperCloudIssuanceUserGroupManageBlackListDao interface { + FindSuperCloudIssuanceUserGroupManageBlackList(uid int, name string) (resp []*FindSuperCloudIssuanceUserGroupManageBlackListResponse, err error) + FindAndCountSuperCloudIssuanceUserGroupManageBlackList(uid int) (m []*models.SuperCloudIssuanceUserGroupManageBlackList, total int64, err error) + SaveSuperCloudIssuanceUserGroupManageBlackList(id interface{}, m *models.SuperCloudIssuanceUserGroupManageBlackList, forceColums ...string) (affected int64, err error) + BatchSuperCloudIssuanceUserGroupManageBlackList(list []*models.SuperCloudIssuanceUserGroupManageBlackList) (int64, error) + SuperCloudIssuanceUserGroupManageBlackListDelete(id interface{}) (int64, error) +} + +type FindSuperCloudIssuanceUserGroupManageBlackListResponse struct { + Id int `json:"id" xorm:"pk autoincr INT(11)"` + Uid int `json:"uid" xorm:"not null default 0 comment('uid') INT(11)"` + ActivateGroupId int `json:"activate_group_id"` + 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"` + 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)"` + 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_group_manage_black_list_with_wx_user_dao.go b/src/dao/super_cloud_issuance_user_group_manage_black_list_with_wx_user_dao.go new file mode 100644 index 0000000..4718928 --- /dev/null +++ b/src/dao/super_cloud_issuance_user_group_manage_black_list_with_wx_user_dao.go @@ -0,0 +1,10 @@ +package dao + +import "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" + +type SuperCloudIssuanceUserGroupManageBlackListWithWxUserDao interface { + FindAndCountSuperCloudIssuanceUserGroupManageBlackListWithWxUser(activateGroupId int) (m []*models.SuperCloudIssuanceUserGroupManageBlackListWithWxUser, total int64, err error) + SaveSuperCloudIssuanceUserGroupManageBlackListWithWxUser(id interface{}, m *models.SuperCloudIssuanceUserGroupManageBlackListWithWxUser, forceColums ...string) (affected int64, err error) + BatchSuperCloudIssuanceUserGroupManageBlackListWithWxUser(list []*models.SuperCloudIssuanceUserGroupManageBlackListWithWxUser) (int64, error) + SuperCloudIssuanceUserGroupManageBlackListWithWxUserDelete(id interface{}) (int64, error) +} diff --git a/src/dao/super_cloud_issuance_user_group_manage_dao.go b/src/dao/super_cloud_issuance_user_group_manage_dao.go new file mode 100644 index 0000000..9f1b308 --- /dev/null +++ b/src/dao/super_cloud_issuance_user_group_manage_dao.go @@ -0,0 +1,9 @@ +package dao + +import "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" + +type SuperCloudIssuanceUserGroupManageDao interface { + InsertSuperCloudIssuanceUserGroupManage(m *models.SuperCloudIssuanceUserGroupManage) (id int, err error) + GetSuperCloudIssuanceUserGroupManage(uid int) (m *models.SuperCloudIssuanceUserGroupManage, err error) + SaveSuperCloudIssuanceUserGroupManage(id interface{}, m *models.SuperCloudIssuanceUserGroupManage, forceColums ...string) (affected int64, err error) +} diff --git a/src/dao/super_cloud_issuance_user_group_manage_white_list_dao.go b/src/dao/super_cloud_issuance_user_group_manage_white_list_dao.go new file mode 100644 index 0000000..9c5993e --- /dev/null +++ b/src/dao/super_cloud_issuance_user_group_manage_white_list_dao.go @@ -0,0 +1,30 @@ +package dao + +import ( + "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" +) + +type SuperCloudIssuanceUserGroupManageWhiteListDao interface { + FindSuperCloudIssuanceUserGroupManageWhiteList(uid int, name string) (resp []*FindSuperCloudIssuanceUserGroupManageWhiteListResponse, err error) + FindAndCountSuperCloudIssuanceUserGroupManageWhiteList(uid int) (m []*models.SuperCloudIssuanceUserGroupManageWhiteList, total int64, err error) + SaveSuperCloudIssuanceUserGroupManageWhiteList(id interface{}, m *models.SuperCloudIssuanceUserGroupManageWhiteList, forceColums ...string) (affected int64, err error) + BatchSuperCloudIssuanceUserGroupManageWhiteList(list []*models.SuperCloudIssuanceUserGroupManageWhiteList) (int64, error) + SuperCloudIssuanceUserGroupManageWhiteListDelete(id interface{}) (int64, error) +} + +type FindSuperCloudIssuanceUserGroupManageWhiteListResponse struct { + Id int `json:"id" xorm:"pk autoincr INT(11)"` + Uid int `json:"uid" xorm:"not null default 0 comment('uid') INT(11)"` + ActivateGroupId int `json:"activate_group_id"` + 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"` + 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)"` + 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_group_manage_white_list_with_wx_user_dao.go b/src/dao/super_cloud_issuance_user_group_manage_white_list_with_wx_user_dao.go new file mode 100644 index 0000000..74153f2 --- /dev/null +++ b/src/dao/super_cloud_issuance_user_group_manage_white_list_with_wx_user_dao.go @@ -0,0 +1,10 @@ +package dao + +import "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" + +type SuperCloudIssuanceUserGroupManageWhiteListWithWxUserDao interface { + FindAndCountSuperCloudIssuanceUserGroupManageWhiteListWithWxUser(uid int) (m []*models.SuperCloudIssuanceUserGroupManageWhiteListWithWxUser, total int64, err error) + SaveSuperCloudIssuanceUserGroupManageWhiteListWithWxUser(id interface{}, m *models.SuperCloudIssuanceUserGroupManageWhiteListWithWxUser, forceColums ...string) (affected int64, err error) + BatchSuperCloudIssuanceUserGroupManageWhiteListWithWxUser(list []*models.SuperCloudIssuanceUserGroupManageWhiteListWithWxUser) (int64, error) + SuperCloudIssuanceUserGroupManageWhiteListWithWxUserDelete(id interface{}) (int64, error) +} diff --git a/src/dao/super_cloud_issuance_user_robot_bind_follow_dao.go b/src/dao/super_cloud_issuance_user_robot_bind_follow_dao.go index 7227567..8d377c1 100644 --- a/src/dao/super_cloud_issuance_user_robot_bind_follow_dao.go +++ b/src/dao/super_cloud_issuance_user_robot_bind_follow_dao.go @@ -1,6 +1,9 @@ package dao -import "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" +import ( + "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" + "time" +) type SuperCloudIssuanceUserRobotBindFollowDao interface { GetCloudIssuanceUserRobotBindFollow(id int) (m *models.SuperCloudIssuanceUserRobotBindFollow, err error) @@ -9,5 +12,23 @@ type SuperCloudIssuanceUserRobotBindFollowDao interface { SaveCloudIssuanceUserRobotBindFollow(id interface{}, m *models.SuperCloudIssuanceUserRobotBindFollow, forceColums ...string) (affected int64, err error) DeleteCloudIssuanceUserRobotBindFollow(id interface{}) (affected int64, err error) CountCloudIssuanceUserRobotBindFollow(uid int) (total int64, err error) - //FindCloudIssuanceUserRobotBindFollow() (list []*CloudIssuanceUserRobotBindFollowList, err error) + FindCloudIssuanceUserRobotBindFollow(uid int) (list []*CloudIssuanceUserRobotBindFollowList, err error) +} + +type CloudIssuanceUserRobotBindFollowList struct { + Id int `json:"id" xorm:"pk autoincr INT(11)"` + ActivateGroupId int `json:"activate_group_id"` + Uid int `json:"uid" xorm:"not null default 0 comment('用户id') INT(11)"` + Name string `json:"name" xorm:"comment('群名称')"` + RobotId int `json:"robot_id" xorm:"comment('机器人id')"` + ChatRoomId string `json:"chat_room_id" xorm:"comment('发送微信好友/群id')"` + ChatRoomOwner string `json:"chat_room_owner" xorm:"comment('群所有者')"` + MemberCount int `json:"member_count" xorm:"comment('群成员数')"` + BigHeadImgUrl string `json:"big_head_img_url" xorm:"comment('大的群头像')"` + SmallHeadImgUrl string `json:"small_head_img_url" xorm:"comment('小的群头像')"` + State int `json:"state" xorm:"not null default 1 comment('状态(1正常 2暂停)') TINYINT(1)"` + CreateAt time.Time `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('创建时间') DATETIME"` + UpdateAt time.Time `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('更新时间') DATETIME"` + FollowUserList []*models.SuperCloudIssuanceUserRobotBindFollowUser `json:"follow_user_list"` + FollowGroupList []*models.SuperCloudIssuanceUserRobotBindFollowGroup `json:"follow_group_list"` } diff --git a/src/dao/super_cloud_issuance_user_robot_bind_follow_group_dao.go b/src/dao/super_cloud_issuance_user_robot_bind_follow_group_dao.go index bbcb65a..0045a33 100644 --- a/src/dao/super_cloud_issuance_user_robot_bind_follow_group_dao.go +++ b/src/dao/super_cloud_issuance_user_robot_bind_follow_group_dao.go @@ -9,4 +9,5 @@ type SuperCloudIssuanceUserRobotBindFollowGroupDao interface { BatchAddCloudIssuanceUserRobotBindFollowGroups(data []*models.SuperCloudIssuanceUserRobotBindFollowGroup) (int64, error) SaveCloudIssuanceUserRobotBindFollowGroup(id interface{}, m *models.SuperCloudIssuanceUserRobotBindFollowGroup, forceColums ...string) (affected int64, err error) DeleteCloudIssuanceUserRobotBindFollowGroup(bindId interface{}) (affected int64, err error) + FindSuperCloudIssuanceUserRobotBindFollowGroup(params map[string]interface{}) ([]*models.SuperCloudIssuanceUserRobotBindFollowGroup, error) } diff --git a/src/dao/super_cloud_issuance_user_robot_bind_follow_user_dao.go b/src/dao/super_cloud_issuance_user_robot_bind_follow_user_dao.go index aaee626..8fa5315 100644 --- a/src/dao/super_cloud_issuance_user_robot_bind_follow_user_dao.go +++ b/src/dao/super_cloud_issuance_user_robot_bind_follow_user_dao.go @@ -9,5 +9,5 @@ type SuperCloudIssuanceUserRobotBindFollowUserDao interface { BatchAddCloudIssuanceUserRobotBindFollowUsers(data []*models.SuperCloudIssuanceUserRobotBindFollowUser) (int64, error) SaveCloudIssuanceUserRobotBindFollowUser(id interface{}, m *models.SuperCloudIssuanceUserRobotBindFollowUser, forceColums ...string) (affected int64, err error) DeleteCloudIssuanceUserRobotBindFollowUser(bindId interface{}) (affected int64, err error) - //FindCloudIssuanceUserRobotBindFollowUser(params map[string]interface{}) ([]*models.SuperCloudIssuanceUserRobotBindFollowUser, error) + FindSuperCloudIssuanceUserRobotBindFollowUser(params map[string]interface{}) ([]*models.SuperCloudIssuanceUserRobotBindFollowUser, 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 cbf04d4..095695a 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 @@ -4,7 +4,9 @@ import "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" type SuperCloudIssuanceUserRobotWithActivateGroupDao interface { GetSuperCloudIssuanceUserRobotWithActivateGroupByChatRoomId(chatRoomId string, robotId int) (m *models.SuperCloudIssuanceUserRobotWithActivateGroup, err error) - FindSuperCloudIssuanceUserRobotWithActivateGroup(uid, page, pageSize int) (m []*models.SuperCloudIssuanceUserRobotWithActivateGroup, err error) + GetSuperCloudIssuanceUserRobotWithActivateGroup(id int) (m *models.SuperCloudIssuanceUserRobotWithActivateGroup, err error) + FindSuperCloudIssuanceUserRobotWithActivateGroup(uid, page, pageSize int, name string) (m []*models.SuperCloudIssuanceUserRobotWithActivateGroup, err error) InsertSuperCloudIssuanceUserRobotWithActivateGroup(m *models.SuperCloudIssuanceUserRobotWithActivateGroup) (id int, err error) DelSuperCloudIssuanceUserRobotWithActivateGroup(id int) (int64, error) + SaveSuperCloudIssuanceUserRobotWithActivateGroup(id interface{}, m *models.SuperCloudIssuanceUserRobotWithActivateGroup, forceColums ...string) (affected int64, err error) } diff --git a/src/implement/super_cloud_issuance_add_group_welcome_message_db.go b/src/implement/super_cloud_issuance_add_group_welcome_message_db.go new file mode 100644 index 0000000..4fd628b --- /dev/null +++ b/src/implement/super_cloud_issuance_add_group_welcome_message_db.go @@ -0,0 +1,65 @@ +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 NewSuperCloudIssuanceAddGroupWelcomeMessageDb(engine *xorm.Engine) dao.SuperCloudIssuanceAddGroupWelcomeMessageDao { + return &SuperCloudIssuanceAddGroupWelcomeMessageDb{Db: engine} +} + +type SuperCloudIssuanceAddGroupWelcomeMessageDb struct { + Db *xorm.Engine +} + +func (s SuperCloudIssuanceAddGroupWelcomeMessageDb) FindSuperCloudIssuanceAddGroupWelcomeMessage(uid, page, pageSize int) (resp []*dao.FindSuperCloudIssuanceAddGroupWelcomeMessageResponse, total int64, err error) { + total, err = s.Db.Table("super_cloud_issuance_user_robot_with_activate_group"). + Join("LEFT", "super_cloud_issuance_add_group_welcome_message", "super_cloud_issuance_user_robot_with_activate_group.id = super_cloud_issuance_add_group_welcome_message.activate_group_id"). + Where("super_cloud_issuance_user_robot_with_activate_group.uid = ?", uid). + OrderBy("super_cloud_issuance_user_robot_with_activate_group.id DESC"). + Cols("super_cloud_issuance_add_group_welcome_message.*,"+ + " super_cloud_issuance_user_robot_with_activate_group.uid,"+ + " super_cloud_issuance_user_robot_with_activate_group.name,"+ + " super_cloud_issuance_user_robot_with_activate_group.robot_id,"+ + " super_cloud_issuance_user_robot_with_activate_group.chat_room_id,"+ + " super_cloud_issuance_user_robot_with_activate_group.member_count,"+ + " super_cloud_issuance_user_robot_with_activate_group.big_head_img_url,"+ + " super_cloud_issuance_user_robot_with_activate_group.small_head_img_url,"+ + " super_cloud_issuance_user_robot_with_activate_group.chat_room_owner"). + Limit(pageSize, (page-1)*pageSize). + FindAndCount(&resp) + return +} + +func (s SuperCloudIssuanceAddGroupWelcomeMessageDb) GetSuperCloudIssuanceAddGroupWelcomeMessage(activateGroupId int) (m *models.SuperCloudIssuanceAddGroupWelcomeMessage, err error) { + m = new(models.SuperCloudIssuanceAddGroupWelcomeMessage) + has, err := s.Db.Where("activate_group_id =?", activateGroupId).Get(m) + if err != nil { + return nil, zhios_order_relate_logx.Error(err) + } + if has == false { + return nil, nil + } + return m, nil +} + +func (s SuperCloudIssuanceAddGroupWelcomeMessageDb) InsertSuperCloudIssuanceAddGroupWelcomeMessage(m *models.SuperCloudIssuanceAddGroupWelcomeMessage) (id int, err error) { + _, err = s.Db.InsertOne(m) + if err != nil { + return 0, err + } + id = m.Id + return id, nil +} + +func (s SuperCloudIssuanceAddGroupWelcomeMessageDb) SaveSuperCloudIssuanceAddGroupWelcomeMessage(id interface{}, m *models.SuperCloudIssuanceAddGroupWelcomeMessage, forceColums ...string) (affected int64, err error) { + if forceColums != nil { + affected, err = s.Db.Where("id=?", id).Cols(forceColums...).Update(m) + } else { + affected, err = s.Db.Where("id=?", id).Update(m) + } + return +} diff --git a/src/implement/super_cloud_issuance_keyword_reply_with_activate_group_db.go b/src/implement/super_cloud_issuance_keyword_reply_with_activate_group_db.go new file mode 100644 index 0000000..73d1373 --- /dev/null +++ b/src/implement/super_cloud_issuance_keyword_reply_with_activate_group_db.go @@ -0,0 +1,65 @@ +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 NewSuperCloudIssuanceKeywordReplyWithActivateGroupDb(engine *xorm.Engine) dao.SuperCloudIssuanceKeywordReplyWithActivateGroupDao { + return &SuperCloudIssuanceKeywordReplyWithActivateGroupDb{Db: engine} +} + +type SuperCloudIssuanceKeywordReplyWithActivateGroupDb struct { + Db *xorm.Engine +} + +func (s SuperCloudIssuanceKeywordReplyWithActivateGroupDb) GetSuperCloudIssuanceKeywordReplyWithActivateGroup(activateGroupId int) (m *models.SuperCloudIssuanceKeywordReplyWithActivateGroup, err error) { + m = new(models.SuperCloudIssuanceKeywordReplyWithActivateGroup) + has, err := s.Db.Where("activate_group_id =?", activateGroupId).Get(m) + if err != nil { + return nil, zhios_order_relate_logx.Error(err) + } + if has == false { + return nil, nil + } + return m, nil +} + +func (s SuperCloudIssuanceKeywordReplyWithActivateGroupDb) FindSuperCloudIssuanceKeywordReplyWithActivateGroup(uid, page, pageSize int) (resp []*dao.FindSuperCloudIssuanceKeywordReplyWithActivateGroupResponse, total int64, err error) { + total, err = s.Db.Table("super_cloud_issuance_user_robot_with_activate_group"). + Join("LEFT", "super_cloud_issuance_keyword_reply_with_activate_group", "super_cloud_issuance_user_robot_with_activate_group.id = super_cloud_issuance_keyword_reply_with_activate_group.activate_group_id"). + Where("super_cloud_issuance_user_robot_with_activate_group.uid = ?", uid). + OrderBy("super_cloud_issuance_user_robot_with_activate_group.id DESC"). + Cols("super_cloud_issuance_keyword_reply_with_activate_group.*,"+ + " super_cloud_issuance_user_robot_with_activate_group.uid,"+ + " super_cloud_issuance_user_robot_with_activate_group.name,"+ + " super_cloud_issuance_user_robot_with_activate_group.robot_id,"+ + " super_cloud_issuance_user_robot_with_activate_group.chat_room_id,"+ + " super_cloud_issuance_user_robot_with_activate_group.member_count,"+ + " super_cloud_issuance_user_robot_with_activate_group.big_head_img_url,"+ + " super_cloud_issuance_user_robot_with_activate_group.small_head_img_url,"+ + " super_cloud_issuance_user_robot_with_activate_group.chat_room_owner"). + Limit(pageSize, (page-1)*pageSize). + FindAndCount(&resp) + return +} + +func (s SuperCloudIssuanceKeywordReplyWithActivateGroupDb) InsertSuperCloudIssuanceKeywordReplyWithActivateGroup(m *models.SuperCloudIssuanceKeywordReplyWithActivateGroup) (id int, err error) { + _, err = s.Db.InsertOne(m) + if err != nil { + return 0, err + } + id = m.Id + return id, nil +} + +func (s SuperCloudIssuanceKeywordReplyWithActivateGroupDb) SaveSuperCloudIssuanceKeywordReplyWithActivateGroup(id interface{}, m *models.SuperCloudIssuanceKeywordReplyWithActivateGroup, forceColums ...string) (affected int64, err error) { + if forceColums != nil { + affected, err = s.Db.Where("id=?", id).Cols(forceColums...).Update(m) + } else { + affected, err = s.Db.Where("id=?", id).Update(m) + } + return +} diff --git a/src/implement/super_cloud_issuance_keyword_reply_with_activate_group_list_db.go b/src/implement/super_cloud_issuance_keyword_reply_with_activate_group_list_db.go new file mode 100644 index 0000000..11fe2b2 --- /dev/null +++ b/src/implement/super_cloud_issuance_keyword_reply_with_activate_group_list_db.go @@ -0,0 +1,32 @@ +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 NewSuperCloudIssuanceKeywordReplyWithActivateGroupListDb(engine *xorm.Engine) dao.SuperCloudIssuanceKeywordReplyWithActivateGroupListDao { + return &SuperCloudIssuanceKeywordReplyWithActivateGroupListDb{Db: engine} +} + +type SuperCloudIssuanceKeywordReplyWithActivateGroupListDb struct { + Db *xorm.Engine +} + +func (s SuperCloudIssuanceKeywordReplyWithActivateGroupListDb) FindSuperCloudIssuanceKeywordReplyWithActivateGroupList(activateGroupId int) (mm *[]models.SuperCloudIssuanceKeywordReplyWithActivateGroupList, err error) { + var m []models.SuperCloudIssuanceKeywordReplyWithActivateGroupList + if err := s.Db.Where("activate_group_id =?", activateGroupId).Find(&m); err != nil { + return nil, zhios_order_relate_logx.Error(err) + } + return &m, nil +} + +func (s SuperCloudIssuanceKeywordReplyWithActivateGroupListDb) BatchAddSuperCloudIssuanceUserRobotBindSourceFollowGroups(data []*models.SuperCloudIssuanceKeywordReplyWithActivateGroupList) (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_group_manage_black_list_db.go b/src/implement/super_cloud_issuance_user_group_manage_black_list_db.go new file mode 100644 index 0000000..7da5c49 --- /dev/null +++ b/src/implement/super_cloud_issuance_user_group_manage_black_list_db.go @@ -0,0 +1,76 @@ +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" + "reflect" + "xorm.io/xorm" +) + +func NewSuperCloudIssuanceUserGroupManageBlackListDb(engine *xorm.Engine) dao.SuperCloudIssuanceUserGroupManageBlackListDao { + return &SuperCloudIssuanceUserGroupManageBlackListDb{Db: engine} +} + +type SuperCloudIssuanceUserGroupManageBlackListDb struct { + Db *xorm.Engine +} + +func (s SuperCloudIssuanceUserGroupManageBlackListDb) SuperCloudIssuanceUserGroupManageBlackListDelete(id interface{}) (int64, error) { + if reflect.TypeOf(id).Kind() == reflect.Slice { + return s.Db.In("id", id).Delete(models.SuperCloudIssuanceUserGroupManageBlackList{}) + } else { + return s.Db.Where("id = ?", id).Delete(models.SuperCloudIssuanceUserGroupManageBlackList{}) + } +} + +func (s SuperCloudIssuanceUserGroupManageBlackListDb) BatchSuperCloudIssuanceUserGroupManageBlackList(list []*models.SuperCloudIssuanceUserGroupManageBlackList) (int64, error) { + affected, err := s.Db.Insert(list) + if err != nil { + return 0, err + } + return affected, nil +} + +func (s SuperCloudIssuanceUserGroupManageBlackListDb) SaveSuperCloudIssuanceUserGroupManageBlackList(id interface{}, m *models.SuperCloudIssuanceUserGroupManageBlackList, forceColums ...string) (affected int64, err error) { + if forceColums != nil { + affected, err = s.Db.Where("id=?", id).Cols(forceColums...).Update(m) + } else { + affected, err = s.Db.Where("id=?", id).Update(m) + } + return +} + +func (s SuperCloudIssuanceUserGroupManageBlackListDb) FindAndCountSuperCloudIssuanceUserGroupManageBlackList(uid int) (m []*models.SuperCloudIssuanceUserGroupManageBlackList, total int64, err error) { + total, err = s.Db.Where("uid=?", uid).OrderBy("id DESC").FindAndCount(&m) + return +} + +func (s SuperCloudIssuanceUserGroupManageBlackListDb) FindSuperCloudIssuanceUserGroupManageBlackList(uid int, name string) (resp []*dao.FindSuperCloudIssuanceUserGroupManageBlackListResponse, err error) { + if name == "" { + err = s.Db.Table("super_cloud_issuance_user_robot_with_activate_group"). + Join("LEFT", "super_cloud_issuance_user_group_manage_black_list", "super_cloud_issuance_user_robot_with_activate_group.id = super_cloud_issuance_user_group_manage_black_list.activate_group_id"). + Where("super_cloud_issuance_user_robot_with_activate_group.uid = ?", uid). + OrderBy("super_cloud_issuance_user_robot_with_activate_group.id DESC"). + Cols("super_cloud_issuance_user_group_manage_black_list.id, super_cloud_issuance_user_group_manage_black_list.uid," + + "super_cloud_issuance_user_group_manage_black_list.create_at, super_cloud_issuance_user_group_manage_black_list.update_at," + + "super_cloud_issuance_user_robot_with_activate_group.name, super_cloud_issuance_user_robot_with_activate_group.robot_id," + + "super_cloud_issuance_user_robot_with_activate_group.chat_room_id, super_cloud_issuance_user_robot_with_activate_group.chat_room_owner_wx_nickname," + + "super_cloud_issuance_user_robot_with_activate_group.chat_room_owner_wx_head_url, super_cloud_issuance_user_robot_with_activate_group.chat_room_owner," + + "super_cloud_issuance_user_robot_with_activate_group.member_count, super_cloud_issuance_user_robot_with_activate_group.big_head_img_url, super_cloud_issuance_user_robot_with_activate_group.small_head_img_url"). + Find(&resp) + } else { + err = s.Db.Table("super_cloud_issuance_user_robot_with_activate_group"). + Join("LEFT", "super_cloud_issuance_user_group_manage_black_list", "super_cloud_issuance_user_robot_with_activate_group.id = super_cloud_issuance_user_group_manage_black_list.activate_group_id"). + Where("super_cloud_issuance_user_robot_with_activate_group.uid = ?", uid). + And("super_cloud_issuance_user_robot_with_activate_group.name like ?", name). + OrderBy("super_cloud_issuance_user_robot_with_activate_group.id DESC"). + Cols("super_cloud_issuance_user_group_manage_black_list.id, super_cloud_issuance_user_group_manage_black_list.uid," + + "super_cloud_issuance_user_group_manage_black_list.create_at, super_cloud_issuance_user_group_manage_black_list.update_at," + + "super_cloud_issuance_user_robot_with_activate_group.name, super_cloud_issuance_user_robot_with_activate_group.robot_id," + + "super_cloud_issuance_user_robot_with_activate_group.chat_room_id, super_cloud_issuance_user_robot_with_activate_group.chat_room_owner_wx_nickname," + + "super_cloud_issuance_user_robot_with_activate_group.chat_room_owner_wx_head_url, super_cloud_issuance_user_robot_with_activate_group.chat_room_owner," + + "super_cloud_issuance_user_robot_with_activate_group.member_count, super_cloud_issuance_user_robot_with_activate_group.big_head_img_url, super_cloud_issuance_user_robot_with_activate_group.small_head_img_url"). + Find(&resp) + } + return +} diff --git a/src/implement/super_cloud_issuance_user_group_manage_black_list_with_wx_user_db.go b/src/implement/super_cloud_issuance_user_group_manage_black_list_with_wx_user_db.go new file mode 100644 index 0000000..4cd71b4 --- /dev/null +++ b/src/implement/super_cloud_issuance_user_group_manage_black_list_with_wx_user_db.go @@ -0,0 +1,46 @@ +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" + "reflect" + "xorm.io/xorm" +) + +func NewSuperCloudIssuanceUserGroupManageBlackListWithWxUserDb(engine *xorm.Engine) dao.SuperCloudIssuanceUserGroupManageBlackListWithWxUserDao { + return &SuperCloudIssuanceUserGroupManageBlackListWithWxUserDb{Db: engine} +} + +type SuperCloudIssuanceUserGroupManageBlackListWithWxUserDb struct { + Db *xorm.Engine +} + +func (s SuperCloudIssuanceUserGroupManageBlackListWithWxUserDb) FindAndCountSuperCloudIssuanceUserGroupManageBlackListWithWxUser(activateGroupId int) (m []*models.SuperCloudIssuanceUserGroupManageBlackListWithWxUser, total int64, err error) { + total, err = s.Db.Where("activate_group_id=?", activateGroupId).OrderBy("id DESC").FindAndCount(&m) + return +} + +func (s SuperCloudIssuanceUserGroupManageBlackListWithWxUserDb) SaveSuperCloudIssuanceUserGroupManageBlackListWithWxUser(id interface{}, m *models.SuperCloudIssuanceUserGroupManageBlackListWithWxUser, forceColums ...string) (affected int64, err error) { + if forceColums != nil { + affected, err = s.Db.Where("id=?", id).Cols(forceColums...).Update(m) + } else { + affected, err = s.Db.Where("id=?", id).Update(m) + } + return +} + +func (s SuperCloudIssuanceUserGroupManageBlackListWithWxUserDb) BatchSuperCloudIssuanceUserGroupManageBlackListWithWxUser(list []*models.SuperCloudIssuanceUserGroupManageBlackListWithWxUser) (int64, error) { + affected, err := s.Db.Insert(list) + if err != nil { + return 0, err + } + return affected, nil +} + +func (s SuperCloudIssuanceUserGroupManageBlackListWithWxUserDb) SuperCloudIssuanceUserGroupManageBlackListWithWxUserDelete(id interface{}) (int64, error) { + if reflect.TypeOf(id).Kind() == reflect.Slice { + return s.Db.In("id", id).Delete(models.SuperCloudIssuanceUserGroupManageBlackList{}) + } else { + return s.Db.Where("id = ?", id).Delete(models.SuperCloudIssuanceUserGroupManageBlackList{}) + } +} diff --git a/src/implement/super_cloud_issuance_user_group_manage_db.go b/src/implement/super_cloud_issuance_user_group_manage_db.go new file mode 100644 index 0000000..ac72e51 --- /dev/null +++ b/src/implement/super_cloud_issuance_user_group_manage_db.go @@ -0,0 +1,46 @@ +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 NewSuperCloudIssuanceUserGroupManageDb(engine *xorm.Engine) dao.SuperCloudIssuanceUserGroupManageDao { + return &SuperCloudIssuanceUserGroupManageDb{Db: engine} +} + +type SuperCloudIssuanceUserGroupManageDb struct { + Db *xorm.Engine +} + +func (s SuperCloudIssuanceUserGroupManageDb) SaveSuperCloudIssuanceUserGroupManage(id interface{}, m *models.SuperCloudIssuanceUserGroupManage, forceColums ...string) (affected int64, err error) { + if forceColums != nil { + affected, err = s.Db.Where("id=?", id).Cols(forceColums...).Update(m) + } else { + affected, err = s.Db.Where("id=?", id).Update(m) + } + return +} + +func (s SuperCloudIssuanceUserGroupManageDb) InsertSuperCloudIssuanceUserGroupManage(m *models.SuperCloudIssuanceUserGroupManage) (id int, err error) { + _, err = s.Db.InsertOne(m) + if err != nil { + return 0, err + } + id = m.Id + return id, nil +} + +func (s SuperCloudIssuanceUserGroupManageDb) GetSuperCloudIssuanceUserGroupManage(uid int) (m *models.SuperCloudIssuanceUserGroupManage, err error) { + m = new(models.SuperCloudIssuanceUserGroupManage) + has, err := s.Db.Where("uid =?", uid).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_group_manage_white_list_db.go b/src/implement/super_cloud_issuance_user_group_manage_white_list_db.go new file mode 100644 index 0000000..a09a32a --- /dev/null +++ b/src/implement/super_cloud_issuance_user_group_manage_white_list_db.go @@ -0,0 +1,76 @@ +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" + "reflect" + "xorm.io/xorm" +) + +func NewSuperCloudIssuanceUserGroupManageWhiteListDb(engine *xorm.Engine) dao.SuperCloudIssuanceUserGroupManageWhiteListDao { + return &SuperCloudIssuanceUserGroupManageWhiteListDb{Db: engine} +} + +type SuperCloudIssuanceUserGroupManageWhiteListDb struct { + Db *xorm.Engine +} + +func (s SuperCloudIssuanceUserGroupManageWhiteListDb) SuperCloudIssuanceUserGroupManageWhiteListDelete(id interface{}) (int64, error) { + if reflect.TypeOf(id).Kind() == reflect.Slice { + return s.Db.In("id", id).Delete(models.SuperCloudIssuanceUserGroupManageWhiteList{}) + } else { + return s.Db.Where("id = ?", id).Delete(models.SuperCloudIssuanceUserGroupManageWhiteList{}) + } +} + +func (s SuperCloudIssuanceUserGroupManageWhiteListDb) BatchSuperCloudIssuanceUserGroupManageWhiteList(list []*models.SuperCloudIssuanceUserGroupManageWhiteList) (int64, error) { + affected, err := s.Db.Insert(list) + if err != nil { + return 0, err + } + return affected, nil +} + +func (s SuperCloudIssuanceUserGroupManageWhiteListDb) SaveSuperCloudIssuanceUserGroupManageWhiteList(id interface{}, m *models.SuperCloudIssuanceUserGroupManageWhiteList, forceColums ...string) (affected int64, err error) { + if forceColums != nil { + affected, err = s.Db.Where("id=?", id).Cols(forceColums...).Update(m) + } else { + affected, err = s.Db.Where("id=?", id).Update(m) + } + return +} + +func (s SuperCloudIssuanceUserGroupManageWhiteListDb) FindAndCountSuperCloudIssuanceUserGroupManageWhiteList(uid int) (m []*models.SuperCloudIssuanceUserGroupManageWhiteList, total int64, err error) { + total, err = s.Db.Where("uid=?", uid).OrderBy("id DESC").FindAndCount(&m) + return +} + +func (s SuperCloudIssuanceUserGroupManageWhiteListDb) FindSuperCloudIssuanceUserGroupManageWhiteList(uid int, name string) (resp []*dao.FindSuperCloudIssuanceUserGroupManageWhiteListResponse, err error) { + if name == "" { + err = s.Db.Table("super_cloud_issuance_user_robot_with_activate_group"). + Join("LEFT", "super_cloud_issuance_user_group_manage_white_list", "super_cloud_issuance_user_robot_with_activate_group.id = super_cloud_issuance_user_group_manage_white_list.activate_group_id"). + Where("super_cloud_issuance_user_robot_with_activate_group.uid = ?", uid). + OrderBy("super_cloud_issuance_user_robot_with_activate_group.id DESC"). + Cols("super_cloud_issuance_user_group_manage_white_list.id, super_cloud_issuance_user_group_manage_white_list.uid," + + "super_cloud_issuance_user_group_manage_white_list.create_at, super_cloud_issuance_user_group_manage_white_list.update_at," + + "super_cloud_issuance_user_robot_with_activate_group.name, super_cloud_issuance_goods_category.robot_id," + + "super_cloud_issuance_user_robot_with_activate_group.chat_room_id, super_cloud_issuance_goods_category.chat_room_owner_wx_nickname," + + "super_cloud_issuance_user_robot_with_activate_group.chat_room_owner_wx_head_url, super_cloud_issuance_user_robot_with_activate_group.chat_room_owner," + + "super_cloud_issuance_user_robot_with_activate_group.member_count, super_cloud_issuance_user_robot_with_activate_group.big_head_img_url, super_cloud_issuance_user_robot_with_activate_group.small_head_img_url"). + Find(&resp) + } else { + err = s.Db.Table("super_cloud_issuance_user_robot_with_activate_group"). + Join("LEFT", "super_cloud_issuance_user_group_manage_white_list", "super_cloud_issuance_user_robot_with_activate_group.id = super_cloud_issuance_user_group_manage_white_list.activate_group_id"). + Where("super_cloud_issuance_user_robot_with_activate_group.uid = ?", uid). + And("super_cloud_issuance_user_robot_with_activate_group.name like ?", name). + OrderBy("super_cloud_issuance_user_robot_with_activate_group.id DESC"). + Cols("super_cloud_issuance_user_group_manage_white_list.id, super_cloud_issuance_user_group_manage_white_list.uid," + + "super_cloud_issuance_user_group_manage_white_list.create_at, super_cloud_issuance_user_group_manage_white_list.update_at," + + "super_cloud_issuance_user_robot_with_activate_group.name, super_cloud_issuance_goods_category.robot_id," + + "super_cloud_issuance_user_robot_with_activate_group.chat_room_id, super_cloud_issuance_goods_category.chat_room_owner_wx_nickname," + + "super_cloud_issuance_user_robot_with_activate_group.chat_room_owner_wx_head_url, super_cloud_issuance_user_robot_with_activate_group.chat_room_owner," + + "super_cloud_issuance_user_robot_with_activate_group.member_count, super_cloud_issuance_user_robot_with_activate_group.big_head_img_url, super_cloud_issuance_user_robot_with_activate_group.small_head_img_url"). + Find(&resp) + } + return +} diff --git a/src/implement/super_cloud_issuance_user_group_manage_white_list_with_wx_user_db.go b/src/implement/super_cloud_issuance_user_group_manage_white_list_with_wx_user_db.go new file mode 100644 index 0000000..fdbe9f4 --- /dev/null +++ b/src/implement/super_cloud_issuance_user_group_manage_white_list_with_wx_user_db.go @@ -0,0 +1,46 @@ +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" + "reflect" + "xorm.io/xorm" +) + +func NewSuperCloudIssuanceUserGroupManageWhiteListWithWxUserDb(engine *xorm.Engine) dao.SuperCloudIssuanceUserGroupManageWhiteListWithWxUserDao { + return &SuperCloudIssuanceUserGroupManageWhiteListWithWxUserDb{Db: engine} +} + +type SuperCloudIssuanceUserGroupManageWhiteListWithWxUserDb struct { + Db *xorm.Engine +} + +func (s SuperCloudIssuanceUserGroupManageWhiteListWithWxUserDb) FindAndCountSuperCloudIssuanceUserGroupManageWhiteListWithWxUser(uid int) (m []*models.SuperCloudIssuanceUserGroupManageWhiteListWithWxUser, total int64, err error) { + total, err = s.Db.Where("uid=?", uid).OrderBy("id DESC").FindAndCount(&m) + return +} + +func (s SuperCloudIssuanceUserGroupManageWhiteListWithWxUserDb) SaveSuperCloudIssuanceUserGroupManageWhiteListWithWxUser(id interface{}, m *models.SuperCloudIssuanceUserGroupManageWhiteListWithWxUser, forceColums ...string) (affected int64, err error) { + if forceColums != nil { + affected, err = s.Db.Where("id=?", id).Cols(forceColums...).Update(m) + } else { + affected, err = s.Db.Where("id=?", id).Update(m) + } + return +} + +func (s SuperCloudIssuanceUserGroupManageWhiteListWithWxUserDb) BatchSuperCloudIssuanceUserGroupManageWhiteListWithWxUser(list []*models.SuperCloudIssuanceUserGroupManageWhiteListWithWxUser) (int64, error) { + affected, err := s.Db.Insert(list) + if err != nil { + return 0, err + } + return affected, nil +} + +func (s SuperCloudIssuanceUserGroupManageWhiteListWithWxUserDb) SuperCloudIssuanceUserGroupManageWhiteListWithWxUserDelete(id interface{}) (int64, error) { + if reflect.TypeOf(id).Kind() == reflect.Slice { + return s.Db.In("id", id).Delete(models.SuperCloudIssuanceUserGroupManageBlackList{}) + } else { + return s.Db.Where("id = ?", id).Delete(models.SuperCloudIssuanceUserGroupManageBlackList{}) + } +} diff --git a/src/implement/super_cloud_issuance_user_robot_bind_follow_db.go b/src/implement/super_cloud_issuance_user_robot_bind_follow_db.go index 1f86ee7..ecdd3c1 100644 --- a/src/implement/super_cloud_issuance_user_robot_bind_follow_db.go +++ b/src/implement/super_cloud_issuance_user_robot_bind_follow_db.go @@ -4,6 +4,7 @@ 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" + "github.com/jinzhu/copier" "xorm.io/xorm" ) @@ -15,6 +16,43 @@ type SuperCloudIssuanceUserRobotBindFollowDb struct { Db *xorm.Engine } +func (s SuperCloudIssuanceUserRobotBindFollowDb) FindCloudIssuanceUserRobotBindFollow(uid int) (list []*dao.CloudIssuanceUserRobotBindFollowList, err error) { + var m []*models.SuperCloudIssuanceUserRobotBindFollow + err = s.Db.Where("uid=?", uid).OrderBy("id DESC").Find(&m) + if err != nil { + return + } + + for _, v := range m { + var tmp dao.CloudIssuanceUserRobotBindFollowList + copier.Copy(&tmp, v) + + cloudIssuanceUserRobotBindFollowGroupDb := SuperCloudIssuanceUserRobotBindFollowGroupDb{Db: s.Db} + groups, err := cloudIssuanceUserRobotBindFollowGroupDb.FindSuperCloudIssuanceUserRobotBindFollowGroup(map[string]interface{}{ + "key": "activate_group_id", + "value": v.ActivateGroupId, + }) + if err != nil { + return list, err + } + tmp.FollowGroupList = groups + + cloudIssuanceUserRobotBindFollowUserDb := SuperCloudIssuanceUserRobotBindFollowUserDb{Db: s.Db} + users, err := cloudIssuanceUserRobotBindFollowUserDb.FindSuperCloudIssuanceUserRobotBindFollowUser(map[string]interface{}{ + "key": "activate_group_id", + "value": v.ActivateGroupId, + }) + if err != nil { + return list, err + } + tmp.FollowGroupList = groups + tmp.FollowUserList = users + + list = append(list, &tmp) + } + return +} + func (s SuperCloudIssuanceUserRobotBindFollowDb) GetCloudIssuanceUserRobotBindFollow(id int) (m *models.SuperCloudIssuanceUserRobotBindFollow, err error) { m = new(models.SuperCloudIssuanceUserRobotBindFollow) has, err := s.Db.Where("id =?", id).Get(m) 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 bc85869..d6a3f2d 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 @@ -3,7 +3,11 @@ 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_utils "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils" zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils/logx" + "errors" + "fmt" + "reflect" "xorm.io/xorm" ) @@ -15,6 +19,37 @@ type SuperCloudIssuanceUserRobotBindFollowGroupDb struct { Db *xorm.Engine } +func (s SuperCloudIssuanceUserRobotBindFollowGroupDb) FindSuperCloudIssuanceUserRobotBindFollowGroup(params map[string]interface{}) ([]*models.SuperCloudIssuanceUserRobotBindFollowGroup, error) { + var m []*models.SuperCloudIssuanceUserRobotBindFollowGroup + if params["value"] == nil { + return nil, errors.New("参数有误") + } + if params["key"] == nil { + //查询全部数据 + err := s.Db.Find(&m) + if err != nil { + return nil, zhios_order_relate_logx.Error(err) + } + return m, nil + } else { + if reflect.TypeOf(params["value"]).Kind() == reflect.Slice { + //指定In查询 + if err := s.Db.In(zhios_order_relate_utils.AnyToString(params["key"]), params["value"]).Find(&m); err != nil { + return nil, zhios_order_relate_logx.Warn(err) + } + return m, nil + } else { + var query = fmt.Sprintf("%s =?", params["key"]) + err := s.Db.Where(query, params["value"]).Find(&m) + if err != nil { + return nil, zhios_order_relate_logx.Error(err) + } + return m, nil + } + + } +} + func (s SuperCloudIssuanceUserRobotBindFollowGroupDb) GetCloudIssuanceUserRobotBindFollowGroup(id int) (m *models.SuperCloudIssuanceUserRobotBindFollowGroup, err error) { m = new(models.SuperCloudIssuanceUserRobotBindFollowGroup) has, err := s.Db.Where("id =?", id).Get(m) 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 cd0de15..6af2d7b 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 @@ -3,7 +3,11 @@ 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_utils "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils" zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils/logx" + "errors" + "fmt" + "reflect" "xorm.io/xorm" ) @@ -15,6 +19,37 @@ type SuperCloudIssuanceUserRobotBindFollowUserDb struct { Db *xorm.Engine } +func (s SuperCloudIssuanceUserRobotBindFollowUserDb) FindSuperCloudIssuanceUserRobotBindFollowUser(params map[string]interface{}) ([]*models.SuperCloudIssuanceUserRobotBindFollowUser, error) { + var m []*models.SuperCloudIssuanceUserRobotBindFollowUser + if params["value"] == nil { + return nil, errors.New("参数有误") + } + if params["key"] == nil { + //查询全部数据 + err := s.Db.Find(&m) + if err != nil { + return nil, zhios_order_relate_logx.Error(err) + } + return m, nil + } else { + if reflect.TypeOf(params["value"]).Kind() == reflect.Slice { + //指定In查询 + if err := s.Db.In(zhios_order_relate_utils.AnyToString(params["key"]), params["value"]).Find(&m); err != nil { + return nil, zhios_order_relate_logx.Warn(err) + } + return m, nil + } else { + var query = fmt.Sprintf("%s =?", params["key"]) + err := s.Db.Where(query, params["value"]).Find(&m) + if err != nil { + return nil, zhios_order_relate_logx.Error(err) + } + return m, nil + } + + } +} + func (s SuperCloudIssuanceUserRobotBindFollowUserDb) GetCloudIssuanceUserRobotBindFollowUser(id int) (m *models.SuperCloudIssuanceUserRobotBindFollowUser, err error) { m = new(models.SuperCloudIssuanceUserRobotBindFollowUser) has, err := s.Db.Where("id =?", id).Get(m) 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 index c24a7e8..6ee9d74 100644 --- a/src/implement/super_cloud_issuance_user_robot_bind_source_db.go +++ b/src/implement/super_cloud_issuance_user_robot_bind_source_db.go @@ -19,7 +19,14 @@ func (s SuperCloudIssuanceUserRobotBindSourceDb) FindSuperCloudIssuanceUserRobot 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.*"). + Cols("super_cloud_issuance_user_robot_bind_source.*, "+ + "super_cloud_issuance_user_robot_with_activate_group.chat_room_id, "+ + "super_cloud_issuance_user_robot_with_activate_group.chat_room_owner_wx_nickname, "+ + "super_cloud_issuance_user_robot_with_activate_group.chat_room_owner_wx_head_url,"+ + "super_cloud_issuance_user_robot_with_activate_group.chat_room_owner, "+ + "super_cloud_issuance_user_robot_with_activate_group.member_count, "+ + "super_cloud_issuance_user_robot_with_activate_group.big_head_img_url, "+ + "super_cloud_issuance_user_robot_with_activate_group.small_head_img_url"). Limit(pageSize, (page-1)*pageSize). FindAndCount(&resp) return 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 ce0e5af..9ecbe50 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 @@ -15,6 +15,27 @@ type SuperCloudIssuanceUserRobotWithActivateGroupDb struct { Db *xorm.Engine } +func (s SuperCloudIssuanceUserRobotWithActivateGroupDb) SaveSuperCloudIssuanceUserRobotWithActivateGroup(id interface{}, m *models.SuperCloudIssuanceUserRobotWithActivateGroup, forceColums ...string) (affected int64, err error) { + if forceColums != nil { + affected, err = s.Db.Where("id=?", id).Cols(forceColums...).Update(m) + } else { + affected, err = s.Db.Where("id=?", id).Update(m) + } + return +} + +func (s SuperCloudIssuanceUserRobotWithActivateGroupDb) GetSuperCloudIssuanceUserRobotWithActivateGroup(id int) (m *models.SuperCloudIssuanceUserRobotWithActivateGroup, err error) { + m = new(models.SuperCloudIssuanceUserRobotWithActivateGroup) + has, err := s.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 (s SuperCloudIssuanceUserRobotWithActivateGroupDb) DelSuperCloudIssuanceUserRobotWithActivateGroup(id int) (int64, error) { return s.Db.Where("id = ?", id).Delete(models.SuperCloudIssuanceUserRobotWithActivateGroup{}) } @@ -28,12 +49,20 @@ func (s SuperCloudIssuanceUserRobotWithActivateGroupDb) InsertSuperCloudIssuance 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) +func (s SuperCloudIssuanceUserRobotWithActivateGroupDb) FindSuperCloudIssuanceUserRobotWithActivateGroup(uid, page, pageSize int, name string) (m []*models.SuperCloudIssuanceUserRobotWithActivateGroup, err error) { + if name != "" { + err = s.Db.Where("uid =? ", uid).And("name like ?", name).Limit(pageSize, (page-1)*pageSize).OrderBy("id ASC").Find(&m) + if err != nil { + return nil, zhios_order_relate_logx.Error(err) + } + return m, nil + } else { + 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 } - return m, nil } func (s SuperCloudIssuanceUserRobotWithActivateGroupDb) GetSuperCloudIssuanceUserRobotWithActivateGroupByChatRoomId(chatRoomId string, robotId int) (m *models.SuperCloudIssuanceUserRobotWithActivateGroup, err error) { diff --git a/src/models/super_cloud_issuance_add_group_welcome_message.go b/src/models/super_cloud_issuance_add_group_welcome_message.go new file mode 100644 index 0000000..771fd5f --- /dev/null +++ b/src/models/super_cloud_issuance_add_group_welcome_message.go @@ -0,0 +1,14 @@ +package models + +import ( + "time" +) + +type SuperCloudIssuanceAddGroupWelcomeMessage struct { + Id int `json:"id" xorm:"not null pk autoincr comment('自增id') INT(11)"` + ActivateGroupId int `json:"activate_group_id" xorm:"not null default 0 comment('绑定激活群id') INT(11)"` + Content string `json:"content" xorm:"not null default '' comment('内容') VARCHAR(255)"` + State int `json:"state" xorm:"not null default 1 comment('状态(1正常 2暂停)') TINYINT(1)"` + CreateAt time.Time `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('创建时间') DATETIME"` + UpdateAt time.Time `json:"update_at" xorm:"default 'CURRENT_TIMESTAMP' comment('更新时间') DATETIME"` +} diff --git a/src/models/super_cloud_issuance_keyword_reply_with_activate_group.go b/src/models/super_cloud_issuance_keyword_reply_with_activate_group.go new file mode 100644 index 0000000..46d38b3 --- /dev/null +++ b/src/models/super_cloud_issuance_keyword_reply_with_activate_group.go @@ -0,0 +1,10 @@ +package models + +type SuperCloudIssuanceKeywordReplyWithActivateGroup struct { + Id int `json:"id" xorm:"not null pk autoincr comment('自增id') INT(11)"` + ActivateGroupId int `json:"activate_group_id" xorm:"not null default 0 comment('绑定激活群id') INT(11)"` + State int `json:"state" xorm:"not null default 1 comment('状态(1正常 2暂停)') TINYINT(1)"` + IsFollowOfficial int `json:"is_follow_official" xorm:"not null default 1 comment('跟随官方(1:是 2:否)') TINYINT(1)"` + CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' comment('创建时间') DATETIME"` + UpdateAt string `json:"update_at" xorm:"default 'CURRENT_TIMESTAMP' comment('更新时间') DATETIME"` +} diff --git a/src/models/super_cloud_issuance_keyword_reply_with_activate_group_list.go b/src/models/super_cloud_issuance_keyword_reply_with_activate_group_list.go new file mode 100644 index 0000000..57e27c4 --- /dev/null +++ b/src/models/super_cloud_issuance_keyword_reply_with_activate_group_list.go @@ -0,0 +1,11 @@ +package models + +type SuperCloudIssuanceKeywordReplyWithActivateGroupList struct { + Id int `json:"id" xorm:"not null pk autoincr comment('自增id') INT(11)"` + ActivateGroupId int `json:"activate_group_id" xorm:"not null default 0 comment('绑定激活群id') INT(11)"` + Keyword string `json:"keyword" xorm:"not null default '' comment('关键词内容') VARCHAR(255)"` + Kind int `json:"kind" xorm:"not null default 1 comment('回复类型(1:文字 2:图片)') TINYINT(1)"` + ReplyContent string `json:"reply_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:"default 'CURRENT_TIMESTAMP' comment('更新时间') DATETIME"` +} diff --git a/src/models/super_cloud_issuance_user_group_manage.go b/src/models/super_cloud_issuance_user_group_manage.go new file mode 100644 index 0000000..918ee64 --- /dev/null +++ b/src/models/super_cloud_issuance_user_group_manage.go @@ -0,0 +1,14 @@ +package models + +type SuperCloudIssuanceUserGroupManage struct { + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + Uid int `json:"uid" xorm:"not null default 0 comment('uid') INT(11)"` + IsOpenOut int `json:"is_open_out" xorm:"not null default 0 comment('开启踢人(0:关闭 1:开启)') TINYINT(1)"` + OutSendFile int `json:"out_send_file" xorm:"not null default 0 comment('踢发文件(0:不踢 1:踢)') TINYINT(1)"` + OutSendCard int `json:"out_send_card" xorm:"not null default 0 comment('踢发名片(0:不踢 1:踢)') TINYINT(1)"` + OutSendLink int `json:"out_send_link" xorm:"not null default 0 comment('踢发链接(0:不踢 1:踢)') TINYINT(1)"` + OutSendApplet int `json:"out_send_applet" xorm:"not null default 0 comment('踢发小程序(0:不踢 1:踢)') TINYINT(1)"` + OutAutoAddBlackList int `json:"out_auto_add_black_list" xorm:"not null default 0 comment('踢人时自动加入黑名单(0:不加 1:加)') TINYINT(1)"` + 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_group_manage_black_list.go b/src/models/super_cloud_issuance_user_group_manage_black_list.go new file mode 100644 index 0000000..2d609ec --- /dev/null +++ b/src/models/super_cloud_issuance_user_group_manage_black_list.go @@ -0,0 +1,13 @@ +package models + +type SuperCloudIssuanceUserGroupManageBlackList struct { + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + Uid int `json:"uid" xorm:"not null default 0 comment('uid') INT(11)"` + ActivateGroupId int `json:"activate_group_id" xorm:"not null default 0 comment('绑定激活群id') INT(11)"` + ChatRoomId string `json:"chat_room_id" xorm:"not null default '' comment('微信群id') VARCHAR(255)"` + ChatRoomOwner string `json:"chat_room_owner" xorm:"not null default '' comment('群所有者') VARCHAR(255)"` + 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)"` + 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_group_manage_black_list_with_wx_user.go b/src/models/super_cloud_issuance_user_group_manage_black_list_with_wx_user.go new file mode 100644 index 0000000..ebbec39 --- /dev/null +++ b/src/models/super_cloud_issuance_user_group_manage_black_list_with_wx_user.go @@ -0,0 +1,10 @@ +package models + +type SuperCloudIssuanceUserGroupManageBlackListWithWxUser struct { + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + Uid int `json:"uid" xorm:"not null default 0 comment('uid') INT(11)"` + ActivateGroupId int `json:"activate_group_id" xorm:"not null default 0 comment('绑定激活群id') INT(11)"` + WcId string `json:"wc_id" xorm:"not null default '' comment('微信id') CHAR(50)"` + 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_group_manage_white_list.go b/src/models/super_cloud_issuance_user_group_manage_white_list.go new file mode 100644 index 0000000..9acf187 --- /dev/null +++ b/src/models/super_cloud_issuance_user_group_manage_white_list.go @@ -0,0 +1,13 @@ +package models + +type SuperCloudIssuanceUserGroupManageWhiteList struct { + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + Uid int `json:"uid" xorm:"not null default 0 comment('uid') INT(11)"` + ActivateGroupId int `json:"activate_group_id" xorm:"not null default 0 comment('绑定激活群id') INT(11)"` + ChatRoomId string `json:"chat_room_id" xorm:"not null default '' comment('微信群id') VARCHAR(255)"` + ChatRoomOwner string `json:"chat_room_owner" xorm:"not null default '' comment('群所有者') VARCHAR(255)"` + 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)"` + 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_group_manage_white_list_with_wx_user.go b/src/models/super_cloud_issuance_user_group_manage_white_list_with_wx_user.go new file mode 100644 index 0000000..4739989 --- /dev/null +++ b/src/models/super_cloud_issuance_user_group_manage_white_list_with_wx_user.go @@ -0,0 +1,10 @@ +package models + +type SuperCloudIssuanceUserGroupManageWhiteListWithWxUser struct { + Id int `json:"id" xorm:"not null pk autoincr INT(11)"` + Uid int `json:"uid" xorm:"not null default 0 comment('uid') INT(11)"` + ActivateGroupId int `json:"activate_group_id" xorm:"not null default 0 comment('绑定激活群id') INT(11)"` + WcId string `json:"wc_id" xorm:"not null default '' comment('微信id') CHAR(50)"` + 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/super_cloud_issuance/md/md_request.go b/super_cloud_issuance/md/md_request.go index 0f3885c..c4af512 100644 --- a/super_cloud_issuance/md/md_request.go +++ b/super_cloud_issuance/md/md_request.go @@ -19,8 +19,9 @@ type BuyPackageRecordsResponse struct { UpdateAt string `json:"update_at" ` } type ActivityGroupListRequest struct { - Page int `json:"page"` - Limit int `json:"limit"` + Page int `json:"page"` + Limit int `json:"limit"` + Name string `json:"name"` } type AddActivityGroupRequest struct { Name string `json:"name"` @@ -32,6 +33,10 @@ type AddActivityGroupRequest struct { BigHeadImgUrl string `json:"big_head_img_url"` SmallHeadImgUrl string `json:"small_head_img_url"` } +type SetStateActivityGroup struct { + Id int `json:"id"` + State int `json:"state"` +} type SourceGroupListRequest struct { Page int `json:"page"` Limit int `json:"limit"` @@ -49,5 +54,138 @@ type JoinSourceGroupRequest struct { 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"` + JoinActivateGroupId int `json:"join_activate_group_id"` +} +type AddGroupWelcomeMessageListRequest struct { + Page int `json:"page"` + Limit int `json:"limit"` +} +type SetSateAddGroupWelcomeMessageRequest struct { + ActivateGroupId int `json:"activate_group_id"` + State int `json:"state"` +} + +type UpdateSateAddGroupWelcomeMessageRequest struct { + ActivateGroupId int `json:"activate_group_id"` + Content string `json:"content"` +} +type KeywordReplyWithActivateGroupListRequest struct { + Page int `json:"page"` + Limit int `json:"limit"` +} +type SetSateKeywordReplyWithActivateGroupRequest struct { + ActivateGroupId int `json:"activate_group_id"` + State int `json:"state"` +} +type SetIsFollowOfficialKeywordReplyWithActivateGroupRequest struct { + ActivateGroupId int `json:"activate_group_id"` + IsFollowOfficial int `json:"is_follow_official"` +} +type UpdateKeywordReplyWithActivateGroupRequest struct { + ActivateGroupId int `json:"activate_group_id"` + List []struct { + KeyWord string `json:"keyword"` + Kind int `json:"kind"` + ReplyContent string `json:"reply_content"` + } `json:"list"` +} + +type FollowGroupIndexResponse struct { + List []FollowGroupAddRequest `json:"list"` + FollowGroupUserNums int `json:"follow_group_user_nums"` //群跟发用户数量 + FollowGroupRelayNums int `json:"follow_group_relay_nums"` //群跟发可转发群数 + FollowGroupBindNums int `json:"follow_group_bind_nums"` //群跟发可绑定群数 + AlreadyFollowGroupBindNums int `json:"already_follow_group_bind_nums"` //群跟发已绑定群数 +} + +type FollowGroupAddRequest struct { + Id int `json:"id"` + ActivateGroupId int `json:"activate_group_id"` + ChatRoomId string `json:"chat_room_id"` + Name string `json:"name"` + ChatRoomOwner string `json:"chat_room_owner"` + BigHeadImgUrl string `json:"big_head_img_url"` + SmallHeadImgUrl string `json:"small_head_img_url"` + MemberCount string `json:"member_count"` + State int `json:"state"` + FollowUserList []RobotMacGetChatRoomMemberResponse `json:"follow_user_list"` + FollowGroupList []struct { + FollowActivateGroupId int `json:"follow_activate_group_id"` + ChatRoomId string `json:"chat_room_id"` + NickName string `json:"nick_name"` + ChatRoomOwner string `json:"chat_room_owner"` + BigHeadImgUrl string `json:"big_head_img_url"` + SmallHeadImgUrl string `json:"small_head_img_url"` + MemberCount string `json:"member_count"` + } `json:"follow_group_list"` +} + +type RobotMacGetChatRoomMemberResponse struct { + UserName string `json:"user_name"` //微信号 + NickName string `json:"nick_name"` //昵称 + DisplayName string `json:"display_name"` //群昵称 + BigHeadImgUrl string `json:"big_head_img_url"` //头像 + SmallHeadImgUrl string `json:"small_head_img_url"` //头像(缩略图) + InviteUser string `json:"invite_user"` //邀请人微信号 +} + +type FollowGroupIsUseRequest struct { + Id int `json:"id"` + State int `json:"state"` +} +type FollowGroupDeleteRequest struct { + Id int `json:"id"` +} + +type GroupManageSaveRequest struct { + IsOpenOut int `json:"is_open_out"` + OutSendFile int `json:"out_send_file"` + OutSendCard int `json:"out_send_card"` + OutSendLink int `json:"out_send_link"` + OutSendApplet int `json:"out_send_applet"` + OutAutoAddBlackList int `json:"out_auto_add_black_list"` +} + +type GroupManageBlackListRequest struct { + Name string `json:"name"` +} + +type GroupManageBlackSaveRequest struct { + ActivateGroupId int `json:"activate_group_id"` + ChatRoomId string `json:"chat_room_id"` + ChatRoomOwner string `json:"chat_room_owner"` + BigHeadImgUrl string `json:"big_head_img_url"` + SmallHeadImgUrl string `json:"small_head_img_url"` +} + +type GroupManageWhiteListRequest struct { + Name string `json:"name"` +} + +type GroupManageWhiteSaveRequest struct { + ActivateGroupId int `json:"activate_group_id"` + ChatRoomId string `json:"chat_room_id"` + ChatRoomOwner string `json:"chat_room_owner"` + BigHeadImgUrl string `json:"big_head_img_url"` + SmallHeadImgUrl string `json:"small_head_img_url"` +} + +type GroupManageBlackWithUserListRequest struct { + ActivateGroupId int `json:"activate_group_id"` + ChatRoomId string `json:"chat_room_id"` +} + +type GroupManageBlackWithUserSaveRequest struct { + ActivateGroupId int `json:"activate_group_id"` + WxIds []string `json:"wc_ids"` +} + +type GroupManageWhiteWithUserListRequest struct { + ActivateGroupId int `json:"activate_group_id"` + ChatRoomId string `json:"chat_room_id"` +} + +type GroupManageWhiteWithUserSaveRequest struct { + ActivateGroupId int `json:"activate_group_id"` + WxIds []string `json:"wc_ids"` }