models

package
v0.0.0-...-88bad87 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

********************************************* ** @Des: This file ... ** @Author: haodaquan ** @Date: 2017-09-16 15:42:43 ** @Last Modified by: haodaquan ** @Last Modified time: 2017-09-17 11:48:17 **********************************************

********************************************* ** @Des: This file ... ** @Author: haodaquan ** @Date: 2017-09-16 15:42:43 ** @Last Modified by: haodaquan ** @Last Modified time: 2017-09-26 11:48:17 **********************************************

********************************************* ** @Des: This file ... ** @Author: haodaquan ** @Date: 2017-09-16 15:42:43 ** @Last Modified by: haodaquan ** @Last Modified time: 2017-10-09 11:48:17 **********************************************

********************************************* ** @Des: This file ... ** @Author: haodaquan ** @Date: 2017-09-16 15:42:43 ** @Last Modified by: haodaquan ** @Last Modified time: 2017-10-09 11:48:17 **********************************************

********************************************* ** @Des: 权限因子 ** @Author: haodaquan ** @Date: 2017-09-09 20:50:36 ** @Last Modified by: haodaquan ** @Last Modified time: 2017-09-17 21:42:08 **********************************************

********************************************* ** @Des: This file ... ** @Author: haodaquan ** @Date: 2017-09-16 15:42:43 ** @Last Modified by: haodaquan ** @Last Modified time: 2017-09-25 11:48:17 **********************************************

********************************************* ** @Des: This file ... ** @Author: haodaquan ** @Date: 2017-09-16 15:42:43 ** @Last Modified by: haodaquan ** @Last Modified time: 2017-09-25 11:48:17 **********************************************

********************************************* ** @Des: This file ... ** @Author: haodaquan ** @Date: 2017-09-16 15:42:43 ** @Last Modified by: haodaquan ** @Last Modified time: 2017-09-24 11:48:17 **********************************************

********************************************* ** @Des: This file ... ** @Author: haodaquan ** @Date: 2017-09-14 15:24:51 ** @Last Modified by: haodaquan ** @Last Modified time: 2017-09-17 11:48:52 **********************************************

********************************************* ** @Des: This file ... ** @Author: haodaquan ** @Date: 2017-09-15 11:44:13 ** @Last Modified by: haodaquan ** @Last Modified time: 2017-09-17 11:49:13 **********************************************

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTeamGroupMap

func AddTeamGroupMap(gid int64, extension string) error

指定这个任务归宿

func AdminAdd

func AdminAdd(a *Admin) (int64, error)

func AiFlowContentToProcessDesc

func AiFlowContentToProcessDesc(id int64) string

func AiNumbersAdd

func AiNumbersAdd(a *AiNumbers) (int64, error)

func AiSeatTaskAdd

func AiSeatTaskAdd(a *AiSeatTask) (int64, error)

func AiTaskAdd

func AiTaskAdd(a *AiTask) (int64, error)

func AiTaskAutoReset

func AiTaskAutoReset()

func AiTaskReset

func AiTaskReset(id int64) error

func AiTaskStop

func AiTaskStop(id int64, i int) error

func ApiAdd

func ApiAdd(a *Api) (int64, error)

func ApiDetailAdd

func ApiDetailAdd(a *ApiDetail) (int64, error)

func ApiParamAdd

func ApiParamAdd(a *ApiParam) (int64, error)

func AuthAdd

func AuthAdd(auth *Auth) (int64, error)

func CallDelete

func CallDelete(id int64) error

func CallGateWayAdd

func CallGateWayAdd(a CallGateWay) (int64, error)

func CallGateWayEdit

func CallGateWayEdit(a CallGateWay) error

func CheckNumberMap

func CheckNumberMap(groupid, numid int64) bool

func ChengeAddressBookById

func ChengeAddressBookById(phone, name, alias, extension, spell, alias_str, bumeng, id string) error

修改addressBook

func CodeAdd

func CodeAdd(a *Code) (int64, error)

func CopyNodeProcess

func CopyNodeProcess(id int64)

复制porcees

func CopyTpl

func CopyTpl(tpl, id int64) error

拷贝模板

func DatchDelete

func DatchDelete(sql string) error

func DelectAddressBookById

func DelectAddressBookById(id string) error

删除address

func DelectRoute

func DelectRoute(id int64) error

func DeleteAgentGroup

func DeleteAgentGroup(id int) error

func DeleteAgentGroupNumber

func DeleteAgentGroupNumber(extension string) error

func DeleteNotMatchAllByTpl

func DeleteNotMatchAllByTpl(tpl int64) error

func DeleteProcess

func DeleteProcess(tpl int) error

删除tql

func EnvAdd

func EnvAdd(a *Env) (int64, error)

func Eqint64

func Eqint64(a, b int64) bool

func ErrorLog

func ErrorLog(err error)

func ExtansionAdd

func ExtansionAdd(p *AiExtansion) (int64, error)

func GateWayAdd

func GateWayAdd(a *GateWay) (int64, error)

func GatewayGroupAdd

func GatewayGroupAdd(a *GatewayGroup) (int64, error)

func GetCallGatewayName

func GetCallGatewayName(extension string) (string, string, error)

func GetCdrCondition

func GetCdrCondition(taskId int64, start, end, caller, timemax, timemin, classify, uuid string, intention, userId int) (string, error)

func GetCdrCondition2

func GetCdrCondition2(taskId int64, start, end, caller, timemax, timemin, classify, uuid string, intention, userId int) (string, error)

func GetCdrCondition3

func GetCdrCondition3(taskId int64, start, end, caller, timemax, timemin, classify, uuid string, intention, userId int) (string, error)

func GetCdrInfo

func GetCdrInfo(userId int) (int, error)

获取列表

func GetConnectCounts

