12345678910111213141516171819202122232425262728293031323334353637383940 |
- package controllers
- import (
- "eta/eta_data_analysis/models"
- "eta/eta_data_analysis/services/ruizide"
- "eta/eta_data_analysis/utils"
- "github.com/beego/beego/v2/server/web"
- )
- type RzdController struct {
- web.Controller
- }
- // DealData
- // @Title 解析睿咨得数据
- // @Description 合同套餐列表
- // @Param DayFlag query int false
- // @Param WeekFlag query int false
- // @Success 200 {object} company.GetUnusualRenewListGroupMonthResp
- // @router /rz_deal_data [get]
- func (this *RzdController) DealData() {
- br := new(models.BaseResponse).Init()
- defer func() {
- this.Data["json"] = br
- this.ServeJSON()
- }()
- var err error
- // 解析文件移动到目标目录
- err = ruizide.FileResolver()
- if err != nil {
- utils.FileLog.Error("睿咨得数据处理失败 err:%v", err)
- br.Msg = "操作异常"
- br.ErrMsg = "操作异常,Err:" + err.Error()
- return
- }
- br.Ret = 200
- br.Success = true
- br.Msg = "操作成功"
- }
|