diff --git a/app/svc/svc_data_center.go b/app/svc/svc_data_center.go index 2704063..8da5671 100644 --- a/app/svc/svc_data_center.go +++ b/app/svc/svc_data_center.go @@ -444,7 +444,7 @@ func commAgentProfit(c *gin.Context, isTotal int, req md.DataCenterProfitRecordR where %s %s ` user := GetUser(c) - where := "uuid=" + c.GetString("mid") + " and agent_id =" + utils.IntToStr(user.AgentId) + where := "is_generate_report=1 and uuid=" + c.GetString("mid") + " and agent_id =" + utils.IntToStr(user.AgentId) if req.AppId != "" || req.Platform != "" { where += " and app_id in(" + appId + ")" } @@ -542,7 +542,7 @@ func commAgent(c *gin.Context, isTotal int, req md.DataCenterRecordReq) ([]map[s where %s ` user := GetUser(c) - whereAgent := "original_data_id in(" + strings.Join(ids, ",") + ") and agent_id=" + utils.IntToStr(user.AgentId) + whereAgent := "is_generate_report=1 and original_data_id in(" + strings.Join(ids, ",") + ") and agent_id=" + utils.IntToStr(user.AgentId) sqlAgent = fmt.Sprintf(sqlAgent, whereAgent) nativeStringAgent, _ := db.QueryNativeString(db.Db, sqlAgent) agentMap := make(map[string]map[string]string) diff --git a/app/svc/svc_index.go b/app/svc/svc_index.go index 6909d93..a7c04b0 100644 --- a/app/svc/svc_index.go +++ b/app/svc/svc_index.go @@ -167,7 +167,7 @@ func commTotalAgent(c *gin.Context, startDate, endDate string) []map[string]stri where %s ` user := GetUser(c) - where := "uuid=" + c.GetString("mid") + " and agent_id =" + utils.IntToStr(user.AgentId) + where := "is_generate_report=1 and uuid=" + c.GetString("mid") + " and agent_id =" + utils.IntToStr(user.AgentId) if startDate != "" { where += " and date>='" + startDate + "'" }