This commit is contained in:
蒋海成 2025-02-22 21:08:32 +08:00
parent bc26fba5f5
commit 902ad2a6c7

View File

@ -4,6 +4,7 @@ import (
"bytes"
"errors"
"fmt"
"fonchain-fiee/pkg/model"
"fonchain-fiee/pkg/service/bundle/common"
"fonchain-fiee/pkg/service/upload"
"github.com/signintech/gopdf"
@ -17,7 +18,7 @@ import (
)
func SignContract(customerNum string, contract string, signImgPath string) (outputUrl string, err error) {
filePath := customerNum + time.Now().Format("20060102150405") + ".pdf"
filePath := model.MediaPath + customerNum + time.Now().Format("20060102150405") + ".pdf"
downloadFileErr := DownloadFile(filePath, contract)
if downloadFileErr != nil {
zap.L().Error("download file error: ", zap.Error(downloadFileErr))
@ -25,7 +26,7 @@ func SignContract(customerNum string, contract string, signImgPath string) (outp
return outputUrl, errors.New(common.ErrorDownloadFile)
}
signFile := customerNum + "signed" + time.Now().Format("20060102150405") + ".pdf"
signFile := model.MediaPath + customerNum + "signed" + time.Now().Format("20060102150405") + ".pdf"
signErr := InsertSignature(filePath, signFile, signImgPath)
if signErr != nil {