func GetConnectCounts(userId int) (int, error)

获取接通了的数量

func GetFSExternalPath

func GetFSExternalPath(name string) (string, error)

func GetFlowCount

func GetFlowCount(userId int) (int, error)

获取列表

func GetGateWayNameByUserId

func GetGateWayNameByUserId(userid int) ([]string, error)

func GetGroupMapId

func GetGroupMapId(extension string) int

获取全部列表

func GetNodeName

func GetNodeName(id, tplid int64) (string, error)

func GetNumberCounts

func GetNumberCounts(userId int) (int, error)

获取今日任务数量

func GetRunTimeInfo

func GetRunTimeInfo(owner int) (int, error)

获取列表

func GetTaskCount

func GetTaskCount(userId int) (int, error)

获取任务数量

func GetUnconnectCounts

func GetUnconnectCounts(userId int) (int, error)

获取未接通的数量

func GetUserCountInfo

func GetUserCountInfo(owner int) (int, error)

并发数

func GroupAdd

func GroupAdd(a *Group) (int64, error)

func GroupAddByFunction

func GroupAddByFunction(thread *NumberThread, a *GroupMap2) (int, error)

func GroupMapAdd

func GroupMapAdd(a *GroupMap) (int64, error)

func Init

func Init()

func InsertRoute

func InsertRoute(p *AiRoute) (int64, error)

func InsertRouteDetail

func InsertRouteDetail(p *AiRouteDetails) (int64, error)

func InsertSeatCdr

func InsertSeatCdr(uuid, phone_own string) error

func InsertSeatNumber

func InsertSeatNumber(gid int64, number, extension, name string) error

添加座席号码

func InsertaddressBook

func InsertaddressBook(a *AiAddressBook) (int64, error)

func IsRuntimeByCallId

func IsRuntimeByCallId(callid string, userId int) (bool, error)

func LockSeat

func LockSeat(id int64, lock string) error

func LockState

func LockState(id int64) (bool, error)

func NumberGropAdd

func NumberGropAdd(p *CcNumberGroup) (int64, error)

func NumberGroupAdd

func NumberGroupAdd(a *NumberGroup) (int64, error)

func NumberGroupMapGetListCount

func NumberGroupMapGetListCount(gid int) (error, int64)

func NwayAutoResetTask

func NwayAutoResetTask()

func ParamGetListByTape

func ParamGetListByTape(tplid int64) [][]*AIVoiceLibrary

获取列表

func ProcessAdd

func ProcessAdd(p *AiProcess) (int64, error)

func ProcessContentAdd

func ProcessContentAdd(p *AiProcessContent) (int64, error)

func QueryProcessStartNode

func QueryProcessStartNode(tpl int) error

func Reportcdr

func Reportcdr(start, end string, userId int) ([]int, error)

获取cdr 相关内容

func RingAddData

func RingAddData(name, path string) error

添加 彩铃

func RingDeleteData

func RingDeleteData(id string) error

彩铃列表 删除

func RingUpdateData

func RingUpdateData(id, name, path string) error

修改 彩铃

func RoleAdd

func RoleAdd(role *Role) (int64, error)

func RoleAuthAdd

func RoleAuthAdd(ra *RoleAuth) (int64, error)

func RoleAuthDelete

func RoleAuthDelete(id int) (int64, error)

func RoleAuthGetByIds

func RoleAuthGetByIds(RoleIds string) (Authids string, err error)

获取多个

func RoleAuthMultiAdd

func RoleAuthMultiAdd(ras []*RoleAuth) (n int, err error)

func RunTimeAdd

func RunTimeAdd(p *RunTimeModel) (int64, error)

func SearchCdrInfo

func SearchCdrInfo(start string, userId int) (int, int, int, error)

获取cdr 相关内容

func SearchCdrInfos

func SearchCdrInfos(taskId int64, start, end, caller, timemax, timemin, classify, uuid string, intention int, userId int) (int, int, int, error)

获取cdr 相关内容

func SearchSeatCdrInfo

func SearchSeatCdrInfo(start, end, userId string, id int) (int, int, error)

获取cdr 相关内容

func SearchSeatCdrInfo1

func SearchSeatCdrInfo1(start, end, phone, timemax, timemin, userId string, id int) (int, int, error)

获取cdr 相关内容

func SeatAdd

func SeatAdd(p *AiSeat) (int64, error)

func SeatPassd

func SeatPassd(id int64) error

func SelectCallExtension

func SelectCallExtension(gid int64) ([]string, error)

查找座席组中的分机

func SelectExtension

func SelectExtension(id, name string) (string, error)

func SelectTeamGroupMap

func SelectTeamGroupMap(extension string) (int64, error)

修改这个任务的归宿

func ServersAdd

func ServersAdd(p *AiServers) (int64, error)

func SetCumbersUuid

func SetCumbersUuid(id int64, uuid string) error

func SetExtensionMemo

func SetExtensionMemo(id int64, memo string) error

func SetExtensionYx

func SetExtensionYx(id int64, yx string) error

func SetNodePositionMode

func SetNodePositionMode(id, parent int64) error

获取内容

func SetTeamGroupMap

func SetTeamGroupMap(gid, id int64, extension string) error

修改这个任务的归宿

func SetextensionGateway

func SetextensionGateway(gid int64, extension string) error

func TableName

func TableName(name string) string

func TeamGroupAdd

func TeamGroupAdd(p *AiSeatGroup) (int64, error)

func TplAdd

func TplAdd(p *AiTpl) (int64, error)

func TplRepair

func TplRepair(tpl int) error

func UpdateExtensionById

func UpdateExtensionById(p1, p2, id string) error

func UpdateKeywordFromId

func UpdateKeywordFromId(keyword string, id int64) error

