11
This commit is contained in:
parent
dc586a7bf1
commit
7d79acf43a
@ -1991,7 +1991,7 @@ func (r *ExportService) Product(d []*model.Product) (string, error) {
|
|||||||
now := time.Now()
|
now := time.Now()
|
||||||
dateTimeString := now.Format("20060102150405") // 当前时间字符串
|
dateTimeString := now.Format("20060102150405") // 当前时间字符串
|
||||||
rand.New(rand.NewSource(time.Now().UnixNano())) // 设置随机数
|
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
|
// 上传oss
|
||||||
_, err = aliyun.PutObjectByte(ossPath, file.Bytes())
|
_, err = aliyun.PutObjectByte(ossPath, file.Bytes())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user