1234567891011121314151617181920212223242526272829303132333435 |
- package controllers
- import (
- "hongze/hongze_open_api/services"
- )
- type DayNewController struct {
- BaseCommon
- }
- // RefreshMsg
- // @Title 手动刷新企业微信群消息
- // @Description 手动刷新
- // @router /refresh [get]
- func (c *DayNewController) RefreshMsg() {
- err := services.DayNewWeworkMsgRefresh()
- if err != nil {
- c.FailWithMessage("刷新失败, " + err.Error())
- return
- }
- c.Ok()
- }
- // TranslateContent
- // @Title 手动翻译内容
- // @Description 手动翻译内容
- // @router /translate [get]
- func (c *DayNewController) TranslateContent() {
- err := services.DayNewTranslateContentByGoogle()
- if err != nil {
- c.FailWithMessageErr("翻译失败", err.Error())
- return
- }
- c.Ok()
- }
|