根据id 修改关键字

func UpdateLastFinishTimeAndState

func UpdateLastFinishTimeAndState(id int64) error

func UpdateNodeContentFromId

func UpdateNodeContentFromId(nodeContent string, id int64) error

根据processid 修改node_content

func UpdateRoute

func UpdateRoute(id int64, Dialplan_number, Dialplan_name, tag, data string) error

func UpdateUser

func UpdateUser(loginName, password, seatname string) error

func UptateResetNumberMap

func UptateResetNumberMap(groupid int64) error

如果有新值添加成功,就修改task的状态,变为进行中

func UptateTaskState

func UptateTaskState(groupid int64) error

如果有新值添加成功,就修改task的状态,变为进行中

func VoiceLibraryAdd

func VoiceLibraryAdd(p *AIVoiceLibrary) (int64, error)

Types

type AIVoiceLibrary

type AIVoiceLibrary struct {
	Id         int64
	Process_id int64
	Topic      string
	Voice_path string
	Voice_type string
}

func (*AIVoiceLibrary) TableName

func (a *AIVoiceLibrary) TableName() string

type Admin

type Admin struct {
	Id           int
	LoginName    string
	RealName     string
	Password     string
	RoleIds      string
	Phone        string
	Email        string
	Salt         string
	LastLogin    int64
	LastIp       string
	Status       int
	CreateId     int
	UpdateId     int
	CreateTime   int64
	UpdateTime   int64
	Exp_time     int64
	Is_org       bool
	Org_name     string
	Org_fee_rate float64
	Org_balance  float64
	User_count   int
}

func AdminGetById

func AdminGetById(id int) (*Admin, error)

func AdminGetByName

func AdminGetByName(loginName string) (*Admin, error)

func AdminGetList

func AdminGetList(page, pageSize int, filters ...interface{}) ([]*Admin, int64)

func UserGroupBySelfId

func UserGroupBySelfId(id int) ([]*Admin, error)

func UserGroupIdName

func UserGroupIdName(id int) ([]*Admin, error)

func (*Admin) Delect

func (a *Admin) Delect(fields ...string) error

func (*Admin) TableName

func (a *Admin) TableName() string

func (*Admin) Update

func (a *Admin) Update(fields ...string) error

type AiAddressBook

type AiAddressBook struct {
	Id          int64
	Phone       string
	Extension   string
	Name        string
	Spell       string
	Department  string
	State       string
	Alias       string
	Alias_spell string
}

func AiAddressBookGetList

func AiAddressBookGetList(arr []string) ([]AiAddressBook, error)

func SelectAddressBookItem

func SelectAddressBookItem(id int64) (AiAddressBook, error)

func (*AiAddressBook) TableName

func (a *AiAddressBook) TableName() string

type AiCdr

type AiCdr struct {
	Id                int64
	Account_id        int
	Callee            string
	Caller            string
	Start_time        string
	End_time          string
	Route_id          int64
	Fee_rate          float32
	Duration          int
	Bill_balance      float32
	Record_base       string
	Record_path       string
	Task_id           int64
	Call_id           string
	Intention         int
	Hangup_dispostion string
	Term_cause        string
	Term_status       string
	Talk_crycle       string
}

func AiCdrGetList

func AiCdrGetList(page, pageSize int, filters ...interface{}) ([]*AiCdr, int64)

func SearchCdr

func SearchCdr(taskId int64, start, end, caller, timemax, timemin, classify, uuid string, intention, page, pageSize int, userId int) ([]AiCdr, int64, error)

获取列表

func SearchCdr1

func SearchCdr1(start string, userid int, page, pageSize int) ([]AiCdr, int64, error)

获取子列表

func (*AiCdr) Delete

func (a *AiCdr) Delete() error

func (*AiCdr) TableName

func (a *AiCdr) TableName() string

type AiExtansion

type AiExtansion struct {
	Id               int64
	Extension_name   string //分机号码
	Extension_number string //分机号码
	Extension_pswd   string //分机密码
	Reg_state        string //REGED ,UNREG  ,分机发register的状态记录
	Seat_state       string //up,down,座席上下线
	Seat_status      string //idle,busy,座席忙闲
	Locked           bool   //idle,busy,座席忙闲
	Callout_gateway  int64  //出局网关
	Login_password   string
}

func ExtansionGetAllList

func ExtansionGetAllList() []*AiExtansion

获取全部列表

func ExtansionGetById

func ExtansionGetById(id int) (*AiExtansion, error)

根据ID查询

func ExtansionGetList

func ExtansionGetList(page, pageSize int, filters ...interface{}) ([]*AiExtansion, int64)

获取列表

func SelectExtensionById

func SelectExtensionById(id int64) (AiExtansion, error)

func TeamGroupSetList

func TeamGroupSetList(page, pageSize int, gId int64) ([]AiExtansion, int64)

获取指派的分机列表

func (*AiExtansion) Delete

func (a *AiExtansion) Delete(fields ...string) error

删除数据库

func (*AiExtansion) TableName

func (a *AiExtansion) TableName() string

func (*AiExtansion) Update

func (a *AiExtansion) Update(fields ...string) error

更新数据库

type AiFlowContent

type AiFlowContent struct {
	Id           int64
	Ai_speak     string
	People_speak string
	Call_id      string
	Voice_path   string
	Flow_time    string
	Node_name    string
	Description  string
	Match_key    string
	Process_id   int64
}

func AiFlowContentGetList

func AiFlowContentGetList(page, pageSize int, filters ...interface{}) ([]*AiFlowContent, int64)

func AiFlowContentGetListAll

func AiFlowContentGetListAll(filters ...interface{}) ([]*AiFlowContent, int64)

func (*AiFlowContent) Delete

func (a *AiFlowContent) Delete() error

