Song-Hua, Yang

Results 8 comments of Song-Hua, Yang

I have same problem, how to get groupsuper_id in a *tdlib.Chat

share how to get supergroup_id ``` import "github.com/fatih/structs" // Code chat, err := client.GetChat(chatID) if err != nil { panic(err) } if chat.Type.GetChatTypeEnum() == tdlib.ChatTypeSupergroupType { Map := structs.Map(chat) Type...

``` // viewer: A 表 // customer_name: B 表中要展示的栏位名称 viewer.AddField(lang.Username(), "customer_name", db.Bigint). FieldJoin(types.Join{ Table: "ez_customer", // B 表名称 JoinField: "id", // B 表栏位 Field: "uid", // A 表栏位 }) ```...

``` detail.AddField("Content", "content", db.Text ). 后面的 db.Text 是错误的,这里填写的是 detail 表 id 的 data type 如果没理解错,下面的代码应该可以工作 detail.AddField(DISPLAY_NAME, "content", db.Bigint). FieldJoin(types.Join{ Table: "articles_content", JoinField: "article_id", Field: "id", }) ```

Q2: 扩展问题:同理,如果我想对查询的数据字段进行一些额外的sql语句处理,请问有其他什么方法吗,谢谢 A2: info := userTable.GetInfo().Where("bid", "=", 2)

文件 modules/menu/menu.go 在函式名 func constructMenuTree(menus []map[string]interface{}, parentID int64) []Item { 將 241 行從 title = menus[j]["title"].(string) 改成 title = language.Get(menus[j]["title"].(string)) 即可達到 menu 翻譯功能