|
@@ -29,32 +29,41 @@ func (c *CompanyUser) GetUserReportList() {
|
|
|
email:=c.GetString("email","")
|
|
|
startDate:=c.GetString("start_date","")
|
|
|
endDate:=c.GetString("end_date","")
|
|
|
- if startDate == ""{
|
|
|
- c.FailWithMessage("start_date必传")
|
|
|
- return
|
|
|
- }
|
|
|
- if endDate == ""{
|
|
|
- c.FailWithMessage("end_date必传")
|
|
|
- return
|
|
|
- }
|
|
|
- startDateTime,err := time.Parse(utils.FormatDate,startDate)
|
|
|
- if err != nil{
|
|
|
- c.FailWithMessage("start_date格式异常")
|
|
|
- return
|
|
|
- }
|
|
|
- endDateTime,err := time.Parse(utils.FormatDate,endDate)
|
|
|
- if err != nil{
|
|
|
- c.FailWithMessage("end_date格式异常")
|
|
|
- return
|
|
|
+
|
|
|
+ //}
|
|
|
+ // return
|
|
|
+ // c.FailWithMessage("end_date必传")
|
|
|
+ //if endDate == ""{
|
|
|
+ //}
|
|
|
+ // return
|
|
|
+ // c.FailWithMessage("start_date必传")
|
|
|
+ //if startDate == ""{
|
|
|
+
|
|
|
+ startTime := ``
|
|
|
+ endTime := ``
|
|
|
+ if startDate != "" && endDate != ""{
|
|
|
+ startDateTime,err := time.Parse(utils.FormatDate,startDate)
|
|
|
+ if err != nil{
|
|
|
+ c.FailWithMessage("start_date格式异常")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ endDateTime,err := time.Parse(utils.FormatDate,endDate)
|
|
|
+ if err != nil{
|
|
|
+ c.FailWithMessage("end_date格式异常")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ startTime = startDateTime.Format(utils.FormatDate)+" 00:00:00"
|
|
|
+ endTime = endDateTime.Format(utils.FormatDate)+" 23:59:59"
|
|
|
}
|
|
|
|
|
|
+
|
|
|
pageSize := c.PageSize
|
|
|
startSize := c.StartSize
|
|
|
currentIndex := c.StartPage
|
|
|
|
|
|
|
|
|
|
|
|
- total,list, err := tables.GetViewReportList(mobile,email,startDateTime.Format(utils.FormatDate)+" 00:00:00",endDateTime.Format(utils.FormatDate)+" 23:59:59",startSize,pageSize)
|
|
|
+ total,list, err := tables.GetViewReportList(mobile,email,startTime,endTime,startSize,pageSize)
|
|
|
if err != nil {
|
|
|
c.FailWithMessage("获取失败")
|
|
|
return
|