func (*AiFlowContent) TableName

func (a *AiFlowContent) TableName() string

type AiNotMatch

type AiNotMatch struct {
	Id          int
	Tpl_id      int64
	Node_id     int64
	Words       string
	Create_time string
	Counts      int
	Uuid        string
	Record_file string
}

func GatNotMatchById

func GatNotMatchById(id int) (*AiNotMatch, error)

func GetAiNotMatchList

func GetAiNotMatchList(page, pageSize int, filters ...interface{}) ([]*AiNotMatch, int64)

func (*AiNotMatch) Delete

func (a *AiNotMatch) Delete() error

func (*AiNotMatch) TableName

func (a *AiNotMatch) TableName() string

type AiNumTaskMap

type AiNumTaskMap struct {
	Id              int64
	Task_id         int64
	Number_group_id int64
	Call_state      int
	Call_count      int
}

type AiNumbers

type AiNumbers struct {
	Id         int64
	Dst_number string
	Num_own    string
}

func AiNumbersGetById

func AiNumbersGetById(id int) (*AiNumbers, error)

func AiNumbersGetByName

func AiNumbersGetByName(dstNumber string) (*AiNumbers, error)

func AiNumbersGetList

func AiNumbersGetList(page, pageSize int, filters ...interface{}) ([]*AiNumbers, int64)

func (*AiNumbers) CheckNumber

func (a *AiNumbers) CheckNumber(num string) (int64, error)

func (*AiNumbers) Delete

func (a *AiNumbers) Delete() error

func (*AiNumbers) DeleteMap

func (a *AiNumbers) DeleteMap() error

func (*AiNumbers) TableName

func (a *AiNumbers) TableName() string

func (*AiNumbers) Update

func (a *AiNumbers) Update(fields ...string) error

type AiProcess

type AiProcess struct {
	Id               int64
	Name             string //流程名称
	Node             int    //任务节点
	Node_name        string //节点名称
	Node_type        int    //节点类型,0为语音文件,1为TTS文字
	Node_content     string //节点内容,根据类型,文字或者录音文件绝对地址
	Keyword          string //关键字,以 “|”分隔
	Owner_tpl_id     int64  //归属模板id
	Scene            int    //场景;语境;情景;0为肯定,1为否定,2为强烈拒绝,4为关键节点,5未知,6短信,7挽留,8判断
	Ai_order         int    //节点优先关系处理
	Mode             int    //打断。0支持打断,1支持不打断,2支持按需求打断
	Target           int64  //该节点的下一节点id
	Node_desc        string //描述该节点最终叙述的详细内容
	Action           int64  //动作 0:下一级,1:跳转,2:再说一遍,3:挂断,4,转人工
	Min_speak_ms     int    `orm:"default(100)"`   //最小通话时间
	Min_pause_ms     int    `orm:"default(500)"`   //最小间隔时间
	Max_waiting_ms   int    `orm:"default(5000)"`  //最大等待时间
	Max_recording_ms int    `orm:"default(10000)"` //最大录音时间
	Gain             int    //增益
	Retry            int    //重置
	Parent_id        int64  //父级节点
	B_interrupt      bool   //父级节点
	Tpl_target       int64  //目标模板
	Adjust_keyword   string //校正词
	Last_action      int
	Last_target      int64
}

func GetNodeProcessMessage

func GetNodeProcessMessage(node int, tpl_id int64) (*AiProcess, error)

获取内容

func GetProcessMessage

func GetProcessMessage(keyword string, tpl_id int64) (*AiProcess, error)

获取节点内容列表

func ProcessGetById

func ProcessGetById(id int) (*AiProcess, error)

根据ID查询 获取process

func ProcessGetByTplId

func ProcessGetByTplId(id int64, node int, parent_id int64) (*AiProcess, error)

根据tplID查询 获取process

func ProcessGetGlobalNodeArr

func ProcessGetGlobalNodeArr(id int64, node int) ([]*AiProcess, error)

根据节点ID查询 所有全局数组

func ProcessGetList

func ProcessGetList(page, pageSize int, tableName string, filters ...interface{}) ([]*AiProcess, int64)

获取列表

func ProcessGetNodeArr

func ProcessGetNodeArr(id int64, node string) ([]*AiProcess, error)

根据节点ID查询 所有数组

func ProcessNoIdGetByTplId

func ProcessNoIdGetByTplId(id int64, node int) (int64, *AiProcess, error)

根据tplID查询 获取process

func ProcessToNodeForKeyword

func ProcessToNodeForKeyword(node int, tpl_id int64) ([]*AiProcess, error)

* 根据节点获取当前节点的关键字 node: 当前节点 tpl_id: 模板id return :process对象

func (*AiProcess) Delete

func (a *AiProcess) Delete(fields ...string) error

删除数据库

func (*AiProcess) TableName

func (a *AiProcess) TableName() string

func (*AiProcess) Update

func (a *AiProcess) Update(fields ...string) error

更新数据库

type AiProcessContent

type AiProcessContent struct {
	Id         int64
	Process_id int64  //process 的内容
	Type       int    //节点类型,0为语音文件,1为TTS文字
	Content    string //节点内容,根据类型,文字或者录音文件绝对地址
	Ai_order   int    //序列
	Audio_path string //文件路径
}

func ProcessContentByProcess

func ProcessContentByProcess(id int64) (*AiProcessContent, error)

根据tplID查询 获取process

func ProcessContentGetById

func ProcessContentGetById(id int) (*AiProcessContent, error)

根据ID查询 获取process

func ProcessContentGetList

func ProcessContentGetList(page, pageSize int, tableName string, filters ...interface{}) ([]*AiProcessContent, int64)

获取节点内容列表

func (*AiProcessContent) Delete

