This commit is contained in:
蒋海成 2025-02-22 19:50:01 +08:00
parent 30ddc52ea9
commit c52b5e2cc8
2 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@ func CreateBundleOrderSignature(c *gin.Context) {
req.AmountType = bundleDetail.Bundle.PriceType
// 当前 未将 签名 写入合同中
signContract, signContractErr := logic.SignContract(req.CustomerName, bundleDetail.Bundle.Contract, req.Signature)
signContract, signContractErr := logic.SignContract(req.CustomerNum, bundleDetail.Bundle.Contract, req.Signature)
if signContractErr != nil {
service.Error(c, signContractErr)
return

View File

@ -16,8 +16,8 @@ import (
"time"
)
func SignContract(customerName string, contract string, signImgPath string) (outputUrl string, err error) {
filePath := customerName + "_" + time.Now().String() + ".pdf"
func SignContract(customerNum string, contract string, signImgPath string) (outputUrl string, err error) {
filePath := customerNum + time.Now().Format("20060102150405") + ".pdf"
downloadFileErr := DownloadFile(filePath, contract)
if downloadFileErr != nil {
zap.L().Error("download file error: ", zap.Error(downloadFileErr))
@ -25,7 +25,7 @@ func SignContract(customerName string, contract string, signImgPath string) (out
return outputUrl, errors.New(common.ErrorDownloadFile)
}
signFile := customerName + "signed" + "_" + time.Now().String() + ".pdf"
signFile := customerNum + "signed" + time.Now().Format("20060102150405") + ".pdf"
signErr := InsertSignature(filePath, signFile, signImgPath)
if signErr != nil {