Jianghan 1 year ago
parent
commit
a996f49cbc
2 changed files with 3 additions and 2 deletions
  1. 1 1
      api/internal/logic/sendmaillogic.go
  2. 2 1
      service/exprot.go

+ 1 - 1
api/internal/logic/sendmaillogic.go

@@ -33,5 +33,5 @@ func (l *SendMailLogic) SendMail(req *types.ExportByDbReq) (resp *types.BiResp,
 		Query:   req.Query,
 		Stype:   req.Stype,
 	})
-	return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg}, err
+	return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
 }

+ 2 - 1
service/exprot.go

@@ -274,8 +274,9 @@ func (e *ExportByDbReq) ExportDataByDb() []byte {
 			"sendState":  state,
 			"createTime": time.Now().Format(DateTime),
 		})
+		return gconv.Bytes(map[string]interface{}{"status": 1, "msg": "导出数据成功"})
 	}
-	return gconv.Bytes(map[string]interface{}{"status": 1})
+	return gconv.Bytes(map[string]interface{}{"status": -1, "msg": "导出数据失败,未查询到数据"})
 }
 
 // 表头