func (a *AiProcessContent) Delete(fields ...string) error

删除数据库

func (*AiProcessContent) ProcessContentByProcessId

func (a *AiProcessContent) ProcessContentByProcessId() error

func (*AiProcessContent) TableName

func (a *AiProcessContent) TableName() string

func (*AiProcessContent) Update

func (a *AiProcessContent) Update(fields ...string) error

更新数据库

type AiProcessNode

type AiProcessNode struct {
	Id        int64
	Parent_id int64 //process 的内容
}

func ProcessGetChildArr

func ProcessGetChildArr(tpl int, node int, parent int64) ([]AiProcessNode, error)

type AiProcessNodeAndTpl

type AiProcessNodeAndTpl struct {
	Node         int
	Owner_tpl_id int64 //process 的内容
}

type AiRoute

type AiRoute struct {
	Id               int64
	Dialplan_name    string
	Dialplan_context string
	Dialplan_number  string
}

func (*AiRoute) TableName

func (a *AiRoute) TableName() string

type AiRouteDetails

type AiRouteDetails struct {
	Id                      int64
	Dialplan_id             int64
	Dialplan_detail_tag     string
	Dialplan_detail_data    string
	Dialplan_detail_type_id int
}

func (*AiRouteDetails) TableName

func (a *AiRouteDetails) TableName() string

type AiRouteList

type AiRouteList struct {
	Id                   int64
	Dialplan_name        string
	Dialplan_context     string
	Dialplan_detail_tag  string
	Dialplan_number      string
	Dialplan_detail_data string
}

func GetRoute

func GetRoute(id int64) (AiRouteList, error)

func GetRouteList

func GetRouteList(page, pageSize int) (int64, []AiRouteList, error)

type AiSeat

type AiSeat struct {
	Id               int64
	Agent_no         string //座席号码
	Agent_name       string //座席号码
	Agent_pass       string //座席密码
	Agent_externsion string //对应的分机号
}

func SeatGetById

func SeatGetById(id int) (*AiSeat, error)

根据ID查询

func SeatGetList

func SeatGetList(page, pageSize int, gId int64) ([]AiSeat, int64)

获取列表

func (*AiSeat) Delete

func (a *AiSeat) Delete(fields ...string) error

删除数据库

func (*AiSeat) TableName

func (a *AiSeat) TableName() string

func (*AiSeat) Update

func (a *AiSeat) Update(fields ...string) error

更新数据库

type AiSeatGroup

type AiSeatGroup struct {
	Id             int64
	Group_name     string
	Callout_prefix string
}

func SeatGroupGetList

func SeatGroupGetList(page, pageSize int, filters ...interface{}) ([]*AiSeatGroup, int64)

func TeamGroupList

func TeamGroupList() ([]*AiSeatGroup, int64, error)

查找所有的班组

func (*AiSeatGroup) TableName

func (a *AiSeatGroup) TableName() string

type AiSeatGroupMap

type AiSeatGroupMap struct {
	Id             int64
	Agent_group    int64
	Agent_group_id int64
}

func (*AiSeatGroupMap) TableName

func (a *AiSeatGroupMap) TableName() string

type AiSeatTask

type AiSeatTask struct {
	Id               int64
	Tk_name          string
	Tk_start_time    string
	Tk_end_time      string
	Tk_type          int
	Tk_state         int
	Tk_owner         int
	Tk_gateway_group int64
	Tk_num_group     int64
}

func ASeatTaskGetById

func ASeatTaskGetById(id int) (*AiSeatTask, error)

根据id修改seattask

func AiSeatTaskGetById

func AiSeatTaskGetById(id int) (*AiSeatTask, error)

func AiSeatTaskGetList

func AiSeatTaskGetList(page, pageSize int, filters ...interface{}) ([]*AiSeatTask, int64)

座席

func AiTaskGetByName1

func AiTaskGetByName1(taskName string) (*AiSeatTask, error)

func (*AiSeatTask) Delete

func (a *AiSeatTask) Delete() error

func (*AiSeatTask) TableName

func (a *AiSeatTask) TableName() string

func (*AiSeatTask) Update

func (a *AiSeatTask) Update(fields ...string) error

type AiServers

type AiServers struct {
	Id       int64
	Serverip string //ip
	Descs    string //描述
}

func GetImServersList

func GetImServersList(tableName string, filters ...interface{}) ([]*AiServers, error)

获取即时通讯 模板列表

func ServersGetById

func ServersGetById(id int) (*AiServers, error)

根据ID查询

func ServersGetList

func ServersGetList(page, pageSize int, tableName string, filters ...interface{}) ([]*AiServers, int64)

获取列表

func (*AiServers) Delete

func (a *AiServers) Delete(fields ...string) error

删除数据库

func (*AiServers) TableName

func (a *AiServers) TableName() string

func (*AiServers) Update

func (a *AiServers) Update(fields ...string) error

更新数据库

type AiTask

type AiTask struct {
	Id                    int64
	Tk_name               string
	Tk_level              int
	Tk_start_time         string
	Tk_end_time           string
	Tk_type               int
	Tk_state              int
	Tk_param1             int
	Tk_owner              int
	Tk_desc               string
	Tk_out_number         string
	Tk_tpl_id             int64
	Tk_max_call_time      int
	Tk_gateway_group      int64
	Tk_num_group          int64
	Tk_work_start_time    string
	Tk_work_end_time      string
	Serverip              string
	Tk_call_interval      int
	Tk_last_finish_time   string
	Tk_is_auto_reset      int
	Tk_auto_reset_inteval int
}

func AiTaskGetById

func AiTaskGetById(id int) (*AiTask, error)

func AiTaskGetByName

func AiTaskGetByName(taskName string, owner int) (*AiTask, error)

func AiTaskGetList

