Commit fd26df33 authored by haoyanbin's avatar haoyanbin

1

parent ab9534cc
......@@ -305,8 +305,13 @@ func ExportSurveyLogPageList(c *gin.Context) {
f.SetCellValue(fileName, "G1", "数据来源")
f.SetCellValue(fileName, "H1", "访问IP")
f.SetCellValue(fileName, "I1", "访问时间")
f.SetCellValue(fileName, "J1", "是否识别")
for k, v := range list {
userType := "未识别"
if v.UserType == 1 {
userType = "已识别"
}
a := strconv.Itoa(k + 2)
f.SetCellValue(fileName, "A"+a, v.Id)
f.SetCellValue(fileName, "B"+a, v.UserName)
......@@ -317,6 +322,7 @@ func ExportSurveyLogPageList(c *gin.Context) {
f.SetCellValue(fileName, "G"+a, v.UserSource)
f.SetCellValue(fileName, "H"+a, v.Ip)
f.SetCellValue(fileName, "I"+a, utils.StringToTime(v.CreateTime))
f.SetCellValue(fileName, "J"+a, userType)
}
// Set active sheet of the workbook.
f.SetActiveSheet(index)
......
......@@ -104,4 +104,5 @@ type GetSurveyLogPageList struct {
UserSource string `gorm:"type:string(255)" json:"user_source"`
Ip string `gorm:"type:string(255)" json:"ip"`
CreateTime string `gorm:"type:string(255)" json:"create_time"`
UserType int `gorm:"type:int(255)" json:"user_type"`
}
......@@ -350,7 +350,7 @@ func GetSurveyLogPageList(req request.GetSurveyLogListReq) []request.GetSurveyLo
table := " (select moc_id, user_id, page, ip, create_time from survey_log WHERE 1>0 " + conditions + " group by ip order by create_time asc)sl "
table += " left join customer_user as cu on sl.user_id = cu.id "
field := " cu.id, cu.user_name, cu.region, cu.city, cu.worker_name, cu.worker_mobile, cu.user_source" +
field := " cu.id, cu.user_name, cu.region, cu.city, cu.worker_name, cu.worker_mobile, cu.user_source, cu.user_type" +
", sl.ip, sl.create_time "
list := make([]request.GetSurveyLogPageList, 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment