This commit is contained in:
wucongxing 2023-11-16 16:03:57 +08:00
parent 7bd3fd2cc7
commit 9a2b216e31

View File

@ -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())