|
@@ -274,7 +274,15 @@ func (this *RaiServeCoAntroller) CoverageRate() {
|
|
|
companyId := this.GetString("CompanyId")
|
|
|
fmt.Println(companyId)
|
|
|
resp := new(cygx.RaiServeCoverageRateResp)
|
|
|
- resp.List = []string{"22%", "33%", "44%", "55%"}
|
|
|
+ //ThisWeekAmount string `comment:"本周互动量"`
|
|
|
+ //LastWeekAmount string `comment:"上周互动量"`
|
|
|
+ //TwoWeekAmount string `comment:"上上周互动量"`
|
|
|
+ //ThreeWeekAmount string `comment:"上三周互动量"`
|
|
|
+ resp.ThisWeekAmount = "22%"
|
|
|
+ resp.LastWeekAmount = "33%"
|
|
|
+ resp.TwoWeekAmount = "44%"
|
|
|
+ resp.ThreeWeekAmount = "55%"
|
|
|
+ //resp.List = []string{"22%", "33%", "44%", "55%"}
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|
|
|
br.Msg = "获取成功"
|
|
@@ -283,6 +291,8 @@ func (this *RaiServeCoAntroller) CoverageRate() {
|
|
|
|
|
|
// @Title 明细列表
|
|
|
// @Description 明细列表接口
|
|
|
+// @Param PageSize query int true "每页数据条数"
|
|
|
+// @Param CurrentIndex query int true "当前页页码,从1开始"
|
|
|
// @Param CompanyId query int false "公司ID"
|
|
|
// @Param TagType query int false "标签类型"
|
|
|
// @Param TagId query int false "标签ID"
|
|
@@ -303,10 +313,21 @@ func (this *RaiServeCoAntroller) BillList() {
|
|
|
br.Ret = 408
|
|
|
return
|
|
|
}
|
|
|
+ pageSize, _ := this.GetInt("PageSize")
|
|
|
+ currentIndex, _ := this.GetInt("CurrentIndex")
|
|
|
companyId, _ := this.GetInt("CompanyId")
|
|
|
tagType, _ := this.GetInt("TagType")
|
|
|
tagId, _ := this.GetInt("TagId")
|
|
|
serveTypeId, _ := this.GetInt("ServeTypeId")
|
|
|
+
|
|
|
+ var startSize int
|
|
|
+ if pageSize <= 0 {
|
|
|
+ pageSize = utils.PageSize20
|
|
|
+ }
|
|
|
+ if currentIndex <= 0 {
|
|
|
+ currentIndex = 1
|
|
|
+ }
|
|
|
+ startSize = utils.StartIndex(currentIndex, pageSize)
|
|
|
if companyId == 0 {
|
|
|
br.Msg = "请选择对应公司ID"
|
|
|
return
|
|
@@ -332,13 +353,22 @@ func (this *RaiServeCoAntroller) BillList() {
|
|
|
case 3:
|
|
|
|
|
|
}
|
|
|
- list, err := cygx.GetCygxRaiServeBillRespList(condition, pars)
|
|
|
+
|
|
|
+ total, err := cygx.GetCygxRaiServeBillCount(condition, pars)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取失败"
|
|
|
+ br.ErrMsg = "获取失败,GetCygxRaiServeCompanyCountErr:" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ list, err := cygx.GetCygxRaiServeBillRespList(condition, pars, startSize, pageSize)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取失败"
|
|
|
br.ErrMsg = "获取失败,GetCygxRaiServeCompanyCountErr:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
+ page := paging.GetPaging(currentIndex, pageSize, total)
|
|
|
resp := new(cygx.CygxRaiServeBillListResp)
|
|
|
+ resp.Paging = page
|
|
|
resp.CompanyName = companyInfo.CompanyName
|
|
|
resp.List = list
|
|
|
br.Ret = 200
|