sql日志输出

Former-commit-id: eece076749180c55cf5b349ca0fcfd4a1ba8c555
This commit is contained in:
zhangwei 2023-12-12 15:43:25 +08:00
parent 344b8aaf48
commit 767c692a36
1 changed files with 6 additions and 1 deletions

View File

@ -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