From 9a2b216e31228f7e38f7a0842288d354de0f6fdf Mon Sep 17 00:00:00 2001 From: wucongxing <815046773@qq.com> Date: Thu, 16 Nov 2023 16:03:57 +0800 Subject: [PATCH] 1 --- api/service/export.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/api/service/export.go b/api/service/export.go index 1ed9c10..4ff322f 100644 --- a/api/service/export.go +++ b/api/service/export.go @@ -436,7 +436,7 @@ func (r *ExportService) DoctorWithdrawal(doctorWithdrawals []*model.DoctorWithdr now := time.Now() dateTimeString := now.Format("20060102150405") // 当前时间字符串 rand.Seed(time.Now().UnixNano()) // 设置随机数 - ossPath := "admin/export/output" + 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()) @@ -556,7 +556,7 @@ func (r *ExportService) DoctorWithdrawalOrder(doctorWithdrawalOrders []*model.Do now := time.Now() dateTimeString := now.Format("20060102150405") // 当前时间字符串 rand.Seed(time.Now().UnixNano()) // 设置随机数 - ossPath := "admin/export/output" + 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()) @@ -864,7 +864,7 @@ func (r *ExportService) UserDoctor(userDoctors []*model.UserDoctor) (string, err now := time.Now() dateTimeString := now.Format("20060102150405") // 当前时间字符串 rand.Seed(time.Now().UnixNano()) // 设置随机数 - ossPath := "admin/export/output" + 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()) @@ -930,7 +930,7 @@ func (r *ExportService) UserDoctorBankCard(d []*model.DoctorBankCard) (string, e now := time.Now() dateTimeString := now.Format("20060102150405") // 当前时间字符串 rand.Seed(time.Now().UnixNano()) // 设置随机数 - ossPath := "admin/export/output" + 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()) @@ -996,7 +996,7 @@ func (r *ExportService) DoctorAccount(d []*model.DoctorAccount) (string, error) now := time.Now() dateTimeString := now.Format("20060102150405") // 当前时间字符串 rand.Seed(time.Now().UnixNano()) // 设置随机数 - ossPath := "admin/export/output" + 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()) @@ -1144,7 +1144,7 @@ func (r *ExportService) OrderInquiryForAccount(d []*model.OrderInquiry) (string, now := time.Now() dateTimeString := now.Format("20060102150405") // 当前时间字符串 rand.Seed(time.Now().UnixNano()) // 设置随机数 - ossPath := "admin/export/output" + 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()) @@ -1201,7 +1201,7 @@ func (r *ExportService) UserPatient(d []*model.UserPatient) (string, error) { now := time.Now() dateTimeString := now.Format("20060102150405") // 当前时间字符串 rand.Seed(time.Now().UnixNano()) // 设置随机数 - ossPath := "admin/export/output" + 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()) @@ -1285,7 +1285,7 @@ func (r *ExportService) PatientFamily(d []*model.PatientFamily) (string, error) now := time.Now() dateTimeString := now.Format("20060102150405") // 当前时间字符串 rand.Seed(time.Now().UnixNano()) // 设置随机数 - ossPath := "admin/export/output" + 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()) @@ -1433,7 +1433,7 @@ func (r *ExportService) OrderInquiry(d []*model.OrderInquiry) (string, error) { now := time.Now() dateTimeString := now.Format("20060102150405") // 当前时间字符串 rand.Seed(time.Now().UnixNano()) // 设置随机数 - ossPath := "admin/export/output" + 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()) @@ -1573,7 +1573,7 @@ func (r *ExportService) OrderProduct(d []*model.OrderProduct) (string, error) { now := time.Now() dateTimeString := now.Format("20060102150405") // 当前时间字符串 rand.Seed(time.Now().UnixNano()) // 设置随机数 - ossPath := "admin/export/output" + 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()) @@ -1691,7 +1691,7 @@ func (r *ExportService) OrderPrescription(d []*model.OrderPrescription) (string, now := time.Now() dateTimeString := now.Format("20060102150405") // 当前时间字符串 rand.Seed(time.Now().UnixNano()) // 设置随机数 - ossPath := "admin/export/output" + 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())