func AiTaskGetList(page, pageSize int, filters ...interface{}) ([]*AiTask, int64)

func TaskIdName

func TaskIdName() ([]*AiTask, error)

func (*AiTask) Delete

func (a *AiTask) Delete() error

func (*AiTask) TableName

func (a *AiTask) TableName() string

func (*AiTask) Update

func (a *AiTask) Update(fields ...string) error

type AiTpl

type AiTpl struct {
	Id        int64
	Tpl_name  string
	Owner_id  int
	Tpl_desc  string
	Parent_id int64
	Root_id   int64
}

func GetAllTpl

func GetAllTpl(id int, parent_id int64) ([]*AiTpl, error)

获取全部父节点的tpl

func GetAllTpls

func GetAllTpls(id int) ([]*AiTpl, error)

获取全部tpl

func GetImTplList

func GetImTplList(tableName string, filters ...interface{}) ([]*AiTpl, error)

获取即时通讯 模板列表

func GetImTplList1

func GetImTplList1(tableName string, id int, filters ...interface{}) ([]*AiTpl, error)

获取即时通讯 模板列表

func TplGetAllList

func TplGetAllList(tableName string, filters ...interface{}) ([]*AiTpl, int64)

获取列表

func TplGetById

func TplGetById(id int) (*AiTpl, error)

根据ID查询

func TplGetList

func TplGetList(page, pageSize int, tableName string, filters ...interface{}) ([]*AiTpl, int64)

获取列表

func (*AiTpl) Delete

func (a *AiTpl) Delete(fields ...string) error

删除数据库

func (*AiTpl) TableName

func (a *AiTpl) TableName() string

func (*AiTpl) Update

func (a *AiTpl) Update(fields ...string) error

更新数据库

type Api

type Api struct {
	Id         int
	GroupId    int
	SourceName string
	Status     int
	CreateId   int
	AuditId    int
	UpdateId   int
	CreateTime int64
	UpdateTime int64
	AuditTime  int64
}

func ApiGetById

func ApiGetById(id int) (*Api, error)

func ApiGetByName

func ApiGetByName(ApiName string) (*Api, error)

func ApiGetList

func ApiGetList(page, pageSize int, filters ...interface{}) ([]*Api, int64)

func (*Api) TableName

func (a *Api) TableName() string

func (*Api) Update

func (a *Api) Update(fields ...string) error

type ApiDetail

type ApiDetail struct {
	Id           int
	SourceId     int
	Method       int
	ApiName      string
	ApiUrl       string
	ProtocolType int
	Result       string
	Example      string
	Detail       string
	Status       int
	CreateId     int
	AuditId      int
	UpdateId     int
	CreateTime   int64
	UpdateTime   int64
	AuditTime    int64
}

func ApiDetailGetById

func ApiDetailGetById(id int) (*ApiDetail, error)

func (*ApiDetail) TableName

func (a *ApiDetail) TableName() string

func (*ApiDetail) Update

func (a *ApiDetail) Update(fields ...string) error

type ApiDetails

type ApiDetails struct {
	Id           int
	SourceId     int
	Method       int
	ApiName      string
	ApiUrl       string
	ProtocolType int
	Result       string
	Example      string
	Detail       string
	Status       int
	CreateId     int
	AuditId      int
	UpdateId     int
	CreateTime   int64
	UpdateTime   int64
	AuditTime    int64
	CreateName   string
	UpdateName   string
	AuditName    string
}

func ApiDetailsGetById

func ApiDetailsGetById(id int) ([]*ApiDetails, error)

type ApiParam

type ApiParam struct {
	Id         int
	DetailId   int64
	ApiKey     string
	ApiType    string
	ApiValue   string
	ApiDetail  string
	IsNull     string
	Status     int
	CreateId   int
	UpdateId   int
	CreateTime int64
	UpdateTime int64
}

func ApiParamGetById

func ApiParamGetById(id int) ([]*ApiParam, error)

func (*ApiParam) Delete

func (a *ApiParam) Delete(id int64, update_id int) (int64, error)

func (*ApiParam) TableName

func (a *ApiParam) TableName() string

func (*ApiParam) Update

func (a *ApiParam) Update(fields ...string) error

type Auth

type Auth struct {
	Id         int
	AuthName   string
	AuthUrl    string
	UserId     int
	Pid        int
	Sort       int
	Icon       string
	Is_show    int
	Status     int
	CreateId   int
	UpdateId   int
	CreateTime int64
	UpdateTime int64
}

func AuthGetById

func AuthGetById(id int) (*Auth, error)

func AuthGetList

func AuthGetList(page, pageSize int, filters ...interface{}) ([]*Auth, int64)

func AuthGetListByIds

func AuthGetListByIds(authIds string, userId int) ([]*Auth, error)

func (*Auth) Delete

func (a *Auth) Delete(id ...string) error

func (*Auth) TableName

func (a *Auth) TableName() string

func (*Auth) Update

func (a *Auth) Update(fields ...string) error

type CallGateWay

type CallGateWay struct {
	Id                         int64
	Gateway_name               string
	Gateway_url                string
	Call_prefix                string
	Max_call                   int
	Added_autodial             bool
	Effective_caller_id_number string
	Gateway_type               int
	Register_number            string
	Fromuser                   string
}

func CheckCallGateway

func CheckCallGateway(callGatewayId int64) (CallGateWay, error)

type CallGateway

type CallGateway struct {
	Id           int64
	Gateway_name string
}

func GetGatewayList

func GetGatewayList() ([]*CallGateway, int64, error)

查找所有的出局网关

type CallRings

type CallRings struct {
	Id        int64
	Ring_name string //ip
	Ring_path string //描述
}

func RingGetList

func RingGetList(page, pageSize int, filters ...interface{}) ([]*CallRings, int64)

