1 Star 0 Fork 0

maomao/go-fly-master

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
notice.go 684 Bytes
一键复制 编辑 原始数据 按行查看 历史
maocs 提交于 2025-04-01 20:24 +08:00 . 初始化
package controller
import (
"github.com/gin-gonic/gin"
"gitee.com/maomaoxiaochao/go-fly-master/tree/master/models"
)
func GetNotice(c *gin.Context) {
kefuId := c.Query("kefu_id")
user := models.FindUser(kefuId)
if user.ID==0{
c.JSON(200, gin.H{
"code": 400,
"msg": "user not found",
})
return
}
welcomeMessage:=models.FindConfig("WelcomeMessage")
offlineMessage:=models.FindConfig("OfflineMessage")
allNotice:=models.FindConfig("AllNotice")
c.JSON(200, gin.H{
"code": 200,
"msg": "ok",
"result": gin.H{
"welcome":welcomeMessage,
"offline":offlineMessage,
"avatar":user.Avator,
"nickname":user.Nickname,
"allNotice":allNotice,
},
})
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/maomaoxiaochao/go-fly-master.git
git@gitee.com:maomaoxiaochao/go-fly-master.git
maomaoxiaochao
go-fly-master
go-fly-master
2aceef85fb87

搜索帮助