@@ -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 { | type SuperCloudIssuanceKeywordReplyWithActivateGroupListDao interface { | ||||
BatchAddSuperCloudIssuanceUserRobotBindSourceFollowGroups(data []*models.SuperCloudIssuanceKeywordReplyWithActivateGroupList) (int64, error) | BatchAddSuperCloudIssuanceUserRobotBindSourceFollowGroups(data []*models.SuperCloudIssuanceKeywordReplyWithActivateGroupList) (int64, error) | ||||
BatchAddSuperCloudIssuanceUserRobotBindSourceFollowGroupsSess(sess *xorm.Session, data []*models.SuperCloudIssuanceKeywordReplyWithActivateGroupList) (int64, error) | |||||
FindSuperCloudIssuanceKeywordReplyWithActivateGroupList(activateGroupId int) (mm *[]models.SuperCloudIssuanceKeywordReplyWithActivateGroupList, err error) | FindSuperCloudIssuanceKeywordReplyWithActivateGroupList(activateGroupId int) (mm *[]models.SuperCloudIssuanceKeywordReplyWithActivateGroupList, err error) | ||||
} | } |
@@ -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 { | type SuperCloudIssuanceUserGroupManageBlackListWithWxUserDao interface { | ||||
FindAndCountSuperCloudIssuanceUserGroupManageBlackListWithWxUser(activateGroupId int) (m []*models.SuperCloudIssuanceUserGroupManageBlackListWithWxUser, total int64, err error) | FindAndCountSuperCloudIssuanceUserGroupManageBlackListWithWxUser(activateGroupId int) (m []*models.SuperCloudIssuanceUserGroupManageBlackListWithWxUser, total int64, err error) | ||||
SaveSuperCloudIssuanceUserGroupManageBlackListWithWxUser(id interface{}, m *models.SuperCloudIssuanceUserGroupManageBlackListWithWxUser, forceColums ...string) (affected int64, err error) | SaveSuperCloudIssuanceUserGroupManageBlackListWithWxUser(id interface{}, m *models.SuperCloudIssuanceUserGroupManageBlackListWithWxUser, forceColums ...string) (affected int64, err error) | ||||
BatchSuperCloudIssuanceUserGroupManageBlackListWithWxUser(list []*models.SuperCloudIssuanceUserGroupManageBlackListWithWxUser) (int64, error) | BatchSuperCloudIssuanceUserGroupManageBlackListWithWxUser(list []*models.SuperCloudIssuanceUserGroupManageBlackListWithWxUser) (int64, error) | ||||
BatchSuperCloudIssuanceUserGroupManageBlackListWithWxUserSess(sess *xorm.Session, list []*models.SuperCloudIssuanceUserGroupManageBlackListWithWxUser) (int64, error) | |||||
SuperCloudIssuanceUserGroupManageBlackListWithWxUserDelete(id interface{}) (int64, error) | SuperCloudIssuanceUserGroupManageBlackListWithWxUserDelete(id interface{}) (int64, error) | ||||
} | } |
@@ -1,7 +1,10 @@ | |||||
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" | |||||
) | |||||
type SuperCloudIssuanceUserRobotBindSourceFollowGroupDao interface { | type SuperCloudIssuanceUserRobotBindSourceFollowGroupDao interface { | ||||
BatchAddSuperCloudIssuanceUserRobotBindSourceFollowGroups(data []*models.SuperCloudIssuanceUserRobotBindSourceFollowGroup) (int64, error) | BatchAddSuperCloudIssuanceUserRobotBindSourceFollowGroups(data []*models.SuperCloudIssuanceUserRobotBindSourceFollowGroup) (int64, error) | ||||
GetSuperCloudIssuanceUserRobotBindSourceFollowGroupsByChatRoomId(chatRoomId string) (m *models.SuperCloudIssuanceUserRobotBindSourceFollowGroup, err error) | |||||
} | } |
@@ -1,4 +1,4 @@ | |||||
package implement | |||||
package implement | |||||
import ( | import ( | ||||
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" | "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" | ||||
@@ -30,3 +30,10 @@ func (s SuperCloudIssuanceKeywordReplyWithActivateGroupListDb) BatchAddSuperClou | |||||
} | } | ||||
return affected, nil | 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 | |||||
} |
@@ -1,4 +1,4 @@ | |||||
package implement | |||||
package implement | |||||
import ( | import ( | ||||
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" | "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" | ||||
@@ -36,7 +36,13 @@ func (s SuperCloudIssuanceUserGroupManageBlackListWithWxUserDb) BatchSuperCloudI | |||||
} | } | ||||
return affected, nil | 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) { | func (s SuperCloudIssuanceUserGroupManageBlackListWithWxUserDb) SuperCloudIssuanceUserGroupManageBlackListWithWxUserDelete(id interface{}) (int64, error) { | ||||
if reflect.TypeOf(id).Kind() == reflect.Slice { | if reflect.TypeOf(id).Kind() == reflect.Slice { | ||||
return s.Db.In("id", id).Delete(models.SuperCloudIssuanceUserGroupManageBlackList{}) | return s.Db.In("id", id).Delete(models.SuperCloudIssuanceUserGroupManageBlackList{}) | ||||
@@ -1,4 +1,4 @@ | |||||
package implement | |||||
package implement | |||||
import ( | import ( | ||||
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" | "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" | ||||
@@ -53,8 +53,8 @@ func (s SuperCloudIssuanceUserGroupManageWhiteListDb) FindSuperCloudIssuanceUser | |||||
OrderBy("super_cloud_issuance_user_robot_with_activate_group.id DESC"). | 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," + | 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_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.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.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"). | "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) | Find(&resp) | ||||
@@ -66,8 +66,8 @@ func (s SuperCloudIssuanceUserGroupManageWhiteListDb) FindSuperCloudIssuanceUser | |||||
OrderBy("super_cloud_issuance_user_robot_with_activate_group.id DESC"). | 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," + | 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_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.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.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"). | "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) | Find(&resp) | ||||
@@ -1,8 +1,9 @@ | |||||
package implement | |||||
package implement | |||||
import ( | import ( | ||||
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" | "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" | ||||
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" | "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" | "xorm.io/xorm" | ||||
) | ) | ||||
@@ -22,3 +23,14 @@ func (s SuperCloudIssuanceUserRobotBindSourceFollowGroupDb) BatchAddSuperCloudIs | |||||
} | } | ||||
return affected, nil | 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 | |||||
} |