查 找 彩铃列表

type Call_extension

type Call_extension struct {
	Id               int64
	Login_password   string
	Extension_number string
}

func SeatIsUser

func SeatIsUser(loginName, password string) ([]Call_extension, bool)

type Call_ring

type Call_ring struct {
	Id        int64
	Ring_name string
}

func GetCallRingList

func GetCallRingList() ([]Call_ring, error)

type CcNumber

type CcNumber struct {
	Id             int64
	Group_id       int64
	Phone_number   string
	Called         string //是否呼叫
	Memo           string //标注
	Intentionality int    //意向
	Passed         bool   //是否跳过
	Uuid           string
	Extension      string
	Phone_own      string
	Called_time    string
}

func SeatNumberGetList

func SeatNumberGetList(page, pageSize int, filters ...interface{}) ([]*CcNumber, int64)

获取号码列表

func SelectExtensionList

func SelectExtensionList(page, pageSize int, extension string) ([]CcNumber, int64, error)

func (*CcNumber) TableName

func (a *CcNumber) TableName() string

type CcNumberGroup

type CcNumberGroup struct {
	Id                 int64
	Group_name         string
	Own_agent_group_id int64 //直属哪个座席组

}

func (*CcNumberGroup) TableName

func (a *CcNumberGroup) TableName() string

type CcNumberGroups

type CcNumberGroups struct {
	Id                 int64
	Group_name         string
	Own_agent_group_id int64  //直属哪个座席组
	Import_time        string //导入时间
}

func SeatNumberGroupGetList

func SeatNumberGroupGetList(page, pageSize int) ([]CcNumberGroups, int64)

获取号码组列表

type Code

type Code struct {
	Id         int
	Code       string
	Desc       string
	Detail     string
	Status     int
	CreateId   int
	UpdateId   int
	CreateTime int64
	UpdateTime int64
}

func CodeGetById

func CodeGetById(id int) (*Code, error)

func CodeGetByName

func CodeGetByName(CodeName string) (*Code, error)

func CodeGetList

func CodeGetList(page, pageSize int, filters ...interface{}) ([]*Code, int64)

func (*Code) TableName

func (a *Code) TableName() string

func (*Code) Update

func (a *Code) Update(fields ...string) error

type DurationModel

type DurationModel struct {
	Adc      int64
	Duration int64
}

func GetDoneNumberCounts

func GetDoneNumberCounts(userId int) (int, DurationModel, error)

获取今日完成任务数量

type Env

type Env struct {
	Id         int
	EnvName    string
	EnvHost    string
	Detail     string
	Status     int
	CreateId   int
	UpdateId   int
	CreateTime int64
	UpdateTime int64
}

func EnvGetById

func EnvGetById(id int) (*Env, error)

func EnvGetByName

func EnvGetByName(EnvName string) (*Env, error)

func EnvGetList

func EnvGetList(page, pageSize int, filters ...interface{}) ([]*Env, int64)

func (*Env) TableName

func (a *Env) TableName() string

func (*Env) Update

func (a *Env) Update(fields ...string) error

type GateWay

type GateWay struct {
	Id               int64
	Gateway_name     string
	Gateway_group_id int64
	Max_concurrent   int
	Gateway_url      string
	Gateway_state    int
	Gateway_auth     string
	Call_gateway_id  int64
	Prefix           string
}

func GateWayGetById

func GateWayGetById(id int) (*GateWay, error)

func GateWayGetByName

func GateWayGetByName(gatewayName string) (*GateWay, error)

func GateWayGetList

func GateWayGetList(page, pageSize int, filters ...interface{}) ([]*GateWay, int64)

func GatewayIdName

func GatewayIdName() ([]*GateWay, error)

func (*GateWay) Delete

func (a *GateWay) Delete() error

func (*GateWay) TableName

func (a *GateWay) TableName() string

func (*GateWay) Update

func (a *GateWay) Update(fields ...string) error

type GateWayidAndName

type GateWayidAndName struct {
	Id           int64
	Gateway_name string
}

func GetCallGateway

func GetCallGateway() ([]GateWayidAndName, error)

type GatewayGroup

type GatewayGroup struct {
	Id            int64
	Group_name    string
	Group_desc    string
	Group_user_id int
	Group_type    int
}

func GatewayGroupGetById

func GatewayGroupGetById(id int) (*GatewayGroup, error)

func GatewayGroupGetByName

func GatewayGroupGetByName(gateway_groupName string) (*GatewayGroup, error)

func GatewayGroupGetList

func GatewayGroupGetList(page, pageSize int, filters ...interface{}) ([]*GatewayGroup, int64)

func GatewayGroupIdName

func GatewayGroupIdName() ([]*GatewayGroup, error)

func GatewayGroupIdName1

func GatewayGroupIdName1(id int) ([]*GatewayGroup, error)

func (*GatewayGroup) Delete

func (a *GatewayGroup) Delete() error

func (*GatewayGroup) TableName

func (a *GatewayGroup) TableName() string

func (*GatewayGroup) Update

func (a *GatewayGroup) Update(fields ...string) error

type Group

type Group struct {
	Id         int
	GroupName  string
	Detail     string
	Status     int
	CreateId   int
	UpdateId   int
	CreateTime int64
	UpdateTime int64
}

func GroupGetById

func GroupGetById(id int) (*Group, error)

func GroupGetByName

func GroupGetByName(groupName string) (*Group, error)

func GroupGetList

func GroupGetList(page, pageSize int, filters ...interface{}) ([]*Group, int64)

func (*Group) TableName

func (a *Group) TableName() string

func (*Group) Update

func (a *Group) Update(fields ...string) error

type GroupMap

