Browse Source

更新

master
huangjiajun 1 month ago
parent
commit
fe715cd52c
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      app/svc/svc_data_center.go
  2. +1
    -1
      app/svc/svc_index.go

+ 2
- 2
app/svc/svc_data_center.go View File

@@ -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)


+ 1
- 1
app/svc/svc_index.go View File

@@ -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 + "'"
}


Loading…
Cancel
Save