modify getMsgByIds sql