refactor(chat): 欢迎语仅保留账号群配置

This commit is contained in:
yml2213
2026-10-30 17:50:37 +08:00
parent 77b5c6123a
commit 0a85634a58
18 changed files with 29 additions and 236 deletions
@@ -78,26 +78,6 @@ func (h *Handler) AdminDeleteQuickReply(c *gin.Context) {
response.OK(c, gin.H{"deleted": true})
}
func (h *Handler) AdminGetAutoWelcome(c *gin.Context) {
message := h.service.GetAutoWelcomeMessage(c.Request.Context())
response.OK(c, gin.H{"message": message})
}
func (h *Handler) AdminUpdateAutoWelcome(c *gin.Context) {
var req struct {
Message string `json:"message" binding:"required"`
}
if err := c.ShouldBindJSON(&req); err != nil {
response.BadRequest(c, "话术内容不能为空")
return
}
if err := h.service.UpdateAutoWelcomeMessage(c.Request.Context(), req.Message); err != nil {
writeChatError(c, err)
return
}
response.OK(c, gin.H{"updated": true})
}
func (h *Handler) AdminGetListingGroupWelcome(c *gin.Context) {
message := h.service.GetListingGroupWelcomeMessage(c.Request.Context())
response.OK(c, gin.H{"message": message})