Skip to content

会话记录为空的时候会显示NULL转int64错误 #22

@myenong

Description

@myenong
staff.go单元,这段代码增加IFNULL处理

    err = DB.Model(&GroupChat{}).Where("ext_corp_id = ?", extCorpID).
	Pluck("IFNULL(sum(today_join_member_num),0) as today_groups_increase", &cs.TodayGroupsIncrease).Error
if err != nil {
	err = errors.WithStack(err)
	return
}

err = DB.Model(&GroupChat{}).Where("ext_corp_id = ?", extCorpID).
	Pluck("IFNULL(sum(today_quit_member_num),0) as today_groups_decrease", &cs.TodayGroupsDecrease).Error
if err != nil {
	err = errors.WithStack(err)
	return
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions