sql日志输出
Former-commit-id: eece076749180c55cf5b349ca0fcfd4a1ba8c555
This commit is contained in:
parent
344b8aaf48
commit
767c692a36
|
@ -44,7 +44,11 @@ func (l *InfoListLogic) InfoList(in *pcmCore.InfoListReq) (*pcmCore.InfoListResp
|
||||||
result := pcmCore.InfoListResp{}
|
result := pcmCore.InfoListResp{}
|
||||||
// 查询p端类型
|
// 查询p端类型
|
||||||
var kind string
|
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 {
|
switch kind {
|
||||||
case constants.HPC:
|
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 {
|
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)
|
tx := dbEngin.Where("participant_id = ? AND status NOT IN ?", participantId, []string{"Deleted", "Succeeded", "Completed", "Failed"}).Find(data)
|
||||||
if tx.Error != nil {
|
if tx.Error != nil {
|
||||||
|
logx.Error(tx.Error)
|
||||||
return tx.Error
|
return tx.Error
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue