From e65b4197b3d4f47e0ce4f4f2a1a755e79963b878 Mon Sep 17 00:00:00 2001 From: songchuang <192749120@qq.com> Date: Fri, 17 Mar 2023 10:04:29 +0800 Subject: [PATCH] =?UTF-8?q?contract=20=E9=83=A8=E5=88=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/internal/logic/contract.go | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/cmd/internal/logic/contract.go b/cmd/internal/logic/contract.go index e60cc2f..79e76e4 100644 --- a/cmd/internal/logic/contract.go +++ b/cmd/internal/logic/contract.go @@ -221,6 +221,19 @@ func (a *Contract) SignContract(req *contract.SignContractRequest) (rep *contrac return } + var ( + realName string + address string + idNum string + ) + if artistDetailResponse.RealNameInfo != nil { + realName = artistDetailResponse.RealNameInfo.Name + address = artistDetailResponse.RealNameInfo.Address + idNum = artistDetailResponse.RealNameInfo.IdNum + } else { + fmt.Printf("用户%s 实名信息为空", artistDetailResponse.MgmtArtistUid) + } + if contractInfo.Type != 4 && contractInfo.Type != 7 { switch contractInfo.Type { @@ -228,18 +241,7 @@ func (a *Contract) SignContract(req *contract.SignContractRequest) (rep *contrac var ContractNo = fmt.Sprintf("TF_%d", time.Now().UnixNano()) endTime := time.Now().AddDate(1, 0, -1) parameterMap := make((map[string]string), 0) - var ( - realName string - address string - idNum string - ) - if artistDetailResponse.RealNameInfo != nil { - realName = artistDetailResponse.RealNameInfo.Name - address = artistDetailResponse.RealNameInfo.Address - idNum = artistDetailResponse.RealNameInfo.IdNum - } else { - fmt.Printf("用户%s 实名信息为空", artistDetailResponse.MgmtArtistUid) - } + // 一、 模板填充 parameterMap["PartyAName"] = realName parameterMap["PartyAAddress"] = address