From 767c692a36bae24bd959432bb6074e0a7936107f Mon Sep 17 00:00:00 2001 From: zhangwei <894646498@qq.com> Date: Tue, 12 Dec 2023 15:43:25 +0800 Subject: [PATCH] =?UTF-8?q?sql=E6=97=A5=E5=BF=97=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: eece076749180c55cf5b349ca0fcfd4a1ba8c555 --- rpc/internal/logic/pcmcore/infolistlogic.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rpc/internal/logic/pcmcore/infolistlogic.go b/rpc/internal/logic/pcmcore/infolistlogic.go index 97038ccb..0e358835 100644 --- a/rpc/internal/logic/pcmcore/infolistlogic.go +++ b/rpc/internal/logic/pcmcore/infolistlogic.go @@ -44,7 +44,11 @@ func (l *InfoListLogic) InfoList(in *pcmCore.InfoListReq) (*pcmCore.InfoListResp result := pcmCore.InfoListResp{} // 查询p端类型 var kind string - l.svcCtx.DbEngin.Raw("select type as kind from sc_participant_phy_info where id = ?", in.ParticipantId).Scan(&kind) + tx := l.svcCtx.DbEngin.Raw("select type as kind from sc_participant_phy_info where id = ?", in.ParticipantId).Scan(&kind) + if tx.Error != nil { + logx.Error(tx.Error) + return nil, tx.Error + } // 查询云智超中的数据列表 switch kind { case constants.HPC: @@ -66,6 +70,7 @@ func (l *InfoListLogic) InfoList(in *pcmCore.InfoListReq) (*pcmCore.InfoListResp func findModelList(participantId int64, dbEngin *gorm.DB, data interface{}) error { tx := dbEngin.Where("participant_id = ? AND status NOT IN ?", participantId, []string{"Deleted", "Succeeded", "Completed", "Failed"}).Find(data) if tx.Error != nil { + logx.Error(tx.Error) return tx.Error } return nil