type GroupMap struct {
	Id           int64
	Group_id     int64
	Number_id    int64
	Has_called   int
	Param1       string
	Param2       string
	Param3       string
	Param4       string
	Param5       string
	Param6       string
	Param7       string
	Param8       string
	Param9       string
	Param10      string
	Param1_type  string
	Param2_type  string
	Param3_type  string
	Param4_type  string
	Param5_type  string
	Param6_type  string
	Param7_type  string
	Param8_type  string
	Param9_type  string
	Param10_type string
}

func AiNumbersMapGetById

func AiNumbersMapGetById(id int) (*GroupMap, error)

func (*GroupMap) Delete

func (a *GroupMap) Delete() error

func (*GroupMap) TableName

func (a *GroupMap) TableName() string

type GroupMap2

type GroupMap2 struct {
	Group_id     int64
	Number       string
	Param1       string
	Param2       string
	Param3       string
	Param4       string
	Param5       string
	Param6       string
	Param7       string
	Param8       string
	Param9       string
	Param10      string
	Param1_type  string
	Param2_type  string
	Param3_type  string
	Param4_type  string
	Param5_type  string
	Param6_type  string
	Param7_type  string
	Param8_type  string
	Param9_type  string
	Param10_type string
}

type NumberGroup

type NumberGroup struct {
	Id          int64
	Group_name  string
	Own_id      int
	Create_time string
}

func NumberGroupGetById

func NumberGroupGetById(id int) (*NumberGroup, error)

func NumberGroupGetByName

func NumberGroupGetByName(group_name string, own_id int) (*NumberGroup, error)

func NumberGroupGetList

func NumberGroupGetList(page, pageSize int, filters ...interface{}) ([]*NumberGroup, int64)

func NumberGroupIdName

func NumberGroupIdName() ([]*NumberGroup, error)

func NumberGroupIdName1

func NumberGroupIdName1(id int) ([]*NumberGroup, error)

func (*NumberGroup) Delete

func (a *NumberGroup) Delete() error

func (*NumberGroup) TableName

func (a *NumberGroup) TableName() string

func (*NumberGroup) Update

func (a *NumberGroup) Update(fields ...string) error

type NumberGroupMap

type NumberGroupMap struct {
	Id         int64
	Group_id   int64
	Number_id  int64
	Map_id     int64
	Has_called int
	//NumberGroup *NumberGroup
	//Numbers *AiNumbers
	Group_name     string
	Dst_number     string
	Num_state      int
	Last_call_time string
	Num_own        string
	Param1         string
	Param2         string
	Param3         string
	Param4         string
	Param5         string
	Param6         string
	Param7         string
	Param8         string
	Param9         string
	Param10        string
}

func NumberGroupMapGetById

func NumberGroupMapGetById(id int) (*NumberGroupMap, error)

func NumberGroupMapGetByName

func NumberGroupMapGetByName(groupId string) (*NumberGroupMap, error)

func NumberGroupMapGetList

func NumberGroupMapGetList(page, pageSize, gid int) ([]NumberGroupMap, int64)

type NumberThread

type NumberThread struct {
	Count    int
	MaxCount int
	Mutex    sync.Mutex
}

func (*NumberThread) Decr

func (n *NumberThread) Decr()

func (*NumberThread) Incr

func (n *NumberThread) Incr()

当启动一个协程时就++

func (*NumberThread) WhenCanUse

func (n *NumberThread) WhenCanUse() bool

一定要等着有可用的程协数量,防止数据库连接数过多,搞死系统

type Role

type Role struct {
	Id         int
	RoleName   string
	Detail     string
	Status     int
	CreateId   int
	UpdateId   int
	CreateTime int64
	UpdateTime int64
}

func RoleGetById

func RoleGetById(id int) (*Role, error)

func RoleGetList

func RoleGetList(page, pageSize int, filters ...interface{}) ([]*Role, int64)

func (*Role) TableName

func (a *Role) TableName() string

func (*Role) Update

func (r *Role) Update(fields ...string) error

type RoleAuth

type RoleAuth struct {
	AuthId int `orm:"pk"`
	RoleId int64
}

func RoleAuthGetById

func RoleAuthGetById(id int) ([]*RoleAuth, error)

func (*RoleAuth) TableName

func (ra *RoleAuth) TableName() string

type RunTimeModel

type RunTimeModel struct {
	Id             int64
	Taskid         int64
	Call_phone     string
	Call_state     int
	Gateway_id     int64
	Call_time      string
	Answer_time    string
	Talk_crycle    int
	Call_id        string
	Tpl_id         int64
	Display_number string
	Number_map_id  int64
	Mute           string
	Mismatching    string
	Mismatch_times int
	Mute_times     int
}

func GetRunTimeList

func GetRunTimeList() ([]RunTimeModel, error)

获取列表

func (*RunTimeModel) TableName

func (a *RunTimeModel) TableName() string

type SeatCdrModel

type SeatCdrModel struct {
	Id                  int64
	A_uuid              string
	A_answertime        string
	A_calldate          string
	A_endtime           string
	A_duration          int
	A_billsec           int
	A_dispostion        string
	A_calleridnum       string
	A_dst               string
	A_calltype          string
	A_hangup_dispostion string
	Record_file         string
	Memo                string
	Phone_own           string
	Intentionality      int
}

func SearchSeatCdr

func SearchSeatCdr(start, end, caller, timemax, timemin, userId string, page, pageSize, id int) ([]SeatCdrModel, int64, error)

获取子列表 获取列表

type TplGlobal

type TplGlobal struct {
	Tpl_id       int64
	Process_id   int64
	Node         int
	Node_type    int
	Node_content string
	Audio_path   string
}

func GetTplMuteAndMisMatchingById

func GetTplMuteAndMisMatchingById(tpl_id int64) ([]*TplGlobal, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL