|
@@ -444,7 +444,7 @@ func commAgentProfit(c *gin.Context, isTotal int, req md.DataCenterProfitRecordR |
|
|
where %s %s |
|
|
where %s %s |
|
|
` |
|
|
` |
|
|
user := GetUser(c) |
|
|
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 != "" { |
|
|
if req.AppId != "" || req.Platform != "" { |
|
|
where += " and app_id in(" + appId + ")" |
|
|
where += " and app_id in(" + appId + ")" |
|
|
} |
|
|
} |
|
@@ -542,7 +542,7 @@ func commAgent(c *gin.Context, isTotal int, req md.DataCenterRecordReq) ([]map[s |
|
|
where %s |
|
|
where %s |
|
|
` |
|
|
` |
|
|
user := GetUser(c) |
|
|
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) |
|
|
sqlAgent = fmt.Sprintf(sqlAgent, whereAgent) |
|
|
nativeStringAgent, _ := db.QueryNativeString(db.Db, sqlAgent) |
|
|
nativeStringAgent, _ := db.QueryNativeString(db.Db, sqlAgent) |
|
|
agentMap := make(map[string]map[string]string) |
|
|
agentMap := make(map[string]map[string]string) |
|
|