浏览代码

Merge branch 'master' of http://git.shengws.com/csx/gdyb

csx 2 年前
父节点
当前提交
c97af81a90
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      controllers/sg/his_api_controller.go

+ 4 - 1
controllers/sg/his_api_controller.go 查看文件

9392
 	endtime, _ := time.ParseInLocation(timeLayout+" 15:04:05", end_time+" 23:59:59", loc)
9392
 	endtime, _ := time.ParseInLocation(timeLayout+" 15:04:05", end_time+" 23:59:59", loc)
9393
 	orders, _ := service.GetOrderByTimeTwo(startime.Unix(), endtime.Unix(), adminUser.CurrentOrgId)
9393
 	orders, _ := service.GetOrderByTimeTwo(startime.Unix(), endtime.Unix(), adminUser.CurrentOrgId)
9394
 
9394
 
9395
+	rand.Seed(time.Now().UnixNano())
9396
+
9397
+	num := rand.Intn(30000)
9395
 	Mkdir(miConfig.OrgName)
9398
 	Mkdir(miConfig.OrgName)
9396
-	file := strconv.FormatInt(adminUser.CurrentOrgId, 10) + strconv.FormatInt(time.Now().Unix(), 10)
9399
+	file := strconv.FormatInt(int64(num), 10)
9397
 	file_name := file + ".txt"
9400
 	file_name := file + ".txt"
9398
 	zip_name := file + ".zip"
9401
 	zip_name := file + ".zip"
9399
 	zip_path := miConfig.OrgName + "/" + zip_name
9402
 	zip_path := miConfig.OrgName + "/" + zip_name