123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- import "../base.api"
- type (
- ChartsReq {
- StartDate *string `json:"start_date"`
- EndDate *string `json:"end_date"`
- // 租户id
- OrganizationId *uint64 `json:"organizationId,optional"`
- }
- ChartsResp {
- BaseDataInfo
- Data *ChartsData `json:"data"`
- }
- ChartsData {
- AiResponse *ChartsUint `json:"ai_response"`
- SopRun *ChartsUint `json:"sop_run"`
- TotalFriend *ChartsUint `json:"total_friend"`
- TotalGroup *ChartsUint `json:"total_group"`
- AccountBalance *ChartsUint `json:"account_balance"`
- ConsumeToken *ChartsUint `json:"consume_token"`
- ActiveUser *ChartsUint `json:"active_user"`
- NewUser *ChartsInt `json:"new_user"`
- }
- ChartsUint {
- Count uint64 `json:"count"`
- Rate float32 `json:"rate"`
- Label []string `json:"label"`
- Val []uint64 `json:"val"`
- }
- ChartsInt {
- Count int64 `json:"count"`
- Rate float32 `json:"rate"`
- Label []string `json:"label"`
- Val []int64 `json:"val"`
- }
- )
- @server(
- jwt: Auth
- group: dashboard
- middleware: Authority
- )
- service Wechat {
- // get charts | 获取图表数据
- @handler getCharts
- post /dashboard/charts (ChartsReq) returns (ChartsResp)
- }
|