|
|
@@ -29,7 +29,7 @@ func DataCenterRecordTotal(c *gin.Context, req md.DataCenterTableReq) md.DataCen |
|
|
|
mediumId := GetAgentMediumId(c) |
|
|
|
where := "is_generate_report=1 and uuid=" + c.GetString("mid") + " and medium_id in(" + mediumId + ")" |
|
|
|
if req.AppId != "" || req.Platform != "" { |
|
|
|
where += " and app_id in(" + appId + ")" |
|
|
|
where += " and app_id in('" + appId + "')" |
|
|
|
} |
|
|
|
if req.AdType != "" { |
|
|
|
where += " and ad_slot='" + req.AdType + "'" |
|
|
@@ -166,7 +166,7 @@ func DataCenterCommissionRecordTotal(c *gin.Context, req md.DataCenterTableReq) |
|
|
|
mediumId := GetAgentMediumId(c) |
|
|
|
where := "is_generate_report=1 and uuid=" + c.GetString("mid") |
|
|
|
if req.AppId != "" || req.Platform != "" { |
|
|
|
where += " and app_id in(" + appId + ")" |
|
|
|
where += " and app_id in('" + appId + "')" |
|
|
|
} |
|
|
|
if req.AdType != "" { |
|
|
|
where += " and ad_slot='" + req.AdType + "'" |
|
|
@@ -402,7 +402,7 @@ func comm(c *gin.Context, isTotal int, req md.DataCenterRecordReq) ([]map[string |
|
|
|
mediumId := GetAgentMediumId(c) |
|
|
|
where := "is_generate_report=1 and uuid=" + c.GetString("mid") + " and medium_id in(" + mediumId + ")" |
|
|
|
if req.AppId != "" || req.Platform != "" { |
|
|
|
where += " and app_id in(" + appId + ")" |
|
|
|
where += " and app_id in('" + appId + "')" |
|
|
|
} |
|
|
|
if req.AdType != "" { |
|
|
|
where += " and ad_slot='" + req.AdType + "'" |
|
|
@@ -448,7 +448,7 @@ func commAgentProfit(c *gin.Context, isTotal int, req md.DataCenterProfitRecordR |
|
|
|
user := GetUser(c) |
|
|
|
where := "g.is_generate_report=1 and gf.uuid=" + c.GetString("mid") + " and gf.agent_id =" + utils.IntToStr(user.AgentId) |
|
|
|
if req.AppId != "" || req.Platform != "" { |
|
|
|
where += " and gf.app_id in(" + appId + ")" |
|
|
|
where += " and gf.app_id in('" + appId + "')" |
|
|
|
} |
|
|
|
if req.StartDate != "" { |
|
|
|
where += " and gf.date >= '" + req.StartDate + "'" |
|
|
@@ -500,7 +500,7 @@ func commAgent(c *gin.Context, isTotal int, req md.DataCenterRecordReq) ([]map[s |
|
|
|
mediumId := GetAgentMediumId(c) |
|
|
|
where := "is_generate_report=1 and uuid=" + c.GetString("mid") + " and medium_id in(" + mediumId + ")" |
|
|
|
if req.AppId != "" || req.Platform != "" { |
|
|
|
where += " and app_id in(" + appId + ")" |
|
|
|
where += " and app_id in('" + appId + "')" |
|
|
|
} |
|
|
|
if req.AdType != "" { |
|
|
|
where += " and ad_slot='" + req.AdType + "'" |
|
|
|