From a713709c62873fca24471f92fdf703e798a55a70 Mon Sep 17 00:00:00 2001 From: songchuang <192749120@qq.com> Date: Wed, 19 Apr 2023 16:14:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E8=B4=A6=E5=8D=95=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/internal/logic/contract.go b/cmd/internal/logic/contract.go index e36419a..02f0274 100644 --- a/cmd/internal/logic/contract.go +++ b/cmd/internal/logic/contract.go @@ -51,13 +51,13 @@ func (a *Contract) CreateContract(req *contract.CreateContractRequest) (rep *con } fmt.Println("第二处111111111111111") + fmt.Println("req.Type", req.Type) switch req.Type { //1 画家合同(不涉及画家的画作) case 1: //查看画家合同是否已经存在,不存在继续 if err = dao.GetMgmtContractByArtistUid(req.ArtistUid, req.Type); err == gorm.ErrRecordNotFound { - fmt.Println("第一处111") var uid uuid.UUID if uid, err = uuid.NewV4(); err != nil { err = errors.New(m.ERROR_UID) @@ -129,18 +129,19 @@ func (a *Contract) CreateContract(req *contract.CreateContractRequest) (rep *con //这里是对账单的物权合同!!!注意!!! case 4: + fmt.Println("第一处111") //查看画家该批次是否已经有了合同,没有继续 if err = dao.StatementContractNo(req.ArtistUid, req.BatchUid); err == gorm.ErrRecordNotFound { } else { return } - + fmt.Println("第二处111") //创建物权合同,类型4 if err = dao.CreateStatementContract(tx, req.ArtistUid, req.BatchUid, req.BatchTime, 4); err != nil { tx.Rollback() return } - + fmt.Println("第三处111") //修改对账单,将State状态值改为2 if err = dao.UpdateArtworkTxStatus(tx, req.BatchUid, 2); err != nil { tx.Rollback()