Documentation ¶
Index ¶
- func ApplyChatRoomMemberCount(db *gorm.DB, chatRoomSerialNo string) (int32, error)
- type ChatRoom
- type ChatRoomCmd
- type ChatRoomMember
- type ChatRoomTag
- type ChatRoomWorkTemplate
- type CmdType
- type MessageQueue
- type MyCmd
- type MyRobot
- type MyRobotRenew
- type MySubChatRoomConfig
- type Robot
- type RobotApplyCode
- func ApplyCodeUsed(db *gorm.DB, codeSerialNo string) (code RobotApplyCode, err error)
- func FindVaildApplyCodeByMyId(db *gorm.DB, myId, subId string) (list []RobotApplyCode, err error)
- func FindVaildApplyCodeByMyIdAndRobot(db *gorm.DB, myId, subId, robotSerialNo string) (list []RobotApplyCode, err error)
- type RobotChatRoom
- type RobotFriend
- type RobotJoin
- type SubCmd
- type TagCmd
- type TulingConfig
- type WorkTemplate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChatRoom ¶
type ChatRoom struct { gorm.Model ChatRoomSerialNo string `gorm:"size:100;unique_index" json:"chat_room_serial_no"` //群编号 WxUserSerialNo string `gorm:"size:100" json:"wx_user_serial_no"` //群主编号 Name string `gorm:"size:255" json:"name"` //群名称 Base64Name string `gorm:"size:500" json:"base64_name"` //群名称 Status int32 `gorm:"index:idx_status" json:"status"` //群状态 10:开启 11:注销 RobotInStatus int32 `json:"robot_in_status"` //机器人是否在群内 0:在群内 1:不在群内 RobotSerialNo string `gorm:"size:100" json:"robot_serial_no"` //设备号 RobotStatus int32 `gorm:"index:idx_robot_status" json:"robot_status"` //设备状态 QrCode string `gorm:"size:500" json:"qr_code"` //群二维码 QrCodeExpiredDate time.Time `json:"qr_code_expired_date"` //群二维码失效时间 ChatRoomId string `gorm:"size:100" json:"chat_room_id"` //微信原生ID MemberCount int32 `gorm:"default:0" json:"member_count"` //群有效人数 HeadImage string `gorm:"varchar(500)" json:"head_image"` // 群头像 }
群记录
func FindChatRoom ¶
按群编号查找已开通的设备开群记录
type ChatRoomCmd ¶
type ChatRoomCmd struct { gorm.Model ChatRoomSerialNo string `gorm:"size:100" json:"chat_room_serial_no"` //群编号 CmdType string `gorm:"size:50;index:idx_cmd_type" json:"cmd_type"` //指令类型 CmdValue string `gorm:"size:100" json:"cmd_value"` //指令内容 CmdParams string `gorm:"size:500" json:"cmd_params"` //指令参数 CmdReply string `gorm:"type:text(10000)" json:"cmd_reply"` //指令回复 IsOpen bool `gorm:"index:idx_is_open" json:"is_open"` //是否启用 }
群指令
type ChatRoomMember ¶
type ChatRoomMember struct { gorm.Model ChatRoomSerialNo string `gorm:"size:100" json:"chat_room_serial_no"` //群编号 WxId string `gorm:"size:100" json:"wx_id"` //微信原生ID号 WxUserSerialNo string `gorm:"size:100" json:"wx_user_serial_no"` //会员编号 NickName string `gorm:"size:255" json:"nick_name"` //昵称 Base64NickName string `gorm:"size:500" json:"base64_nick_name"` //昵称Base64 HeadImages string `gorm:"size:500" json:"head_images"` //会员头像 JoinChatRoomType int32 `gorm:"index:idx_join_chat_room_type" json:"join_chat_roome_type"` //入群方式 FatherWxUserSerialNo string `gorm:"size:100" json:"father_wx_user_serial_no"` //推荐人 MsgCount int32 `gorm:"index:idx_message_count" json:"msg_count"` //发言总数 LastMsgDate time.Time `json:"last_msg_date"` //最后发言时间 JoinDate time.Time `json:"join_date"` //入群时间 QuitDate time.Time `json:"quit_date"` //退群时间 IsActive bool `gorm:"index:idx_is_active" json:"is_active"` //是否活跃 IsAdmin bool `json:"is_admin"` IsRobot bool `json:"is_robot"` IsManager bool `json:"is_manager"` }
群成员 gen:qs
func FindChatRoomMember ¶
func FindChatRoomMember(db *gorm.DB, chatRoomSerialNo, wxUserSerialNo string) (member ChatRoomMember, err error)
获取成员信息
type ChatRoomTag ¶
type ChatRoomTag struct { gorm.Model TagId string `gorm:"size:100" json:"tag_id"` //TagId TagName string `gorm:"size:200" json:"tag_name"` //名称 MyId string `gorm:"size:100" json:"my_id"` //供应商ID Count int32 `json:"count"` //个数 IsActive bool `gorm:"index:idx_is_active" json:"is_active"` //是否启用 }
群TAG分组
func GetChatRoomTagByMyId ¶
func GetChatRoomTagByMyId(db *gorm.DB, my_id string) (rst []ChatRoomTag, err error)
type ChatRoomWorkTemplate ¶
type CmdType ¶
type CmdType struct { gorm.Model TypeFlag string `gorm:"size:50;unique_index" json:"type_flag"` //定义标识,方便系统回调,命令进入回调队列 TypeName string `gorm:"size:50" json:"type_name"` //定义名称 }
触发指令
type MessageQueue ¶
type MessageQueue struct { gorm.Model QueueId string `gorm:"size:100" json:"queue_id"` //发送标识 MyId string `gorm:"size:100;index:idx_my_id" json:"my_id"` //供应商ID SubId string `gorm:"size:100;index:idx_sub_id" json:"sub_id"` //代理商ID ChatRoomSerialNoList string `gorm:"type:text(10000)" json:"chat_room_serial_no_list"` //推送群信息 ChatRoomCount int32 `json:"chat_room_count"` //推送群总数 IsHit bool `json:"is_hit"` //是否@用户 WeixinSerialNo string `gorm:"size:500" json:"weixin_serial_no"` //@用户的编号 MsgType string `gorm:"size:20;index:idx_msg_type" json:"msg_type"` //消息类型 MsgContent string `gorm:"type:text(10000)" json:"msg_content"` //消息内容 Title string `gorm:"size:200" json:"title"` //卡片标题 Description string `gorm:"size:500" json:"description"` //卡片介绍 Href string `gorm:"size:500" json:"href"` //卡片链接 VoiceTime int32 `json:"voice_time"` //音频时间 ProductId string `gorm:"size:100" json:"product_id"` //商品ID SendType int8 `gorm:"type:tinyint(8)" json:"send_type"` //发送类型 SendTime time.Time `json:"send_time"` //发送时间 SendStatus int8 `gorm:"type:tinyint(8)" json:"send_status"` //发送状态 SendStatusTime time.Time `json:"send_status_time"` //发送状态更新时间 }
消息发送表
type MyCmd ¶
type MyCmd struct { gorm.Model MyId string `gorm:"size:100" json:"my_id"` //供应商ID CmdType string `gorm:"size:50;index:idx_cmd_type" json:"cmd_type"` //指令类型 CmdValue string `gorm:"size:100" json:"cmd_value"` //指令内容 CmdParams string `gorm:"size:500" json:"cmd_params"` //指令参数 CmdReply string `gorm:"type:text(10000)" json:"cmd_reply"` //指令回复 IsOpen bool `gorm:"index:idx_is_open" json:"is_open"` //是否启用 }
供应商指令
type MyRobot ¶
type MyRobot struct { gorm.Model RobotSerialNo string `gorm:"size:100;unique_index" json:"robot_serial_no"` //Uchat设备号,一个设备号只能绑定一个第三方用户 MyId string `gorm:"size:100;index:idx_my_id" json:"my_id"` //第三方绑定用户标识 SubId string `gorm:"size:100;index:idx_sub_id" json:"sub_id"` //子商户标识,如果存在 ExpireTime time.Time `json:"expire_time"` //拥有设备过期时间 }
供应商设备列表
type MyRobotRenew ¶
type MyRobotRenew struct { gorm.Model Platform string `gorm:"size:50;not null;unique_index:uix_platform_payment_id" json:"platform"` //支付平台,比如社群后台,并非真实支付端 PaymentId string `gorm:"size:100;not null;unique_index:uix_platform_payment_id" json:"payment_id"` //支持单ID,支付平台&支付单ID唯一 RenewDays int32 `json:"renew_days"` //续费天数 ExpireDate time.Time `json:"expire_date"` //过期时间 RobotSerialNo string `gorm:"size:100" json:"robot_serial_no"` //如果指定设备号,则先检测此设备是否为MyId或subId所有,如果不是则不能续费,如果为空则新开设备 MyId string `gorm:"size:100" json:"my_id"` //第三方绑定用户标识 SubId string `gorm:"size:100" json:"sub_id"` //子商户标识,如果存在 Result string `gorm:"size:500" json:"result"` //处理结果 }
供应设备开通日志
type MySubChatRoomConfig ¶
type MySubChatRoomConfig struct { gorm.Model MyId string `gorm:"size:100;index:idx_my_id" json:"my_id"` //供应商 SubId string `gorm:"size:100;index:idx_sub_id" json:"sub_id"` //代理商 Num int32 `json:"num"` //开群上限 }
代理商开群设置
type Robot ¶
type Robot struct { gorm.Model SerialNo string `gorm:"size:100;unique_index" json:"serial_no"` //设备编号 WxId string `gorm:"size:200" json:"wx_id"` //微信号 ChatRoomCount int32 `gorm:"index:idx_chat_room_count" json:"chat_room_count"` //设备开群个数 NickName string `gorm:"size:255" json:"nick_name"` //设备昵称 Base64NickName string `gorm:"size:500" json:"base64_nick_name"` //设备昵称Base64 HeadImages string `gorm:"size:500" json:"head_images"` //设备头像 CodeImages string `gorm:"size:500" json:"code_images"` //设备二维码 Status int32 `gorm:"index:idx_status" json:"status"` //设备状态 Used bool `gorm:"default:true" json:"used"` //商户下是否使用此设备 }
设备列表
func FindValidRobotByMyId ¶
查找供应商所拥有可用的设置列表
type RobotApplyCode ¶
type RobotApplyCode struct { gorm.Model RobotSerialNo string `gorm:"size:100;index:idx_robot_serial_no" json:"robot_serial_no"` //设备编号 RobotNickName string `gorm:"size:200" json:"robot_nick_name"` //设备昵称 Type string `gorm:"size:20" json:"type"` //类型:开群验证码,冗余 ChatRoomSerialNo string `gorm:"size:100" json:"chat_room_serial_no"` //群编号 ExpireTime time.Time `json:"expire_time"` //过期时间 CodeSerialNo string `gorm:"size:100" json:"code_serial_no"` //验证码推送编号 CodeValue string `gorm:"size:20;index:idx_code_value" json:"code_value"` //验证码内容 CodeImages string `gorm:"size:500" json:"code_images"` //验证码二维码 CodeTime time.Time `json:"code_time"` //验证码发送时间 MyId string `gorm:"size:100;index:idx_my_id" json:"my_id"` //申请验证码,供应商 SubId string `gorm:"size:100;index:idx_my_id" json:"sub_id"` //申请验证码,代理商 Used bool `json:"used"` //是否使用 UsedTime time.Time `json:"used_time"` //使用时间 }
开群验证码
func ApplyCodeUsed ¶
func ApplyCodeUsed(db *gorm.DB, codeSerialNo string) (code RobotApplyCode, err error)
使用验证码
func FindVaildApplyCodeByMyId ¶
func FindVaildApplyCodeByMyId(db *gorm.DB, myId, subId string) (list []RobotApplyCode, err error)
根据供应商查找当前可用的验证码
func FindVaildApplyCodeByMyIdAndRobot ¶
func FindVaildApplyCodeByMyIdAndRobot(db *gorm.DB, myId, subId, robotSerialNo string) (list []RobotApplyCode, err error)
根据供应商查找当前可用的验证码
type RobotChatRoom ¶
type RobotChatRoom struct { gorm.Model ExpiredDate time.Time `json:"expired_date"` //失效时间, 微选社群增加的,暂时还没有实际用处,todo RobotSerialNo string `gorm:"size:100" json:"robot_serial_no"` //设备号 ChatRoomSerialNo string `gorm:"size:100" json:"chat_room_serial_no"` //群编号 WxUserSerialNo string `gorm:"size:100" json:"wx_user_serial_no"` //开群用户号 IsOpen bool `gorm:"index:idx_is_open" json:"is_open"` //是否开启 MyId string `gorm:"size:100;index:idx_my_id" json:"my_id"` //供应商ID SubId string `gorm:"size:100;index:idx_sub_id" json:"sub_id"` //代理商ID TagId string `gorm:"size:100;index:idx_tag_id" json:"tag_id"` //分组TAG OpenTuling bool `gorm:"index:idx_open_tuling" json:"open_tuling"` //是否启用图片机器人 OpenSignin bool `gorm:"default:true;index:idx_open_signin" json:"open_singin"` //是否启用签到功能 WorkTempalteId string `gorm:"size:50;not null" json:"work_template_id"` //指令模板ID }
设备开群记录
func FindRobotChatRoomByChatRoom ¶
func FindRobotChatRoomByChatRoom(db *gorm.DB, chatRoomSerialNo string) (robotChatRoom RobotChatRoom, err error)
按群编号查找已开通的设备开群记录
type RobotFriend ¶
type RobotFriend struct { gorm.Model RobotSerialNo string `gorm:"size:100" json:"robot_serial_no"` //设备编号 WxUserSerialNo string `gorm:"size:100" json:"wx_user_serial_no"` //会员编号 NickName string `gorm:"size:255" json:"nick_name"` //设备昵称 Base64NickName string `gorm:"size:500" json:"base64_nick_name"` //设备昵称Base64 HeadImages string `gorm:"size:500" json:"head_images"` //设备头像 AddDate time.Time `json:"add_date"` //添加时间 }
设备好友
type RobotJoin ¶
type RobotJoin struct { gorm.Model MyId string `gorm:"type:varchar(100);index;not null" json:"my_id"` //设备拥有者 LogSerialNo string `gorm:"type:varchar(30);unique_index;not null" json:"log_serial_no"` //入群日志ID RobotSerialNo string `gorm:"type:varchar(100);index;not null" json:"robot_serial_no"` //设备号 RobotNickName string `gorm:"type:varchar(200);not null" json:"robot_nick_name"` //设备昵称 ChatRoomSerialNo string `gorm:"type:varchar(100);index;not null" json:"chat_room_serial_no"` //群编号 ChatRoomNickName string `gorm:"type:varchar(255)" json:"chat_room_nick_name"` //群昵称 ChatRoomBase64NickName string `gorm:"type:varchar(500)" json:"chat_room_base64_nick_name"` //群昵称Base64 WxUserSerialNo string `gorm:"type:varchar(100)" json:"wx_user_serial_no"` //拉群用户的微信编号 WxUserNickName string `gorm:"type:varchar(255)" json:"wx_user_nick_name"` //用户昵称 WxUserBase64NickName string `gorm:"type:varchar(500)" json:"wx_user_base64_nick_name"` //base64编码后的用户昵称 WxUserHeadImgUrl string `gorm:"type:varchar(1000)" json:"wx_user_head_img_url"` //用户头像 JoinDate time.Time `json:"join_date"` //入群时间 Status int32 `gorm:"index;default:0" json:"status"` //状态: 0 未处理 1 点击开通 2 逻辑删除 }
type SubCmd ¶
type SubCmd struct { gorm.Model SubId string `gorm:"size:100" json:"sub_id"` //代理商ID CmdType string `gorm:"size:50;index:idx_cmd_type" json:"cmd_type"` //指令类型 CmdValue string `gorm:"size:100" json:"cmd_value"` //指令内容 CmdParams string `gorm:"size:500" json:"cmd_params"` //指令参数 CmdReply string `gorm:"type:text(10000)" json:"cmd_reply"` //指令回复 IsOpen bool `gorm:"index:idx_is_open" json:"is_open"` //是否启用 }
代理商指令
type TagCmd ¶
type TagCmd struct { gorm.Model TagId string `gorm:"size:100" json:"tag_id"` //分组TAG CmdType string `gorm:"size:50;index:idx_cmd_type" json:"cmd_type"` //指令类型 CmdValue string `gorm:"size:100" json:"cmd_value"` //指令内容 CmdParams string `gorm:"size:500" json:"cmd_params"` //指令参数 CmdReply string `gorm:"type:text(10000)" json:"cmd_reply"` //指令回复 IsOpen bool `gorm:"index:idx_is_open" json:"is_open"` //是否启用 }
TAG指令
type TulingConfig ¶
type WorkTemplate ¶
type WorkTemplate struct { gorm.Model WorkTemplateId string `gorm:"size:100;not null;unique_index" json:"work_template_id"` //模板ID Name string `gorm:"size:200" json:"name"` //模板名称 MyId string `gorm:"size:100;not null;index" json:"my_id"` //第三方绑定用户标识 SubId string `gorm:"size:100;index" json:"sub_id"` //子商户标识,如果存在 CmdType string `gorm:"size:50;not null;index" json:"cmd_type"` //指令类型 CmdValue string `gorm:"size:100" json:"cmd_value"` //指令内容 CmdParams string `gorm:"size:500" json:"cmd_params"` //指令参数 CmdReply string `gorm:"type:text(10000)" json:"cmd_reply"` //指令回复 IsDefault bool `json:"is_default"` //是否默认模板 Status int8 `json:"status"` //状态: 0 启用 1 关闭 2 删除,不允许修改 ChatRoomCount int32 `json:"chat_room_count"` //使用模板群数量 }
指令模板
Click to show internal directories.
Click to hide internal directories.