From 46978de9f07324f6ba29daa864990b6c24320725 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Sat, 6 Jul 2024 09:48:52 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BA=91=E5=8F=91=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ce_user_group_manage_black_list_with_wx_user_dao.go | 8 ++++++-- ...nce_user_group_manage_black_list_with_wx_user_db.go | 10 ++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) 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 index 4718928..e8b3a7b 100644 --- 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 @@ -1,10 +1,14 @@ -package dao +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" + "xorm.io/xorm" +) 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) + BatchSuperCloudIssuanceUserGroupManageBlackListWithWxUserSess(sess *xorm.Session, list []*models.SuperCloudIssuanceUserGroupManageBlackListWithWxUser) (int64, error) SuperCloudIssuanceUserGroupManageBlackListWithWxUserDelete(id interface{}) (int64, error) } 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 index 4cd71b4..f055c5f 100644 --- 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 @@ -1,4 +1,4 @@ -package implement +package implement import ( "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" @@ -36,7 +36,13 @@ func (s SuperCloudIssuanceUserGroupManageBlackListWithWxUserDb) BatchSuperCloudI } return affected, nil } - +func (s SuperCloudIssuanceUserGroupManageBlackListWithWxUserDb) BatchSuperCloudIssuanceUserGroupManageBlackListWithWxUserSess(sess *xorm.Session, list []*models.SuperCloudIssuanceUserGroupManageBlackListWithWxUser) (int64, error) { + affected, err := sess.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{}) From 487e44be146c0c23979e6f703cfbbd9f1acb8eea Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Sat, 6 Jul 2024 10:19:22 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BA=91=E5=8F=91=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../super_cloud_issuance_user_group_manage_white_list_db.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 index a09a32a..0f1c19a 100644 --- 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 @@ -1,4 +1,4 @@ -package implement +package implement import ( "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" @@ -53,7 +53,7 @@ func (s SuperCloudIssuanceUserGroupManageWhiteListDb) FindSuperCloudIssuanceUser 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.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_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"). @@ -66,7 +66,7 @@ func (s SuperCloudIssuanceUserGroupManageWhiteListDb) FindSuperCloudIssuanceUser 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.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_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"). From 566d3d060b7cceccbdf5a8eecf162e2a578961c2 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Sat, 6 Jul 2024 10:28:02 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=BA=91=E5=8F=91=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../super_cloud_issuance_user_group_manage_white_list_db.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 index 0f1c19a..5e3bccd 100644 --- 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 @@ -54,7 +54,7 @@ func (s SuperCloudIssuanceUserGroupManageWhiteListDb) FindSuperCloudIssuanceUser 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_user_robot_with_activate_group.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_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) @@ -67,7 +67,7 @@ func (s SuperCloudIssuanceUserGroupManageWhiteListDb) FindSuperCloudIssuanceUser 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_user_robot_with_activate_group.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_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) From 60ff4df84809f229309a983df98e155642654591 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Sat, 6 Jul 2024 17:32:57 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E4=BA=91=E5=8F=91=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ssuance_keyword_reply_with_activate_group_list_dao.go | 8 ++++++-- ...d_issuance_user_robot_bind_source_follow_group_dao.go | 7 +++++-- ...issuance_keyword_reply_with_activate_group_list_db.go | 9 ++++++++- 3 files changed, 19 insertions(+), 5 deletions(-) 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 index 1dfa302..1b07375 100644 --- 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 @@ -1,8 +1,12 @@ -package dao +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" + "xorm.io/xorm" +) type SuperCloudIssuanceKeywordReplyWithActivateGroupListDao interface { BatchAddSuperCloudIssuanceUserRobotBindSourceFollowGroups(data []*models.SuperCloudIssuanceKeywordReplyWithActivateGroupList) (int64, error) + BatchAddSuperCloudIssuanceUserRobotBindSourceFollowGroupsSess(sess *xorm.Session, data []*models.SuperCloudIssuanceKeywordReplyWithActivateGroupList) (int64, error) FindSuperCloudIssuanceKeywordReplyWithActivateGroupList(activateGroupId int) (mm *[]models.SuperCloudIssuanceKeywordReplyWithActivateGroupList, err error) } 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 index e47bf9d..19063f8 100644 --- 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 @@ -1,6 +1,9 @@ -package dao +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" + "xorm.io/xorm" +) type SuperCloudIssuanceUserRobotBindSourceFollowGroupDao interface { BatchAddSuperCloudIssuanceUserRobotBindSourceFollowGroups(data []*models.SuperCloudIssuanceUserRobotBindSourceFollowGroup) (int64, error) 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 index 11fe2b2..b17decc 100644 --- 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 @@ -1,4 +1,4 @@ -package implement +package implement import ( "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" @@ -30,3 +30,10 @@ func (s SuperCloudIssuanceKeywordReplyWithActivateGroupListDb) BatchAddSuperClou } return affected, nil } +func (s SuperCloudIssuanceKeywordReplyWithActivateGroupListDb) BatchAddSuperCloudIssuanceUserRobotBindSourceFollowGroupsSess(sess *xorm.Session, data []*models.SuperCloudIssuanceKeywordReplyWithActivateGroupList) (int64, error) { + affected, err := sess.Insert(data) + if err != nil { + return 0, err + } + return affected, nil +} From 34dbf7fd8a165056d5ee5e6166261daca3725b8c Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Sat, 6 Jul 2024 17:39:27 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BA=91=E5=8F=91=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...per_cloud_issuance_user_robot_bind_source_follow_group_dao.go | 1 - 1 file changed, 1 deletion(-) 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 index 19063f8..aad4ac6 100644 --- 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 @@ -2,7 +2,6 @@ package dao import ( "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" - "xorm.io/xorm" ) type SuperCloudIssuanceUserRobotBindSourceFollowGroupDao interface { From d78f50990a83a44d511bd1ef549e2c9d80d5c9cf Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Sat, 6 Jul 2024 19:05:46 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BA=91=E5=8F=91=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ance_user_robot_bind_source_follow_group_dao.go | 1 + ...uance_user_robot_bind_source_follow_group_db.go | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) 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 index aad4ac6..eeedd72 100644 --- 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 @@ -6,4 +6,5 @@ import ( type SuperCloudIssuanceUserRobotBindSourceFollowGroupDao interface { BatchAddSuperCloudIssuanceUserRobotBindSourceFollowGroups(data []*models.SuperCloudIssuanceUserRobotBindSourceFollowGroup) (int64, error) + GetSuperCloudIssuanceUserRobotBindSourceFollowGroupsByChatRoomId(chatRoomId string) (m *models.SuperCloudIssuanceUserRobotBindSourceFollowGroup, err error) } 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 index 6e2dafb..b5a7c22 100644 --- 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 @@ -1,8 +1,9 @@ -package implement +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" ) @@ -22,3 +23,14 @@ func (s SuperCloudIssuanceUserRobotBindSourceFollowGroupDb) BatchAddSuperCloudIs } return affected, nil } +func (s SuperCloudIssuanceUserRobotBindSourceFollowGroupDb) GetSuperCloudIssuanceUserRobotBindSourceFollowGroupsByChatRoomId(chatRoomId string) (m *models.SuperCloudIssuanceUserRobotBindSourceFollowGroup, err error) { + m = new(models.SuperCloudIssuanceUserRobotBindSourceFollowGroup) + has, err := s.Db.Where("follow_chat_room_id =? ", chatRoomId).Get(m) + if err != nil { + return nil, zhios_order_relate_logx.Error(err) + } + if has == false { + return nil, nil + } + return m, nil +}