123456789101112131415161718192021222324252627282930313233343536373839404142 |
- package xiangyu
- import (
- "eta/eta_bridge/controller/resp"
- "eta/eta_bridge/logic/xiangyu"
- "github.com/gin-gonic/gin"
- )
- // XiangyuController 象屿指标
- type XiangyuController struct{}
- // SyncUser
- // @Description: 全量同步用户
- // @author: Roc
- // @receiver xc
- // @datetime 2024-01-22 15:51:25
- // @param c *gin.Context
- func (xc *XiangyuController) SyncUser(c *gin.Context) {
- err := xiangyu.SyncUser()
- if err != nil {
- resp.FailData("同步失败", err.Error(), c)
- return
- }
- resp.Ok("同步成功", c)
- return
- }
- // PullUser
- // @Description: 增量同步用户
- // @author: Roc
- // @receiver xc
- // @datetime 2024-01-23 17:13:07
- // @param c *gin.Context
- func (xc *XiangyuController) PullUser(c *gin.Context) {
- err := xiangyu.PullUser()
- if err != nil {
- resp.FailData("同步失败", err.Error(), c)
- return
- }
- resp.Ok("同步成功", c)
- return
- }
|