This commit is contained in:
wucongxing8150 2024-06-21 14:02:47 +08:00
parent dc586a7bf1
commit 7d79acf43a

View File

@ -1991,7 +1991,7 @@ func (r *ExportService) Product(d []*model.Product) (string, error) {
now := time.Now()
dateTimeString := now.Format("20060102150405") // 当前时间字符串
rand.New(rand.NewSource(time.Now().UnixNano())) // 设置随机数
ossPath := "admin/export/系统药品" + dateTimeString + fmt.Sprintf("%d", rand.Intn(9000)+1000) + ".xlsx"
ossPath := "admin/export/药品" + dateTimeString + fmt.Sprintf("%d", rand.Intn(9000)+1000) + ".xlsx"
// 上传oss
_, err = aliyun.PutObjectByte(ossPath, file.Bytes())